Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
8ea6689
Revert "Python: remove sphinx-rtd-theme package"
Fabien-Chouteau Jul 1, 2025
c1ca37f
Revert "Sphinx: remove deprecated `html_theme`"
Fabien-Chouteau Jul 1, 2025
ed3b6d8
Revert "Sphinx: change dark mode theme of Pygments extension"
Fabien-Chouteau Jul 1, 2025
07085ae
Revert "Sphinx: remove HTML template for RTD-theme"
Fabien-Chouteau Jul 1, 2025
79c4804
Revert "SCSS: use standard background color for admonition 'In other …
Fabien-Chouteau Jul 1, 2025
2cb7d82
Revert "SCSS: fix font color for output-area"
Fabien-Chouteau Jul 1, 2025
e6f01dc
Revert "SCSS: use standard font color for output_info"
Fabien-Chouteau Jul 1, 2025
bb875c4
Revert "SCSS: add entry for output_console"
Fabien-Chouteau Jul 1, 2025
a264aeb
Revert "SCSS: fix color of code block output"
Fabien-Chouteau Jul 1, 2025
81f7476
Revert "SCSS: fix color of dropdown-menu"
Fabien-Chouteau Jul 1, 2025
c3f2918
Revert "SCSS: fix color of source-code file tabs"
Fabien-Chouteau Jul 1, 2025
3cd077a
Revert "SCSS: fix overlapping of dropdown-menu"
Fabien-Chouteau Jul 1, 2025
8604913
Revert "SCSS: fix color/font/format of compile/run button"
Fabien-Chouteau Jul 1, 2025
5cb8d47
Revert "SCSS: fix color of settings bar"
Fabien-Chouteau Jul 1, 2025
d8a9b51
Revert "Widget: fix rows in settings dropdown menu"
Fabien-Chouteau Jul 1, 2025
d737dab
Revert "SCSS: remove scroll-to-top button"
Fabien-Chouteau Jul 1, 2025
1551c40
Revert "SCSS: remove RTD-theme related information"
Fabien-Chouteau Jul 1, 2025
926cbf1
Revert "SCSS: remove dark-mode version"
Fabien-Chouteau Jul 1, 2025
8d5b061
Revert "Widget: adapt template for Font-Awesome 6"
Fabien-Chouteau Jul 1, 2025
67a719d
Revert "Sphinx: adapt color of logo images to Furo theme"
Fabien-Chouteau Jul 1, 2025
e9caeb9
Revert "Sphinx: reintroduce Font-Awesome"
Fabien-Chouteau Jul 1, 2025
7d87585
Revert "Sphinx: add announcement for learn-sandbox"
Fabien-Chouteau Jul 1, 2025
3a38d17
Revert "Sphinx: add Furo options"
Fabien-Chouteau Jul 1, 2025
94c6013
Revert "Sphinx: replace RTD theme by Furo theme"
Fabien-Chouteau Jul 1, 2025
406b1f8
Revert "Python: introduce Sphinx furo theme package"
Fabien-Chouteau Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
coverage==7.9.1
docutils==0.21.2
furo==2024.8.6
graphviz==0.21
ipython==9.3.0
pdf2image==1.17.0
Expand All @@ -10,6 +9,7 @@ Pygments==2.19.2
pyparsing==3.2.3
Sphinx==8.2.3
sphinx-reredirects==1.0.0
sphinx-rtd-theme==3.0.2
sphinxcontrib-bibtex==2.6.5
sphinxcontrib-plantuml==0.30
websocket-client==1.8.0
4 changes: 3 additions & 1 deletion frontend/requirements_frozen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ coverage==7.9.1
decorator==5.2.1
docutils==0.21.2
executing==2.2.0
furo==2024.8.6
graphviz==0.21
idna==3.10
imagesize==1.4.1
Expand Down Expand Up @@ -36,15 +35,18 @@ PyYAML==6.0.2
requests==2.32.4
roman-numerals-py==3.1.0
setuptools==80.9.0
six==1.17.0
snowballstemmer==3.0.1
soupsieve==2.7
Sphinx==8.2.3
sphinx-basic-ng==1.0.0b2
sphinx-reredirects==1.0.0
sphinx-rtd-theme==3.0.2
sphinxcontrib-applehelp==2.0.0
sphinxcontrib-bibtex==2.6.5
sphinxcontrib-devhelp==2.0.0
sphinxcontrib-htmlhelp==2.1.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-plantuml==0.30
sphinxcontrib-qthelp==2.0.0
Expand Down
75 changes: 75 additions & 0 deletions frontend/sphinx/_templates/footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<footer>
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
{#- Translators: This is an ARIA section label for the footer section of the page. -#}
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
{%- if prev %}
<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>
{%- endif %}
{%- if next %}
<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>
{%- endif %}
</div>
{%- endif %}

<hr/>

<div role="contentinfo">
{%- block contentinfo %}
<p>

<div class="legal">

{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{%- else %}
{%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %}

&nbsp;&nbsp;
<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>
<br>
<a href="https://www.adacore.com/company/legal">Legal</a>
&nbsp; | &nbsp;
<a href="https://www.adacore.com/company/privacy">Privacy Policy</a>
&nbsp; | &nbsp;
<a href="https://github.com/AdaCore/learn/issues">Report an Issue</a>
</div>

{%- if build_id and build_url %}
<span class="build">
{#- Translators: Build is a noun, not a verb -#}
{%- trans %}Build{% endtrans -%}
<a href="{{ build_url }}">{{ build_id }}</a>.
</span>
{%- elif commit %}
<span class="commit">
{#- Translators: the phrase "revision" comes from Git, referring to a commit #}
{%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
</span>
{%- endif %}
{%- if last_updated %}
<span class="lastupdated">
{%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span>
{%- endif -%}

</p>
{%- endblock %}
</div>

{% if show_sphinx %}
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
{#- 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. #}
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
{% endif %}

{%- block extrafooter %} {% endblock %}

</footer>
43 changes: 43 additions & 0 deletions frontend/sphinx/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{% extends "!layout.html" %}

{%- block extrahead %}
{% include "analytics.html" %}
{% include "metatags.html" %}
{% endblock %}

{% block extrabody %}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KD5HNRR"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- LinkedIn Tracking Tags (noscript) -->
<noscript> <img height="1" width="1" style="display:none;" alt="" src="https://dc.ads.linkedin.com/collect/?pid=482585&fmt=gif" /> </noscript>
<!-- End LinkedIn Tracking Tags (noscript) -->
{% endblock %}

{%- block mobile_nav %}
<i data-toggle="wy-nav-top" class="fas fa-bars"></i>
{%- if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{%- else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{%- endif %}

{%- if logo %}
{#- Not strictly valid HTML, but it's the only way to display/scale
it properly, without weird scripting or heaps of work
#}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" alt="{{ _('Logo') }}"/>
{%- endif %}
</a>
{%- endblock %}

{% block footer %}
<button id="scrollToTopBtn" title="Go to top"><i class="fas fa-caret-square-up"></i></button>

<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
});
</script>
{% endblock %}
42 changes: 16 additions & 26 deletions frontend/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def get_file_from_conf_ini(path_to_file):
'sphinx.ext.graphviz',
'sphinx.ext.extlinks',
'widget_extension',
'sphinx_rtd_theme',
'sphinx_reredirects',
'sphinxcontrib.plantuml',
]
Expand Down Expand Up @@ -182,7 +183,6 @@ def get_file_from_conf_ini(path_to_file):

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

nitpicky = True

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

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

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

html_css_files = [
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/fontawesome.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/solid.min.css",
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/brands.min.css",
]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
# furo options

# 'light_css_variables': {
# },
# 'dark_css_variables': {
# }
'sidebar_hide_name': True,
'navigation_with_keys': True,
'top_of_page_buttons': ["view", "edit"],
# 'announcement': "",
# 'footer_icons': [],

"source_repository": "https://github.com/AdaCore/learn",
"source_branch": "master",
"source_directory": "content/",
'logo_only': True,
'flyout_display': 'hidden',
'version_selector': False,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
# 'style_nav_header_background': 'white',
# Toc options
'collapse_navigation': False,
'sticky_navigation': False,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False
}

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

html_favicon = "img/favicon.ico"

Expand Down
Binary file modified frontend/sphinx/img/favicon.ico
Binary file not shown.
Binary file modified frontend/sphinx/img/learn_meta_img.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/sphinx/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading