-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
4 changed files
with
25 additions
and
11 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
17 changes: 13 additions & 4 deletions
17
src/sunpy_sphinx_theme/theme/sunpy/components/navbar_start.html
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 |
---|---|---|
@@ -1,6 +1,15 @@ | ||
<a class="navbar-brand" href="{{ sst_pathto('.', 2) }}"> | ||
{%- block sidebarlogo %} | ||
{%- if logo %}<span><img src="{{ pathto('_static/' + logo, 1) }}"></span>{%- endif %} | ||
{%- endblock %} | ||
SunPy | ||
{% if theme_sst_logo %} | ||
{# Theme switching is only available when JavaScript is enabled. | ||
# Thus we should add the extra image using JavaScript, defaulting | ||
# depending on the value of default_mode; and light if unset. | ||
#} | ||
{% if default_mode is undefined or default_mode == "auto" %} | ||
{% set default_mode = "light" %} | ||
{% endif %} | ||
{% set js_mode = "light" if default_mode == "dark" else "dark" %} | ||
<img src="{{ pathto('_static/' + theme_sst_logo[default_mode], 1) }}" class="logo__image only-{{ default_mode }}" alt="{{ alt }}"/> | ||
<script>document.write(`<img src="{{ pathto('_static/' + theme_sst_logo[js_mode], 1) }}" class="logo__image only-{{ js_mode }}" alt="{{ theme_sst_logo.get('alt', '') }}"/>`);</script> | ||
{% endif %} | ||
{{ theme_sst_project_name }} | ||
</a> |
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