Skip to content

Commit

Permalink
theme.conf root_icon and root_icon_alt_text variables interpolated in…
Browse files Browse the repository at this point in the history
… layout.html

This fixes a partial integration of root_icon and adds the new variable root_icon_alt_text
  • Loading branch information
mbudisic committed Jan 10, 2024
1 parent 137681f commit 099019d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python_docs_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h3>{{ _('Navigation') }}</h3>
</li>
{%- endfor %}
{%- block rootrellink %}
<li><img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
<li><img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="{{theme_root_icon_alt_text}}" style="vertical-align: middle; margin-top: -1px"/></li>
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
<li class="switchers">
<div class="language_switcher_placeholder"></div>
Expand Down Expand Up @@ -100,7 +100,7 @@ <h3>{{ _('Navigation') }}</h3>
</label>
<span class="nav-items-wrapper">
<a href="{{ theme_root_url }}" class="nav-logo">
<img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="Logo"/>
<img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="{{theme_root_icon_alt_text}}"/>
</a>
<span class="version_switcher_placeholder"></span>
{%- if pagename != "search" and builder != "singlehtml" %}
Expand Down
1 change: 1 addition & 0 deletions python_docs_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ root_name = Python
root_url = https://www.python.org/
root_icon = py.svg
root_include_title = True
root_icon_alt_text = Python Logo
copyright_url =

0 comments on commit 099019d

Please sign in to comment.