Skip to content

Commit 2929dcb

Browse files
committed
docs: RTD theme + custom CSS, pinned requirements
1 parent 58cbd68 commit 2929dcb

3 files changed

Lines changed: 226 additions & 17 deletions

File tree

docs/requirements.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
sphinx>=7.0
2-
furo
3-
breathe
4-
myst-parser
5-
sphinx-copybutton
1+
sphinx==7.4.7
2+
sphinx-rtd-theme==3.0.2
3+
sphinx-copybutton==0.5.2
4+
myst-parser==3.0.1

docs/source/_static/custom.css

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
/* ================================================================
2+
custom.css —
3+
================================================================ */
4+
5+
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;700&family=Source+Code+Pro:wght@400;600&display=swap');
6+
7+
/* ── Sidebar ── */
8+
.wy-nav-side, .wy-side-scroll { background: #2c3e50; }
9+
10+
.wy-side-nav-search {
11+
background: #1a252f;
12+
border-bottom: 2px solid #2980b9;
13+
}
14+
.wy-side-nav-search a {
15+
color: #ecf0f1;
16+
font-family: 'Source Sans 3', sans-serif;
17+
font-weight: 700;
18+
}
19+
.wy-side-nav-search input[type="text"] {
20+
background: #263545;
21+
border: 1px solid #3d5166;
22+
color: #b5bac4;
23+
border-radius: 4px;
24+
}
25+
26+
/* ── Nav links ── */
27+
.wy-menu-vertical a {
28+
font-family: 'Source Sans 3', sans-serif;
29+
font-size: 14px;
30+
color: #c8d3de;
31+
}
32+
.wy-menu-vertical a:hover {
33+
background: #3d5166;
34+
color: #fff;
35+
}
36+
.wy-menu-vertical li.current > a {
37+
background: rgba(41, 128, 185, 0.15);
38+
color: #fff;
39+
border-left: 3px solid #2980b9;
40+
font-weight: 600;
41+
}
42+
.wy-menu-vertical .caption-text {
43+
font-family: 'Source Code Pro', monospace;
44+
font-size: 10px;
45+
font-weight: 700;
46+
text-transform: uppercase;
47+
letter-spacing: 0.1em;
48+
color: #8899aa;
49+
}
50+
51+
/* ── Content area ── */
52+
.wy-nav-content-wrap { background: #f8f7f3; }
53+
.wy-nav-content {
54+
max-width: 900px;
55+
background: #fff;
56+
font-family: 'Source Sans 3', sans-serif;
57+
font-size: 15px;
58+
color: #333;
59+
line-height: 1.75;
60+
}
61+
62+
/* ── Headings ── */
63+
h1 {
64+
font-family: 'Source Sans 3', sans-serif;
65+
font-size: 2rem;
66+
font-weight: 700;
67+
color: #1a252f;
68+
border-bottom: 2px solid #e1e4e8;
69+
padding-bottom: 10px;
70+
margin-bottom: 22px;
71+
}
72+
h2 {
73+
font-family: 'Source Sans 3', sans-serif;
74+
font-size: 1.4rem;
75+
font-weight: 700;
76+
color: #1a252f;
77+
border-bottom: 1px solid #e1e4e8;
78+
padding-bottom: 6px;
79+
margin-top: 40px;
80+
}
81+
h3 {
82+
font-family: 'Source Sans 3', sans-serif;
83+
font-size: 1.1rem;
84+
font-weight: 600;
85+
color: #2c3e50;
86+
margin-top: 28px;
87+
}
88+
89+
/* ── Code blocks ── */
90+
div.highlight, .highlight {
91+
background: #1e2a35 !important;
92+
border: 1px solid #2c3e50;
93+
border-radius: 6px;
94+
}
95+
div.highlight pre {
96+
background: #1e2a35 !important;
97+
color: #abb2bf;
98+
font-family: 'Source Code Pro', monospace;
99+
font-size: 13.5px;
100+
line-height: 1.6;
101+
padding: 16px 18px;
102+
}
103+
code.literal {
104+
font-family: 'Source Code Pro', monospace;
105+
font-size: 0.88em;
106+
background: #f6f8fa;
107+
border: 1px solid #dfe2e5;
108+
border-radius: 3px;
109+
padding: 1px 5px;
110+
color: #c0392b;
111+
}
112+
113+
/* ── Tables ── */
114+
table.docutils {
115+
border-collapse: collapse;
116+
width: 100%;
117+
font-size: 14px;
118+
margin: 16px 0 24px;
119+
}
120+
table.docutils th {
121+
background: #2c3e50 !important;
122+
color: #fff !important;
123+
padding: 9px 13px;
124+
font-size: 12px;
125+
font-weight: 600;
126+
letter-spacing: 0.04em;
127+
text-transform: uppercase;
128+
border: none !important;
129+
}
130+
table.docutils td {
131+
padding: 8px 13px;
132+
border-bottom: 1px solid #e1e4e8 !important;
133+
border-top: none !important;
134+
color: #555;
135+
vertical-align: top;
136+
}
137+
table.docutils tr:nth-child(even) td { background: #f8f9fa; }
138+
table.docutils tr:hover td { background: #f0f4f8; }
139+
140+
/* ── Admonitions ── */
141+
.admonition {
142+
border-left: 4px solid;
143+
border-radius: 0 5px 5px 0;
144+
padding: 12px 16px;
145+
margin: 18px 0;
146+
font-size: 14px;
147+
}
148+
.admonition-title {
149+
font-family: 'Source Code Pro', monospace;
150+
font-size: 11px;
151+
font-weight: 700;
152+
text-transform: uppercase;
153+
letter-spacing: 0.07em;
154+
margin-bottom: 6px;
155+
}
156+
.note { background: #e8f4fd; border-color: #2980b9; }
157+
.note .admonition-title { color: #1a6998; }
158+
.tip { background: #eef7ee; border-color: #27ae60; }
159+
.tip .admonition-title { color: #1e8449; }
160+
.warning { background: #fff8e6; border-color: #f39c12; }
161+
.warning .admonition-title { color: #b7770d; }
162+
.danger { background: #fdf0ee; border-color: #c0392b; }
163+
.danger .admonition-title { color: #c0392b; }
164+
165+
/* ── RTD version bar ── */
166+
.rst-versions {
167+
background: #1a252f;
168+
border-top: 1px solid #2c3e50;
169+
}
170+
.rst-versions .rst-current-version {
171+
background: #2980b9;
172+
color: #fff;
173+
font-family: 'Source Code Pro', monospace;
174+
font-size: 12px;
175+
}
176+
177+
/* ── Prev/Next buttons ── */
178+
.rst-footer-buttons .btn-neutral {
179+
background: #2c3e50;
180+
color: #ecf0f1;
181+
border: 1px solid #3d5166;
182+
}
183+
.rst-footer-buttons .btn-neutral:hover {
184+
background: #3d5166;
185+
color: #fff;
186+
}
187+
188+
/* ── Hide EthicalAds ── */
189+
.ethical-sidebar, .ethical-ads, [data-ea-publisher],
190+
#ethical-ad-placement, readthedocs-flyout { display: none !important; }

docs/source/conf.py

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
1-
# Configuration file for Sphinx / ReadTheDocs
1+
# conf.py — Qt Ambient Awareness System
22
import os, sys
33
sys.path.insert(0, os.path.abspath('../..'))
44

5-
project = 'Ambient Awareness System'
5+
project = 'Qt Ambient Awareness System'
66
copyright = '2025, AAS Contributors'
77
author = 'AAS Contributors'
8-
release = '0.3.0'
8+
release = '0.4.0'
9+
version = '0.4'
910

1011
extensions = [
11-
'sphinx.ext.autodoc',
12+
'sphinx.ext.mathjax',
1213
'sphinx.ext.viewcode',
1314
'sphinx.ext.napoleon',
1415
'sphinx.ext.graphviz',
15-
'breathe', # Doxygen C++ API docs
16-
'myst_parser', # Markdown support
16+
'sphinx_copybutton',
17+
'myst_parser',
1718
]
1819

19-
html_theme = 'furo'
20-
html_title = 'Ambient Awareness System'
21-
html_static_path = ['_static']
20+
html_theme = 'sphinx_rtd_theme'
21+
html_theme_options = {
22+
'logo_only': False,
23+
'display_version': True,
24+
'prev_next_buttons_location': 'bottom',
25+
'style_external_links': True,
26+
'collapse_navigation': False,
27+
'sticky_navigation': True,
28+
'navigation_depth': 4,
29+
}
30+
html_static_path = ['_static']
31+
html_css_files = ['custom.css']
32+
html_show_sphinx = False
33+
html_show_sourcelink = False
2234

23-
breathe_projects = {"aas": "../doxygen/xml"}
24-
breathe_default_project = "aas"
35+
master_doc = 'index'
36+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
37+
source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
38+
templates_path = ['_templates']
39+
pygments_style = 'monokai'
2540

26-
myst_enable_extensions = ["colon_fence", "deflist"]
41+
myst_enable_extensions = ['colon_fence', 'deflist']
42+
43+
mathjax_path = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'
44+
45+
copybutton_prompt_text = r'^\$ |>>> '
46+
copybutton_prompt_is_regexp = True

0 commit comments

Comments
 (0)