mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Avoid hard-coding 'index' for the master document in templates (#11801)
This commit is contained in:
parent
246312287e
commit
9c3b50b31c
6
doc/_themes/sphinx13/layout.html
vendored
6
doc/_themes/sphinx13/layout.html
vendored
@ -3,14 +3,14 @@
|
||||
|
||||
{% block extrahead %}
|
||||
{{ super() }}
|
||||
{%- if not embedded and pagename == 'index' %}
|
||||
{%- if not embedded and pagename == root_doc %}
|
||||
<style>.related { display: none; }</style>
|
||||
{%- endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<div class="pageheader">
|
||||
<a href="{{ pathto('index') }}">
|
||||
<a href="{{ pathto(root_doc)|e }}">
|
||||
<img src="{{ pathto('_static/sphinx-logo.svg', resource=True) }}" alt="logo" />
|
||||
</a>
|
||||
<h1>Sphinx</h1>
|
||||
@ -21,7 +21,7 @@
|
||||
<div class="related" role="navigation" aria-label="related navigation">
|
||||
<h3>{{ _('Navigation') }}</h3>
|
||||
<ul>
|
||||
<li><a href="{{ pathto('index') }}">Documentation</a> »</li>
|
||||
<li><a href="{{ pathto(root_doc)|e }}">Documentation</a> »</li>
|
||||
{%- for parent in parents %}
|
||||
<li class="nav-item nav-item-{{ loop.index }}"><a href="{{ parent.link|e }}" {% if loop.last %}{{ accesskey("U") }}{% endif %}>{{ parent.title }}</a>{{ reldelim1 }}</li>
|
||||
{%- endfor %}
|
||||
|
@ -35,14 +35,14 @@
|
||||
<div class="header" role="banner">
|
||||
{%- block haikuheader %}
|
||||
{%- if theme_full_logo != "false" %}
|
||||
<a href="{{ pathto('index') }}">
|
||||
<a href="{{ pathto(root_doc)|e }}">
|
||||
<img class="logo" src="{{ logo_url|e }}" alt="Logo"/>
|
||||
</a>
|
||||
{%- else %}
|
||||
{%- if logo -%}
|
||||
<img class="rightlogo" src="{{ logo_url|e }}" alt="Logo"/>
|
||||
{%- endif -%}
|
||||
<h1 class="heading"><a href="{{ pathto('index') }}">
|
||||
<h1 class="heading"><a href="{{ pathto(root_doc)|e }}">
|
||||
<span>{{ shorttitle|e }}</span></a></h1>
|
||||
<h2 class="heading"><span>{{ title|striptags|e }}</span></h2>
|
||||
{%- endif %}
|
||||
|
@ -23,7 +23,7 @@
|
||||
{% block content %}
|
||||
<div id="content">
|
||||
<div class="header">
|
||||
<h1 class="heading"><a href="{{ pathto('index') }}"
|
||||
<h1 class="heading"><a href="{{ pathto(root_doc)|e }}"
|
||||
title="back to the documentation overview"><span>{{ title|striptags|e }}</span></a></h1>
|
||||
</div>
|
||||
<div class="relnav" role="navigation" aria-label="related navigation">
|
||||
|
Loading…
Reference in New Issue
Block a user