-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
81 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{% extends "sphinx_rtd_theme/breadcrumbs.html" %} | ||
|
||
{% block breadcrumbs %} | ||
{# Separators between <li>s are added by CSS. #} | ||
|
||
{# | ||
Breadcrumbs always start with home icon pointing to the main Nextstrain doc | ||
project. | ||
|
||
If the current project is the main project, then we don't hardcode the URL | ||
so the currently viewed version/language is preserved (although we don't | ||
use these features currently). | ||
#} | ||
{% if theme_subproject %} | ||
<li><a href="https://docs.nextstrain.org">Home</a></li> | ||
<li><a href="{{ pathto(master_doc) }}">{{ project }}</a></li> | ||
{% else %} | ||
<li><a href="{{ pathto(master_doc) }}">Home</a></li> | ||
{% endif %} | ||
|
||
{# | ||
The parents of the current page, according to the project toctree, without | ||
the root doc (master_doc). | ||
#} | ||
{% for doc in parents %} | ||
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a></li> | ||
{% endfor %} | ||
|
||
{# | ||
Don't include the current page's title (like the template we're extending | ||
does) because the page title is immediately below these breadcrumbs anyway. | ||
|
||
This also follows common UX recommendations for breadcrumbs, e.g. the UK's | ||
Government Digital Service (gov.uk) breadcrumbs component guidelines¹ says: | ||
|
||
The breadcrumb should start with your ‘home’ page and end with the | ||
parent section of the current page. | ||
|
||
¹ https://design-system.service.gov.uk/components/breadcrumbs/ | ||
#} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters