Skip to content
Closed
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ readme = "README.md"

requires-python = ">=3.7"
dependencies = [
"sphinx>=3,<5",
"pydata-sphinx-theme~=0.8.0",
"sphinx>=3,<6",
"pydata-sphinx-theme~=0.9.0",
"pyyaml",
]

Expand Down
2 changes: 1 addition & 1 deletion src/sphinx_book_theme/assets/styles/extensions/_ablog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ul.postlist {
}

// Sidebar rules specifically for ABlog
div.bd-sidebar {
div.bd-sidebar-primary {
h2 {
font-size: 1.5em;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* ReadTheDocs pop-up menu over-rides.
* We nest everything under `.bd-sidebar` so that we use more selective
* We nest everything under `.bd-sidebar-primary` so that we use more selective
* selectors than what RTD CSS uses.
*/
.bd-sidebar {
.bd-sidebar-primary {
// Parent container for everything else
div#rtd-footer-container {
position: sticky;
Expand Down
16 changes: 2 additions & 14 deletions src/sphinx_book_theme/assets/styles/sections/_headers.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
/**
* A few different header CSS rules
*/
.header-item {
width: 100%;
text-align: center;

// Remove this in the headers PR
.header-item {
&:empty {
display: none;
}

&.announcement {
background-color: #616161;
color: white;
padding: 0.4em 12.5%; // Horizontal padding so the width is 75%

@media (max-width: $breakpoint-md) {
// Announcements can take a bit more width on mobile
padding: 0.4em 2%;
}
}
}
26 changes: 0 additions & 26 deletions src/sphinx_book_theme/theme/sphinx_book_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,12 @@
<div class="visually-hidden">Toggle in-page Table of Contents</div>
</label>
<!-- Headers at the top -->
<div class="announcement header-item noprint">
{%- include "sections/announcement.html" -%}
</div>
<div class="header header-item noprint">
{%- include "sections/header.html" -%}
</div>
{{ super() }}
{% endblock %}

<!-- Docs TOC is "d-none d-xl-block col-xl-2" -->
{% block docs_sidebar %}
<!-- Sidebar -->
<div class="bd-sidebar noprint{% if is_single_page %} single-page{% endif %}" id="site-navigation">
{%- if not is_single_page %}
<div class="bd-sidebar__content">
<div class="bd-sidebar__top">
{%- include "sections/sidebar.html" -%}
</div>
<div class="bd-sidebar__bottom">
{% if theme_navbar_footer_text %}{% set theme_extra_navbar=theme_navbar_footer_text %}{% endif %} <!-- To handle the deprecated key -->
{% if theme_extra_navbar %}
<div class="navbar_extra_footer">
{{ theme_extra_navbar }}
</div>
{% endif %}
</div>
</div>
<div id="rtd-footer-container"></div>
{%- endif %}
</div>
{% endblock %}

{% block docs_main %}
<!-- A tiny helper pixel to detect if we've scrolled -->
<div class="sbt-scroll-pixel-helper"></div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{%- if theme_show_prev_next -%}
{# stored in _templates because we inherit from the pydata theme #}
{% include "_templates/prev-next.html" %}
{# Inherited from the pydata theme #}
{% include "components/footer-article/prev-next.html" %}
{%- endif -%}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{# This overrides the pydata theme sidebar template #}
{% block docs_sidebar %}
<!-- Sidebar -->
<div class="bd-sidebar noprint{% if is_single_page %} single-page{% endif %}" id="site-navigation">
{%- if not is_single_page %}
<div class="bd-sidebar__content">
<div class="bd-sidebar__top">
{%- include "sections/sidebar.html" -%}
</div>
<div class="bd-sidebar__bottom">
{% if theme_navbar_footer_text %}{% set theme_extra_navbar=theme_navbar_footer_text %}{% endif %} <!-- To handle the deprecated key -->
{% if theme_extra_navbar %}
<div class="navbar_extra_footer">
{{ theme_extra_navbar }}
</div>
{% endif %}
</div>
</div>
<div id="rtd-footer-container"></div>
{%- endif %}
</div>
{% endblock %}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{# Making this empty so it overrides the pydata theme #}