mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 09:28:31 +02:00
Bring in ReadTheDocs breadcrumb theme and fix display issues around "Docs" root breadcrumb
This commit is contained in:
parent
470c648189
commit
05f2da4a8a
1 changed files with 48 additions and 0 deletions
48
docs_theme/breadcrumbs.html
Normal file
48
docs_theme/breadcrumbs.html
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
<!--
|
||||||
|
Pulled from readthedocs theme in mkdocs source and lightly modified
|
||||||
|
-->
|
||||||
|
|
||||||
|
<div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="{{ nav.homepage.url|url }}" alt="{% trans %}Docs{% endtrans %}">Docs</a> »</li>
|
||||||
|
{%- if page %}
|
||||||
|
{%- for doc in page.ancestors[::-1] %}
|
||||||
|
{%- if doc.link %}
|
||||||
|
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li>
|
||||||
|
{%- else %}
|
||||||
|
<li>{{ doc.title }} »</li>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
<li>{{ page.title }}</li>
|
||||||
|
{%- endif %}
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
{%- block repo %}
|
||||||
|
{%- if page and page.edit_url %}
|
||||||
|
{%- if config.repo_name|lower == 'github' %}
|
||||||
|
<a href="{{ page.edit_url }}" class="icon icon-github"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||||
|
{%- elif config.repo_name|lower == 'bitbucket' %}
|
||||||
|
<a href="{{ page.edit_url }}" class="icon icon-bitbucket"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||||
|
{%- elif config.repo_name|lower == 'gitlab' %}
|
||||||
|
<a href="{{ page.edit_url }}" class="icon icon-gitlab"> {% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||||
|
{%- elif config.repo_name %}
|
||||||
|
<a href="{{ page.edit_url }}">{% trans repo_name=config.repo_name %}Edit on {{ repo_name }}{% endtrans %}</a>
|
||||||
|
{%- else %}
|
||||||
|
<a href="{{ page.edit_url }}">{% trans %}Edit{% endtrans %}</a>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endblock %}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
{%- if config.theme.prev_next_buttons_location|lower in ['top', 'both']
|
||||||
|
and page and (page.next_page or page.previous_page) %}
|
||||||
|
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{% trans %}Breadcrumb Navigation{% endtrans %}">
|
||||||
|
{%- if page.previous_page %}
|
||||||
|
<a href="{{ page.previous_page.url|url }}" class="btn btn-neutral float-left" title="{{ page.previous_page.title }}"><span class="icon icon-circle-arrow-left" aria-hidden="true"></span> {% trans %}Previous{% endtrans %}</a>
|
||||||
|
{%- endif %}
|
||||||
|
{%- if page.next_page %}
|
||||||
|
<a href="{{ page.next_page.url|url }}" class="btn btn-neutral float-right" title="{{ page.next_page.title }}">{% trans %}Next{% endtrans %} <span class="icon icon-circle-arrow-right" aria-hidden="true"></span></a>
|
||||||
|
{%- endif %}
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
|
<hr/>
|
||||||
|
</div>
|
Loading…
Add table
Reference in a new issue