Skip to content

Commit 7a147b7

Browse files
authored
Merge pull request #1278 from gusthoff/topic/infrastructure/sphinx/structure/20250704/furo_theme
Sphinx: migrating to Furo theme
2 parents a0f741d + 3a058b0 commit 7a147b7

File tree

15 files changed

+173
-842
lines changed

15 files changed

+173
-842
lines changed

frontend/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
coverage==7.10.7
22
docutils==0.21.2
3+
furo==2025.9.25
34
graphviz==0.21
45
ipython==9.5.0
56
pdf2image==1.17.0

frontend/requirements_frozen.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ coverage==7.10.7
88
decorator==5.2.1
99
docutils==0.21.2
1010
executing==2.2.1
11+
furo==2025.9.25
1112
graphviz==0.21
1213
idna==3.10
1314
imagesize==1.4.1

frontend/sphinx/_templates/footer.html

Lines changed: 0 additions & 75 deletions
This file was deleted.

frontend/sphinx/_templates/layout.html

Lines changed: 0 additions & 43 deletions
This file was deleted.

frontend/sphinx/conf.py

Lines changed: 41 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ def get_file_from_conf_ini(path_to_file):
104104
'sphinx.ext.graphviz',
105105
'sphinx.ext.extlinks',
106106
'widget_extension',
107-
'sphinx_rtd_theme',
108107
'sphinx_reredirects',
109108
'sphinxcontrib.plantuml',
110109
]
@@ -183,6 +182,7 @@ def get_file_from_conf_ini(path_to_file):
183182

184183
# The name of the Pygments (syntax highlighting) style to use.
185184
pygments_style = 'sphinx'
185+
pygments_dark_style = "monokai"
186186

187187
# Figures, tables and code-blocks are automatically numbered if they
188188
# have a caption.
@@ -239,8 +239,7 @@ def get_file_from_conf_ini(path_to_file):
239239
# The theme to use for HTML and HTML Help pages. See the documentation for
240240
# a list of builtin themes.
241241
#
242-
#html_theme = 'learn_theme'
243-
html_theme = 'sphinx_rtd_theme'
242+
html_theme = 'furo'
244243

245244
if 'GEN_LEARN_SITE' in os.environ and os.environ['GEN_LEARN_SITE'] == "yes":
246245
html_title = "learn.adacore.com"
@@ -252,24 +251,47 @@ def get_file_from_conf_ini(path_to_file):
252251

253252
html_theme_path = ['.'] # make sphinx search for themes in current dir
254253

254+
html_css_files = [
255+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css",
256+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css",
257+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css",
258+
]
259+
255260
# Theme options are theme-specific and customize the look and feel of a theme
256261
# further. For a list of options available for each theme, see the
257262
# documentation.
258263
#
259264
html_theme_options = {
260-
'logo_only': True,
261-
'flyout_display': 'hidden',
262-
'version_selector': False,
263-
'prev_next_buttons_location': 'bottom',
264-
'style_external_links': False,
265-
'vcs_pageview_mode': '',
266-
# 'style_nav_header_background': 'white',
267-
# Toc options
268-
'collapse_navigation': False,
269-
'sticky_navigation': False,
270-
'navigation_depth': 4,
271-
'includehidden': True,
272-
'titles_only': False
265+
# furo options
266+
'light_css_variables': {
267+
'color-brand-primary': '#fa5000',
268+
'color-brand-content': '#fa5000',
269+
'color-brand-visited': '#9f1b5e',
270+
'color-admonition-background': '#faf1ec',
271+
'color-admonition-title': '#fa5000',
272+
'color-admonition-title-background': '#fadfd2',
273+
'color-admonition-title--note': 'var(--color-admonition-title)',
274+
'color-admonition-title-background--note': 'var(--color-admonition-title-background)',
275+
},
276+
'dark_css_variables': {
277+
'color-brand-primary': '#fa5000',
278+
'color-brand-content': '#fa5000',
279+
'color-brand-visited': '#9f1b5e',
280+
'color-admonition-background': '#261d1a',
281+
'color-admonition-title': '#fa5000',
282+
'color-admonition-title-background': '#502000',
283+
'color-admonition-title--note': 'var(--color-admonition-title)',
284+
'color-admonition-title-background--note': 'var(--color-admonition-title-background)',
285+
},
286+
'sidebar_hide_name': True,
287+
'navigation_with_keys': True,
288+
'top_of_page_buttons': ["view", "edit"],
289+
# 'announcement': "",
290+
# 'footer_icons': [],
291+
292+
"source_repository": "https://github.com/AdaCore/learn",
293+
"source_branch": "main",
294+
"source_directory": "content/",
273295
}
274296

275297
html_show_sphinx = False
@@ -278,6 +300,9 @@ def get_file_from_conf_ini(path_to_file):
278300
html_logo = "img/logo.svg"
279301
else:
280302
html_logo = "img/logo_sandbox.svg"
303+
html_theme_options["announcement"] = \
304+
"<p>⚠️ This version of the website contains UNPUBLISHED contents. " \
305+
"⚠️</p>"
281306

282307
html_favicon = "img/favicon.ico"
283308

frontend/sphinx/img/favicon.ico

0 Bytes
Binary file not shown.
86.5 KB
Loading

frontend/sphinx/img/logo.png

1.9 KB
Loading

frontend/sphinx/img/logo_sandbox.svg

Lines changed: 16 additions & 16 deletions
Loading

frontend/sphinx/widget/templates/widget.html

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,30 @@
1414
<div id="{{ w.id }}.settings-bar" class="settings-bar">
1515
<div class="dropdown-container settingsbar-item">
1616
<button class="dropdown-btn">
17-
<span class="fa fa-cog"></span>
17+
<span class="fa-solid fa-gear"></span>
1818
Settings
1919
</button>
2020
<div class="dropdown-content">
21-
<label>
22-
<input id="{{ w.id }}.settings-bar.tab-setting" type="checkbox" class="checkbox tab-setting">
23-
Use tabbed editor view
24-
</label>
25-
<label>
26-
<input id="{{ w.id }}.settings-bar.theme-setting" type="checkbox" class="checkbox theme-setting">
27-
Use the dark theme
28-
</label>
21+
<div class="settings-bar-entries">
22+
<div class="settings-bar-entry">
23+
<label>
24+
<input id="{{ w.id }}.settings-bar.tab-setting" type="checkbox" class="checkbox tab-setting">
25+
Use tabbed editor view
26+
</label>
27+
</div>
28+
<div class="settings-bar-entry">
29+
<label>
30+
<input id="{{ w.id }}.settings-bar.theme-setting" type="checkbox" class="checkbox theme-setting">
31+
Use the dark theme
32+
</label>
33+
</div>
34+
</div>
2935
</div>
3036
</div>
3137

3238
<div class="dropdown-container settingsbar-item">
3339
<button class="dropdown-btn">
34-
<span class="fa fa-cog"></span>
40+
<span class="fa-solid fa-gear"></span>
3541
Switches
3642
</button>
3743
<div id="{{ w.id }}.settings-bar.compiler-switches" class="dropdown-content compiler-switches">
@@ -45,7 +51,7 @@
4551
</span>
4652
<span class="compiler-switch-help">
4753
<button id="{{ w.id }}.settings-bar.compiler-switches-help.{{ sw }}" type="button" title="{{ w.switch_description[sw] }}">
48-
<span class="fa fa-question-circle"></span>
54+
<span class="fa-solid fa-circle-question"></span>
4955
</button>
5056
</span>
5157
</div>
@@ -57,11 +63,11 @@
5763
</div>
5864

5965
<button id="{{ w.id }}.settings-bar.reset-btn" type="button" class="settingsbar-item reset-btn" title="Reset editor to default state">
60-
<span class="fa fa-undo"></span>
66+
<span class="fa-solid fa-rotate-left"></span>
6167
Reset
6268
</button>
6369
<button id="{{ w.id }}.settings-bar.download-btn" type="button" class="settingsbar-item download-btn" title="Download source files">
64-
<span class="fa fa-download"></span>
70+
<span class="fa-solid fa-download"></span>
6571
Download
6672
</button>
6773
</div>

0 commit comments

Comments
 (0)