Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbeb868f

Browse files
mbudisichugovkezio-melottiAA-Turner
authored
Consistently referencetheme_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 parent45793b5 commitbeb868f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎python_docs_theme/layout.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ <h3>{{ _('Navigation') }}</h3>
1414
</li>
1515
{%- endfor %}
1616
{%- block rootrellink %}
17-
<li><imgsrc="{{ pathto('_static/py.svg', 1) }}"alt="python logo"style="vertical-align: middle; margin-top: -1px"/></li>
17+
<li><imgsrc="{{ pathto('_static/' ~ theme_root_icon, 1) }}"alt="{{ theme_root_icon_alt_text }}"style="vertical-align: middle; margin-top: -1px"/></li>
1818
<li><ahref="{{theme_root_url}}">{{theme_root_name}}</a>{{ reldelim1 }}</li>
1919
<liclass="switchers">
2020
<divclass="language_switcher_placeholder"></div>
@@ -71,7 +71,7 @@ <h3>{{ _('Navigation') }}</h3>
7171

7272
{%- block extrahead -%}
7373
<linkrel="stylesheet"href="{{ pathto('_static/pydoctheme_dark.css', 1) }}"media="(prefers-color-scheme: dark)"id="pydoctheme_dark_css">
74-
<linkrel="shortcut icon"type="image/png"href="{{ pathto('_static/'+ theme_root_icon, 1) }}"/>
74+
<linkrel="shortcut icon"type="image/png"href="{{ pathto('_static/'~ theme_root_icon, 1) }}"/>
7575
{%- if builder != "htmlhelp" %}
7676
{%- if not embedded %}
7777
<scripttype="text/javascript"src="{{ pathto('_static/copybutton.js', 1) }}"></script>
@@ -100,7 +100,7 @@ <h3>{{ _('Navigation') }}</h3>
100100
</label>
101101
<spanclass="nav-items-wrapper">
102102
<ahref="{{ theme_root_url }}"class="nav-logo">
103-
<imgsrc="{{ pathto('_static/py.svg', 1) }}"alt="Logo"/>
103+
<imgsrc="{{ pathto('_static/' ~ theme_root_icon, 1) }}"alt="{{ theme_root_icon_alt_text }}"/>
104104
</a>
105105
<spanclass="version_switcher_placeholder"></span>
106106
{%- if pagename != "search" and builder != "singlehtml" %}
@@ -121,7 +121,7 @@ <h3>{{ _('Navigation') }}</h3>
121121
{%- if logo %}
122122
<pclass="logo">
123123
<ahref="{{ pathto('index') }}">
124-
<imgclass="logo"src="{{ pathto('_static/'+ logo, 1)|e }}"alt="Logo"/>
124+
<imgclass="logo"src="{{ pathto('_static/'~ logo, 1)|e }}"alt="Logo"/>
125125
</a>
126126
</p>
127127
{%- endif %}

‎python_docs_theme/theme.conf

Lines changed: 1 addition & 0 deletions
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)

[8]ページ先頭

©2009-2025 Movatter.jp