Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version bumping to be compatible with pydata-sphinx-theme>=0.16.0 #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conda_sphinx_theme/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
73 changes: 40 additions & 33 deletions conda_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# a default mode has been set. This also improves compatibility when JavaScript is disabled.
#}
{% set html_tag %}
<html{% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml"{% endif %}{% if language is not none %} lang="{{ language }}"{% endif %} {% if default_mode %}data-theme="{{ default_mode }}"{% endif %}>
<html{% if not html5_doctype %} xmlns="http://www.w3.org/1999/xhtml"{% endif %}{% if language is not none %} lang="{{ language }}"{% endif %} data-content_root="{{ content_root }}" {% if default_mode %}data-theme="{{ default_mode }}"{% endif %}>
{% endset %}
{%- extends "basic/layout.html" %}
{%- import "static/webpack-macros.html" as _webpack with context %}
Expand All @@ -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 #}
<script data-cfasync="false">
document.documentElement.dataset.mode = localStorage.getItem("mode") || "{{ default_mode }}";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "light";
document.documentElement.dataset.theme = localStorage.getItem("theme") || "{{ default_mode }}";
</script>
<!--
this give us a css class that will be invisible only if js is disabled
-->
<noscript>
<style>
.pst-js-only { display: none !important; }

</style>
</noscript>
{{ _webpack.head_pre_assets() }}
{{ _webpack.head_pre_icons() }}
{{- css() }}
{{ _webpack.head_js_preload() }}
{%- endblock css %}
{%- block extrahead %}
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="docsearch:language" content="{{ language }}"/>
<meta name="docsearch:version" content="{{ version }}" />
{%- if last_updated %}
<meta name="docbuild:last-update" content="{{ last_updated | e }}"/>
{%- endif %}
Expand All @@ -51,64 +62,59 @@

{# A button hidden by default to help assistive devices quickly jump to main content #}
{# ref: https://www.youtube.com/watch?v=VUR0I5mqq7I #}
<a class="skip-link" href="#main-content">{{ _("Skip to main content") }}</a>
<div id="pst-skip-link" class="skip-link d-print-none"><a href="#main-content">{{ _("Skip to main content") }}</a></div>

{%- endblock %}

{%- block content %}
{# A tiny helper pixel to detect if we've scrolled #}
<div id="pst-scroll-pixel-helper"></div>

{%- if theme_back_to_top_button %}
{# the scroll to top button #}
<button type="button" class="btn rounded-pill" id="pst-back-to-top">
<i class="fa-solid fa-arrow-up"></i>
{{ _("Back to top") }}
{{- _("Back to top") -}}
</button>
{%- endif %}

{# checkbox to toggle primary sidebar #}
<input type="checkbox"
class="sidebar-toggle"
name="__primary"
id="__primary"/>
<label class="overlay overlay-primary" for="__primary"></label>
{# Checkboxes to toggle the secondary sidebar #}
<input type="checkbox"
class="sidebar-toggle"
name="__secondary"
id="__secondary"/>
<label class="overlay overlay-secondary" for="__secondary"></label>
{# A search field pop-up that will only show when the search button is clicked #}
<div class="search-button__wrapper">
<div class="search-button__overlay"></div>
<div class="search-button__search-container">{% include "../components/search-field.html" %}</div>
</div>
{%- if theme_announcement -%}
{% include "sections/announcement.html" %}
{%- endif %}
<dialog id="pst-search-dialog">
{% include "../components/search-field.html" %}
</dialog>

{% include "sections/announcement.html" %}

{% block docs_navbar %}
<nav class="bd-header navbar navbar-expand-lg bd-navbar">
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none">
{%- include "sections/header.html" %}
</nav>
</header>
{% endblock docs_navbar %}

<div class="bd-container">
<div class="bd-container__inner bd-page-width">
{# Primary sidebar #}
<div class="bd-sidebar-primary bd-sidebar{% if not sidebars %} hide-on-wide{% endif %}">
{# If we have no sidebar TOC, pop the TOC component from the sidebars list #}
{% if suppress_sidebar_toctree(includehidden=theme_sidebar_includehidden | tobool) %}
{% set sidebars = sidebars | reject("in", "sidebar-nav-bs.html") | list %}
{% endif %}
<dialog id="pst-primary-sidebar-modal"></dialog>
<div id="pst-primary-sidebar" class="bd-sidebar-primary bd-sidebar{% if not sidebars %} hide-on-wide{% endif %}">
{% include "sections/sidebar-primary.html" %}
</div>
{# Using an ID here so that the skip-link works #}
<main id="main-content" class="bd-main">
<main id="main-content" class="bd-main" role="main">
{# Main content area #}
{% block docs_main %}
<div class="bd-content">
<div class="bd-article-container">
{# Article header #}
<div class="bd-header-article">{% include "sections/header-article.html" %}</div>
<div class="bd-header-article d-print-none">{% include "sections/header-article.html" %}</div>
{# Article content #}
{% block docs_body %}
{# This is empty and only shows up if text has been highlighted by the URL #}
{% include "components/searchbox.html" %}
<article class="bd-article" role="main">
<article class="bd-article">
{% block body %}{% endblock %}
</article>
{% endblock docs_body %}
Expand All @@ -120,15 +126,16 @@
{% endif %}
{# prev-next buttons #}
{% if theme_show_prev_next %}
<footer class="prev-next-footer">
<footer class="prev-next-footer d-print-none">
{% include "components/prev-next.html" %}
</footer>
{% endif %}
</div>
{# Secondary sidebar #}
{% block docs_toc %}
{% if not remove_sidebar_secondary %}
<div class="bd-sidebar-secondary bd-toc">{% include "sections/sidebar-secondary.html" %}</div>
<dialog id="pst-secondary-sidebar-modal"></dialog>
<div id="pst-secondary-sidebar" class="bd-sidebar-secondary bd-toc">{% include "sections/sidebar-secondary.html" %}</div>
{% endif %}
{% endblock docs_toc %}
</div>
Expand All @@ -152,4 +159,4 @@
{% block header %}{% endblock %}
{% block relbar1 %}{% endblock %}
{% block relbar2 %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}
{% block sidebarsourcelink %}{% endblock %}
1 change: 1 addition & 0 deletions conda_sphinx_theme/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ html, body {

h1, h2, h3, h4, h5, h6 {
font-family: nunito, sans-serif;
font-weight: normal;
}
/** End Custom Fonts **/

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ classifiers = [
"Topic :: Documentation :: Sphinx",
]
dependencies = [
"pydata-sphinx-theme>=0.13.1",
"pydata-sphinx-theme>=0.16.0",
"sphinx-favicon",
]

Expand Down