summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2025-03-11 21:31:07 +0100
committerBaptiste Mispelon <bmispelon@gmail.com>2025-03-11 21:31:07 +0100
commitf1fca5e8a412da1bb8b5ffd11a59eac8579738bb (patch)
tree56507743abab8e2fbdfcf946947febd91b397db7 /docs
parent042023db54dd174d61172b556b39ccf673d010d5 (diff)
Revert "Fixed page header structure and used semantic HTML."
This reverts commit f87e1dbd3c06fe9b1100ddcd06394de5ae338577.
Diffstat (limited to 'docs')
-rw-r--r--docs/templates/base_docs.html2
-rw-r--r--docs/templates/docs/doc.html123
2 files changed, 58 insertions, 67 deletions
diff --git a/docs/templates/base_docs.html b/docs/templates/base_docs.html
index 453818ab..b37574bd 100644
--- a/docs/templates/base_docs.html
+++ b/docs/templates/base_docs.html
@@ -10,7 +10,7 @@
{% endblock %}
{% block header %}
- <p><a href="{% block doc_url %}{% url 'homepage' %}{% endblock %}">{% trans 'Documentation' %}</a></p>
+ <h1><a href="{% block doc_url %}{% url 'homepage' %}{% endblock %}">{% trans 'Documentation' %}</a></h1>
{% search_form %}
{% endblock %}
diff --git a/docs/templates/docs/doc.html b/docs/templates/docs/doc.html
index 44ec5a70..42aede08 100644
--- a/docs/templates/docs/doc.html
+++ b/docs/templates/docs/doc.html
@@ -115,112 +115,103 @@
</div>
{% block body %}
- <article id="docs-content">
+ <div id="docs-content">
{{ doc.body|safe }}
- </article>
+ </div>
{% endblock body %}
{% if doc.prev or doc.next %}
- <nav class="browse-horizontal" aria-labelledby="browse-horizontal-header">
- <span id="browse-horizontal-header" class="visuallyhidden">{% translate "Previous page and next page" %}</span>
+ <div class="browse-horizontal">
{% if doc.prev %}
<div class="left"><a rel="prev" href="{{ doc.prev.link }}"><i class="icon icon-chevron-left"></i> {{ doc.prev.title|safe }}</a></div>
{% endif %}
{% if doc.next %}
<div class="right"><a rel="next" href="{{ doc.next.link }}">{{ doc.next.title|safe }} <i class="icon icon-chevron-right"></i></a></div>
{% endif %}
- </nav>
+ </div>
{% endif %}
{% endblock content %}
{% block content-related %}
+ <h1 class="visuallyhidden">{% trans "Additional Information" %}</h1>
<div role="complementary">
- <h2 class="visuallyhidden" id="aside-header">{% translate "Additional Information" %}</h2>
{% donation_snippet %}
{% block toc-wrapper %}
- <h3>{% trans "Contents" %}</h3>
+ <h2>{% trans "Contents" %}</h2>
{% block toc %}
{{ doc.toc|safe }}
{% endblock toc %}
{% endblock toc-wrapper %}
{% block browse-wrapper %}
- <nav aria-labelledby="browse-header">
- <h3 id="browse-header">{% trans "Browse" %}</h3>
- <ul>
- {% block browse %}
- {% if doc.prev %}
- <li>{% trans "Prev:" %} <a rel="prev" href="{{ doc.prev.link }}">{{ doc.prev.title|safe }}</a></li>
- {% endif %}
- {% if doc.next %}
- <li>{% trans "Next:" %} <a rel="next" href="{{ doc.next.link }}">{{ doc.next.title|safe }}</a></li>
- {% endif %}
- <li><a href="{% url 'document-detail' lang=lang version=version url="contents" host 'docs' %}">{% trans "Table of contents" %}</a></li>
- {% for doc, title, accesskey, shorttitle in env.rellinks %}
- <li><a href="{% url 'document-detail' lang=lang version=version url=doc host 'docs' %}">{{ title }}</a></li>
- {% endfor %}
- {% endblock browse %}
- </ul>
- </nav>
+ <h2>{% trans "Browse" %}</h2>
+ <ul>
+ {% block browse %}
+ {% if doc.prev %}
+ <li>{% trans "Prev:" %} <a rel="prev" href="{{ doc.prev.link }}">{{ doc.prev.title|safe }}</a></li>
+ {% endif %}
+ {% if doc.next %}
+ <li>{% trans "Next:" %} <a rel="next" href="{{ doc.next.link }}">{{ doc.next.title|safe }}</a></li>
+ {% endif %}
+ <li><a href="{% url 'document-detail' lang=lang version=version url="contents" host 'docs' %}">{% trans "Table of contents" %}</a></li>
+ {% for doc, title, accesskey, shorttitle in env.rellinks %}
+ <li><a href="{% url 'document-detail' lang=lang version=version url=doc host 'docs' %}">{{ title }}</a></li>
+ {% endfor %}
+ {% endblock browse %}
+ </ul>
{% endblock browse-wrapper %}
{% block breadcrumbs-wrapper %}
- <nav aria-labelledby="breadcrumbs-header">
- <h3 id="breadcrumbs-header">{% trans "You are here:" %}</h3>
- <ul>
- <li>
- <a href="{% url 'document-index' lang=lang version=version host 'docs' %}">{% blocktrans %}Django {{ version }} documentation{% endblocktrans %}</a>
- {% for p in doc.parents %}
- <ul><li><a href="{{ p.link }}">{{ p.title|safe }}</a>
- {% endfor %}
- <ul><li>{% block current-page-title %}{{ doc.title|safe }}{% endblock current-page-title %}</li></ul>
- {% for p in doc.parents %}</li></ul>{% endfor %}
- </li>
- </ul>
- </nav>
+ <h2>{% trans "You are here:" %}</h2>
+ <ul>
+ <li>
+ <a href="{% url 'document-index' lang=lang version=version host 'docs' %}">{% blocktrans %}Django {{ version }} documentation{% endblocktrans %}</a>
+ {% for p in doc.parents %}
+ <ul><li><a href="{{ p.link }}">{{ p.title|safe }}</a>
+ {% endfor %}
+ <ul><li>{% block current-page-title %}{{ doc.title|safe }}{% endblock current-page-title %}</li></ul>
+ {% for p in doc.parents %}</li></ul>{% endfor %}
+ </li>
+ </ul>
{% endblock breadcrumbs-wrapper %}
{% block help-wrapper %}
- <section aria-labelledby="getting-help-sidebar">
- <h3 id="getting-help-sidebar">{% trans "Getting help" %}</h3>
- <dl class="list-links">
- <dt><a href="{% url 'document-detail' lang=lang version=version url="faq" host 'docs' %}">{% trans "FAQ" %}</a></dt>
- <dd>{% blocktrans %}Try the FAQ — it's got answers to many common questions.{% endblocktrans %}</dd>
+ <h2 id="getting-help-sidebar">{% trans "Getting help" %}</h2>
+ <dl class="list-links">
+ <dt><a href="{% url 'document-detail' lang=lang version=version url="faq" host 'docs' %}">{% trans "FAQ" %}</a></dt>
+ <dd>{% blocktrans %}Try the FAQ — it's got answers to many common questions.{% endblocktrans %}</dd>
- <dt><a href="/en/stable/genindex/">{% trans "Index" %}</a>, <a href="/en/stable/py-modindex/">{% trans "Module Index" %}</a>, or <a href="/en/stable/contents/">{% trans "Table of Contents" %}</a></dt>
- <dd>{% blocktrans %}Handy when looking for specific information.{% endblocktrans %}</dd>
+ <dt><a href="/en/stable/genindex/">{% trans "Index" %}</a>, <a href="/en/stable/py-modindex/">{% trans "Module Index" %}</a>, or <a href="/en/stable/contents/">{% trans "Table of Contents" %}</a></dt>
+ <dd>{% blocktrans %}Handy when looking for specific information.{% endblocktrans %}</dd>
- <dt><a href="https://chat.djangoproject.com">{% trans "Django Discord Server" %}</a></dt>
- <dd>{% blocktrans %}Join the Django Discord Community.{% endblocktrans %}</dd>
+ <dt><a href="https://chat.djangoproject.com">{% trans "Django Discord Server" %}</a></dt>
+ <dd>{% blocktrans %}Join the Django Discord Community.{% endblocktrans %}</dd>
- <dt><a href="https://forum.djangoproject.com/">{% trans "Official Django Forum" %}</a></dt>
- <dd>{% blocktrans %}Join the community on the Django Forum.{% endblocktrans %}</dd>
+ <dt><a href="https://forum.djangoproject.com/">{% trans "Official Django Forum" %}</a></dt>
+ <dd>{% blocktrans %}Join the community on the Django Forum.{% endblocktrans %}</dd>
- <dt><a href="https://code.djangoproject.com/">{% trans "Ticket tracker" %}</a></dt>
- <dd>{% blocktrans %}Report bugs with Django or Django documentation in our ticket tracker.{% endblocktrans %}</dd>
- </dl>
- </section>
+ <dt><a href="https://code.djangoproject.com/">{% trans "Ticket tracker" %}</a></dt>
+ <dd>{% blocktrans %}Report bugs with Django or Django documentation in our ticket tracker.{% endblocktrans %}</dd>
+ </dl>
{% endblock help-wrapper %}
{% block links-wrapper %}
- <section aria-labelledby="links-wrapper-header">
- <h3 id="links-wrapper-header">{% trans "Download:" %}</h3>
- <p>
- {% if version == "dev" %}{% trans "Offline (development version):" %}
- {% else %}{% blocktrans %}Offline (Django {{ version }}):{% endblocktrans %}{% endif %}
- <a href="{{ MEDIA_URL }}docs/django-docs-{{ version }}-{{ lang }}.zip">HTML</a> |
- <a href="https://media.readthedocs.org/pdf/django/{{ rtd_version }}/django.pdf">PDF</a> |
- <a href="https://media.readthedocs.org/epub/django/{{ rtd_version }}/django.epub">ePub</a>
- <br>
- <span class="quiet">
- {% blocktrans %}Provided by <a href="https://readthedocs.org/">Read the Docs</a>.{% endblocktrans %}
- </span>
- </p>
- </section>
+ <h2>{% trans "Download:" %}</h2>
+ <p>
+ {% if version == "dev" %}{% trans "Offline (development version):" %}
+ {% else %}{% blocktrans %}Offline (Django {{ version }}):{% endblocktrans %}{% endif %}
+ <a href="{{ MEDIA_URL }}docs/django-docs-{{ version }}-{{ lang }}.zip">HTML</a> |
+ <a href="https://media.readthedocs.org/pdf/django/{{ rtd_version }}/django.pdf">PDF</a> |
+ <a href="https://media.readthedocs.org/epub/django/{{ rtd_version }}/django.epub">ePub</a>
+ <br>
+ <span class="quiet">
+ {% blocktrans %}Provided by <a href="https://readthedocs.org/">Read the Docs</a>.{% endblocktrans %}
+ </span>
+ </p>
{% endblock links-wrapper %}
</div>
{% endblock content-related %}