diff --git a/conda_sphinx_theme/_version.py b/conda_sphinx_theme/_version.py index 3984f09..97423d2 100644 --- a/conda_sphinx_theme/_version.py +++ b/conda_sphinx_theme/_version.py @@ -4,5 +4,5 @@ # Copyright (c) conda-incubator. # Distributed under the terms of the Modified BSD License. -version_info = (0, 2, 1) +version_info = (0, 3, 0) __version__ = ".".join(map(str, version_info)) diff --git a/conda_sphinx_theme/layout.html b/conda_sphinx_theme/layout.html index e11845a..2ca15b6 100644 --- a/conda_sphinx_theme/layout.html +++ b/conda_sphinx_theme/layout.html @@ -2,7 +2,7 @@ # a default mode has been set. This also improves compatibility when JavaScript is disabled. #} {% set html_tag %} - + {% endset %} {%- extends "basic/layout.html" %} {%- import "static/webpack-macros.html" as _webpack with context %} @@ -24,22 +24,33 @@ {% set remove_sidebar_secondary = (meta is defined and meta is not none and 'html_theme.sidebar_secondary.remove' in meta) or not theme_secondary_sidebar_items %} +{# Note: secondary_sidebar_items is an array set by set_secondary_sidebar_items() in utils.py #} +{% set remove_sidebar_secondary = (meta is defined and meta is not none and 'html_theme.sidebar_secondary.remove' in meta) or secondary_sidebar_items|length == 0 %} {%- block css %} {# The data-cfasync attribute disables CloudFlare's Rocket loader so that #} {# mode/theme are correctly set before the browser renders the page. #} {# https://github.com/pydata/pydata-sphinx-theme/pull/1045 #} + + {{ _webpack.head_pre_assets() }} - {{ _webpack.head_pre_icons() }} {{- css() }} {{ _webpack.head_js_preload() }} {%- endblock css %} {%- block extrahead %} + {%- if last_updated %} {%- endif %} @@ -51,7 +62,7 @@ {# A button hidden by default to help assistive devices quickly jump to main content #} {# ref: https://www.youtube.com/watch?v=VUR0I5mqq7I #} - {{ _("Skip to main content") }} +
{%- endblock %} @@ -59,56 +70,51 @@ {# A tiny helper pixel to detect if we've scrolled #} + {%- if theme_back_to_top_button %} {# the scroll to top button #} + {%- endif %} - {# checkbox to toggle primary sidebar #} - - - {# Checkboxes to toggle the secondary sidebar #} - - {# A search field pop-up that will only show when the search button is clicked #} - - {%- if theme_announcement -%} - {% include "sections/announcement.html" %} - {%- endif %} + + + {% include "sections/announcement.html" %} + {% block docs_navbar %} - + {% endblock docs_navbar %} +