diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2021-01-24 08:40:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-24 08:40:56 +0300 |
commit | 0e6a2a9ebd04e43d1d6ce6f8c4ba774989c9078c (patch) | |
tree | 0a1dd82ab734d82c9482dd27f54432f0fae52a76 /sphinx/themes | |
parent | 502c4ee5fbef6bf51fe60cc820b1484471dd1b32 (diff) | |
parent | c50ce99c9d8a68eac9db9ec1501efe3f9d79b95e (diff) |
Merge pull request #8737 from tk0miya/8510_html_logo_url
Allow user to use url to reference html logo & favicon
Diffstat (limited to 'sphinx/themes')
-rw-r--r-- | sphinx/themes/agogo/layout.html | 4 | ||||
-rw-r--r-- | sphinx/themes/basic/layout.html | 8 | ||||
-rw-r--r-- | sphinx/themes/basic/opensearch.xml | 4 | ||||
-rw-r--r-- | sphinx/themes/haiku/layout.html | 4 | ||||
-rw-r--r-- | sphinx/themes/pyramid/layout.html | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/sphinx/themes/agogo/layout.html b/sphinx/themes/agogo/layout.html index 1d9df693b..a8ae6304d 100644 --- a/sphinx/themes/agogo/layout.html +++ b/sphinx/themes/agogo/layout.html @@ -13,9 +13,9 @@ {% block header %} <div class="header-wrapper" role="banner"> <div class="header"> - {%- if logo %} + {%- if logo_url %} <p class="logo"><a href="{{ pathto(master_doc)|e }}"> - <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> + <img class="logo" src="{{ logo_url|e }}" alt="Logo"/> </a></p> {%- endif %} {%- block headertitle %} diff --git a/sphinx/themes/basic/layout.html b/sphinx/themes/basic/layout.html index 8d1e4f608..e35d4e5fe 100644 --- a/sphinx/themes/basic/layout.html +++ b/sphinx/themes/basic/layout.html @@ -51,9 +51,9 @@ <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> {%- block sidebarlogo %} - {%- if logo %} + {%- if logo_url %} <p class="logo"><a href="{{ pathto(master_doc)|e }}"> - <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> + <img class="logo" src="{{ logo_url|e }}" alt="Logo"/> </a></p> {%- endif %} {%- endblock %} @@ -135,8 +135,8 @@ title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}" href="{{ pathto('_static/opensearch.xml', 1) }}"/> {%- endif %} - {%- if favicon %} - <link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1)|e }}"/> + {%- if favicon_url %} + <link rel="shortcut icon" href="{{ favicon_url|e }}"/> {%- endif %} {%- endif %} {%- block linktags %} diff --git a/sphinx/themes/basic/opensearch.xml b/sphinx/themes/basic/opensearch.xml index 0cad2967c..ca7bb5966 100644 --- a/sphinx/themes/basic/opensearch.xml +++ b/sphinx/themes/basic/opensearch.xml @@ -6,8 +6,8 @@ <Url type="text/html" method="get" template="{{ use_opensearch }}/{{ pathto('search') }}?q={searchTerms}"/> <LongName>{{ docstitle|e }}</LongName> -{%- if favicon %} - <Image height="16" width="16" type="image/x-icon">{{ use_opensearch }}/{{ pathto('_static/' + favicon, 1)|e }}</Image> +{%- if favicon_url %} + <Image height="16" width="16" type="image/x-icon">{{ use_opensearch }}/{{ favicon_url|e }}</Image> {%- endif %} {% block extra %} {# Put e.g. an <Image> element here. #} {% endblock %} </OpenSearchDescription> diff --git a/sphinx/themes/haiku/layout.html b/sphinx/themes/haiku/layout.html index 2c2469722..bf76204b1 100644 --- a/sphinx/themes/haiku/layout.html +++ b/sphinx/themes/haiku/layout.html @@ -36,11 +36,11 @@ {%- block haikuheader %} {%- if theme_full_logo != "false" %} <a href="{{ pathto('index') }}"> - <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> + <img class="logo" src="{{ logo_url|e }}" alt="Logo"/> </a> {%- else %} {%- if logo -%} - <img class="rightlogo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> + <img class="rightlogo" src="{{ logo_url|e }}" alt="Logo"/> {%- endif -%} <h1 class="heading"><a href="{{ pathto('index') }}"> <span>{{ shorttitle|e }}</span></a></h1> diff --git a/sphinx/themes/pyramid/layout.html b/sphinx/themes/pyramid/layout.html index 02eec1cfb..097e97407 100644 --- a/sphinx/themes/pyramid/layout.html +++ b/sphinx/themes/pyramid/layout.html @@ -13,7 +13,7 @@ <div class="header" role="banner"> <div class="logo"> <a href="{{ pathto(master_doc)|e }}"> - <img class="logo" src="{{ pathto('_static/' + logo, 1)|e }}" alt="Logo"/> + <img class="logo" src="{{ pathto(logo, 1)|e }}" alt="Logo"/> </a> </div> </div> |