Skip to content

Commit

Permalink
Override template to show logo in mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Feb 28, 2024
1 parent b610aa7 commit 39f3394
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ['templates']

# The suffix of source filenames.
source_suffix = '.rst'
11 changes: 11 additions & 0 deletions doc/templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "!layout.html" %}
{% block mobile_nav %}
{%- set _logo_url = logo_url|default(pathto('_static/' + (logo or ""), 1)) %}
{%- set _root_doc = root_doc|default(master_doc) %}
<a href="{{ pathto(_root_doc) }}"{% if not theme_logo_only %} class="icon icon-home"{% endif %}>
{% if not theme_logo_only %}{{ project }}{% endif %}
{%- if logo or logo_url %}
<img src="{{ _logo_url }}" class="logo" alt="{{ _('Logo') }}"/>
{%- endif %}
</a>
{% endblock %}

0 comments on commit 39f3394

Please sign in to comment.