Skip to content

Commit 7c36c8e

Browse files
mbudisicmbudisic
mbudisic
authored andcommitted
theme.conf root_icon and root_icon_alt_text variables interpolated in layout.html
This fixes a partial integration of root_icon and adds the new variable root_icon_alt_text
1 parent 137681f commit 7c36c8e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

python_docs_theme/layout.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3>{{ _('Navigation') }}</h3>
1414
</li>
1515
{%- endfor %}
1616
{%- block rootrellink %}
17-
<li><img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="python logo" style="vertical-align: middle; margin-top: -1px"/></li>
17+
<li><img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="{{theme_root_icon_alt_text}}" style="vertical-align: middle; margin-top: -1px"/></li>
1818
<li><a href="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
1919
<li class="switchers">
2020
<div class="language_switcher_placeholder"></div>
@@ -100,7 +100,7 @@ <h3>{{ _('Navigation') }}</h3>
100100
</label>
101101
<span class="nav-items-wrapper">
102102
<a href="{{ theme_root_url }}" class="nav-logo">
103-
<img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="Logo"/>
103+
<img src="{{ pathto('_static/' + theme_root_icon, 1) }}" alt="{{theme_root_icon_alt_text}}"/>
104104
</a>
105105
<span class="version_switcher_placeholder"></span>
106106
{%- if pagename != "search" and builder != "singlehtml" %}

python_docs_theme/theme.conf

+1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ root_name = Python
3232
root_url = https://www.python.org/
3333
root_icon = py.svg
3434
root_include_title = True
35+
root_icon_alt_text = Python Logo
3536
copyright_url =

0 commit comments

Comments
 (0)