Skip to content

Commit beb868f

Browse files
mbudisichugovkezio-melottiAA-Turner
authored
Consistently reference theme_root_icon (#163)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent 45793b5 commit beb868f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

python_docs_theme/layout.html

+4-4
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/py.svg', 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>
@@ -71,7 +71,7 @@ <h3>{{ _('Navigation') }}</h3>
7171

7272
{%- block extrahead -%}
7373
<link rel="stylesheet" href="{{ pathto('_static/pydoctheme_dark.css', 1) }}" media="(prefers-color-scheme: dark)" id="pydoctheme_dark_css">
74-
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' + theme_root_icon, 1) }}" />
74+
<link rel="shortcut icon" type="image/png" href="{{ pathto('_static/' ~ theme_root_icon, 1) }}" />
7575
{%- if builder != "htmlhelp" %}
7676
{%- if not embedded %}
7777
<script type="text/javascript" src="{{ pathto('_static/copybutton.js', 1) }}"></script>
@@ -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/py.svg', 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" %}
@@ -121,7 +121,7 @@ <h3>{{ _('Navigation') }}</h3>
121121
{%- if logo %}
122122
<p class="logo">
123123
<a href="{{ pathto('index') }}">
124-
<img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/>
124+
<img class="logo" src="{{ pathto('_static/' ~ logo, 1)|e }}" alt="Logo"/>
125125
</a>
126126
</p>
127127
{%- endif %}

python_docs_theme/theme.conf

+1
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ license_url =
3131
root_name = Python
3232
root_url = https://www.python.org/
3333
root_icon = py.svg
34+
root_icon_alt_text = Python logo
3435
root_include_title = True
3536
copyright_url =

0 commit comments

Comments
 (0)