Skip to content

Commit 71c60de

Browse files
Merge pull request #1244 from AdaCore/revert-theme-change
Revert theme change
2 parents 89235a5 + 406b1f8 commit 71c60de

File tree

16 files changed

+848
-188
lines changed

16 files changed

+848
-188
lines changed

frontend/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
coverage==7.9.1
22
docutils==0.21.2
3-
furo==2024.8.6
43
graphviz==0.21
54
ipython==9.3.0
65
pdf2image==1.17.0
@@ -10,6 +9,7 @@ Pygments==2.19.2
109
pyparsing==3.2.3
1110
Sphinx==8.2.3
1211
sphinx-reredirects==1.0.0
12+
sphinx-rtd-theme==3.0.2
1313
sphinxcontrib-bibtex==2.6.5
1414
sphinxcontrib-plantuml==0.30
1515
websocket-client==1.8.0

frontend/requirements_frozen.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ coverage==7.9.1
88
decorator==5.2.1
99
docutils==0.21.2
1010
executing==2.2.0
11-
furo==2024.8.6
1211
graphviz==0.21
1312
idna==3.10
1413
imagesize==1.4.1
@@ -36,15 +35,18 @@ PyYAML==6.0.2
3635
requests==2.32.4
3736
roman-numerals-py==3.1.0
3837
setuptools==80.9.0
38+
six==1.17.0
3939
snowballstemmer==3.0.1
4040
soupsieve==2.7
4141
Sphinx==8.2.3
4242
sphinx-basic-ng==1.0.0b2
4343
sphinx-reredirects==1.0.0
44+
sphinx-rtd-theme==3.0.2
4445
sphinxcontrib-applehelp==2.0.0
4546
sphinxcontrib-bibtex==2.6.5
4647
sphinxcontrib-devhelp==2.0.0
4748
sphinxcontrib-htmlhelp==2.1.0
49+
sphinxcontrib-jquery==4.1
4850
sphinxcontrib-jsmath==1.0.1
4951
sphinxcontrib-plantuml==0.30
5052
sphinxcontrib-qthelp==2.0.0
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<footer>
2+
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
3+
{#- Translators: This is an ARIA section label for the footer section of the page. -#}
4+
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
5+
{%- if prev %}
6+
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> {{ _('Previous') }}</a>
7+
{%- endif %}
8+
{%- if next %}
9+
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
10+
{%- endif %}
11+
</div>
12+
{%- endif %}
13+
14+
<hr/>
15+
16+
<div role="contentinfo">
17+
{%- block contentinfo %}
18+
<p>
19+
20+
<div class="legal">
21+
22+
{%- if show_copyright %}
23+
{%- if hasdoc('copyright') %}
24+
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
25+
{%- else %}
26+
{%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
27+
{%- endif %}
28+
{%- endif %}
29+
30+
&nbsp;&nbsp;
31+
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/80x15.png" /></a>
32+
<br>
33+
<a href="https://www.adacore.com/company/legal">Legal</a>
34+
&nbsp; | &nbsp;
35+
<a href="https://www.adacore.com/company/privacy">Privacy Policy</a>
36+
&nbsp; | &nbsp;
37+
<a href="https://github.com/AdaCore/learn/issues">Report an Issue</a>
38+
</div>
39+
40+
{%- if build_id and build_url %}
41+
<span class="build">
42+
{#- Translators: Build is a noun, not a verb -#}
43+
{%- trans %}Build{% endtrans -%}
44+
<a href="{{ build_url }}">{{ build_id }}</a>.
45+
</span>
46+
{%- elif commit %}
47+
<span class="commit">
48+
{#- Translators: the phrase "revision" comes from Git, referring to a commit #}
49+
{%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
50+
</span>
51+
{%- endif %}
52+
{%- if last_updated %}
53+
<span class="lastupdated">
54+
{%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
55+
</span>
56+
{%- endif -%}
57+
58+
</p>
59+
{%- endblock %}
60+
</div>
61+
62+
{% if show_sphinx %}
63+
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
64+
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
65+
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
66+
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
67+
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
68+
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
69+
{#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
70+
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
71+
{% endif %}
72+
73+
{%- block extrafooter %} {% endblock %}
74+
75+
</footer>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{% extends "!layout.html" %}
2+
3+
{%- block extrahead %}
4+
{% include "analytics.html" %}
5+
{% include "metatags.html" %}
6+
{% endblock %}
7+
8+
{% block extrabody %}
9+
<!-- Google Tag Manager (noscript) -->
10+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KD5HNRR"
11+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
12+
<!-- End Google Tag Manager (noscript) -->
13+
<!-- LinkedIn Tracking Tags (noscript) -->
14+
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=482585&fmt=gif" /> </noscript>
15+
<!-- End LinkedIn Tracking Tags (noscript) -->
16+
{% endblock %}
17+
18+
{%- block mobile_nav %}
19+
<i data-toggle="wy-nav-top" class="fas fa-bars"></i>
20+
{%- if logo and theme_logo_only %}
21+
<a href="{{ pathto(master_doc) }}">
22+
{%- else %}
23+
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
24+
{%- endif %}
25+
26+
{%- if logo %}
27+
{#- Not strictly valid HTML, but it's the only way to display/scale
28+
it properly, without weird scripting or heaps of work
29+
#}
30+
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
31+
{%- endif %}
32+
</a>
33+
{%- endblock %}
34+
35+
{% block footer %}
36+
<button id="scrollToTopBtn" title="Go to top"><i class="fas fa-caret-square-up"></i></button>
37+
38+
<script type="text/javascript">
39+
jQuery(function () {
40+
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
41+
});
42+
</script>
43+
{% endblock %}

frontend/sphinx/conf.py

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

183184
# The name of the Pygments (syntax highlighting) style to use.
184185
pygments_style = 'sphinx'
185-
pygments_dark_style = "monokai"
186186

187187
nitpicky = True
188188

@@ -232,7 +232,8 @@ def get_file_from_conf_ini(path_to_file):
232232
# The theme to use for HTML and HTML Help pages. See the documentation for
233233
# a list of builtin themes.
234234
#
235-
html_theme = 'furo'
235+
#html_theme = 'learn_theme'
236+
html_theme = 'sphinx_rtd_theme'
236237

237238
if 'GEN_LEARN_SITE' in os.environ and os.environ['GEN_LEARN_SITE'] == "yes":
238239
html_title = "learn.adacore.com"
@@ -244,32 +245,24 @@ def get_file_from_conf_ini(path_to_file):
244245

245246
html_theme_path = ['.'] # make sphinx search for themes in current dir
246247

247-
html_css_files = [
248-
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css",
249-
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css",
250-
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css",
251-
]
252-
253248
# Theme options are theme-specific and customize the look and feel of a theme
254249
# further. For a list of options available for each theme, see the
255250
# documentation.
256251
#
257252
html_theme_options = {
258-
# furo options
259-
260-
# 'light_css_variables': {
261-
# },
262-
# 'dark_css_variables': {
263-
# }
264-
'sidebar_hide_name': True,
265-
'navigation_with_keys': True,
266-
'top_of_page_buttons': ["view", "edit"],
267-
# 'announcement': "",
268-
# 'footer_icons': [],
269-
270-
"source_repository": "https://github.com/AdaCore/learn",
271-
"source_branch": "master",
272-
"source_directory": "content/",
253+
'logo_only': True,
254+
'flyout_display': 'hidden',
255+
'version_selector': False,
256+
'prev_next_buttons_location': 'bottom',
257+
'style_external_links': False,
258+
'vcs_pageview_mode': '',
259+
# 'style_nav_header_background': 'white',
260+
# Toc options
261+
'collapse_navigation': False,
262+
'sticky_navigation': False,
263+
'navigation_depth': 4,
264+
'includehidden': True,
265+
'titles_only': False
273266
}
274267

275268
html_show_sphinx = False
@@ -278,9 +271,6 @@ def get_file_from_conf_ini(path_to_file):
278271
html_logo = "img/logo.svg"
279272
else:
280273
html_logo = "img/logo_sandbox.svg"
281-
html_theme_options["announcement"] = \
282-
"<p>⚠️ This version of the website contains UNPUBLISHED contents. " \
283-
"⚠️</p>"
284274

285275
html_favicon = "img/favicon.ico"
286276

frontend/sphinx/img/favicon.ico

0 Bytes
Binary file not shown.
-84.7 KB
Loading

frontend/sphinx/img/logo.png

4.31 KB
Loading

0 commit comments

Comments
 (0)