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

🐛 FIX: Fix translation for prev/next #384

Merged
merged 1 commit into from
Aug 22, 2021
Merged
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
13 changes: 7 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
project = "Sphinx Book Theme"
copyright = "2020"
author = "the Executable Book Project"
# language = "fr" # For testing language translations

master_doc = "index"

Expand All @@ -13,17 +14,17 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"ablog",
"myst_nb",
"sphinx_copybutton",
"sphinx_togglebutton",
"sphinxcontrib.bibtex",
"sphinx_thebe",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
"ablog",
"sphinxext.opengraph",
"sphinx_copybutton",
"sphinx_design",
"sphinx_thebe",
"sphinx_togglebutton",
"sphinxcontrib.bibtex",
"sphinxext.opengraph",
]

# Add any paths that contain templates here, relative to this directory.
Expand Down
8 changes: 4 additions & 4 deletions sphinx_book_theme/_templates/prev-next.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
{% macro prev_next(prev, next, prev_title='', next_title='') %}
{%- if prev %}
<div id="prev">
<a class="left-prev" href="{{ prev.link|e }}" title="{{ _('previous page')}}">
<p class="prevnext-label">{{ _("Previous") }}</p>
<a class="left-prev" href="{{ prev.link|e }}" title="{{ _('previous') }} {{ _('page') }}">
<p class="prevnext-label">{{ _("previous") }}</p>
<p class="prevnext-title">{{ prev_title or prev.title }}</p>
</a>
</div>
{%- endif %}
{%- if next %}
<div id="next">
<a class="right-next" href="{{ next.link|e }}" title="{{ _('next page')}}">
<p class="prevnext-label">{{ _("Next") }}</p>
<a class="right-next" href="{{ next.link|e }}" title="{{ _('next') }} {{ _('page') }}">
<p class="prevnext-label">{{ _("next") }}</p>
<p class="prevnext-title">{{ next_title or next.title }}</p>
</a>
</div>
Expand Down

Large diffs are not rendered by default.

This file was deleted.

2 changes: 1 addition & 1 deletion sphinx_book_theme/theme.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
inherit = pydata_sphinx_theme
pygments_style = tango
sidebars = sidebar-logo.html, search-field.html, sbt-sidebar-nav.html, sbt-sidebar-footer.html
stylesheet = sphinx-book-theme.dd8a4f5287ddc68736086b9b254b134e.css
stylesheet = sphinx-book-theme.87c02ae37f56c4029642757f348b8259.css

[options]
single_page = False
Expand Down
3 changes: 1 addition & 2 deletions src/scss/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ main.bd-content {
margin-bottom: 1em;

.right-next, .left-prev {
padding: 0;
border: none;

p {
Expand All @@ -88,7 +87,7 @@ main.bd-content {
}

.prevnext-title {
font-size: 1.1em;
font-size: 1.2em;
color: rgba(var(--pst-color-link), 1);
font-weight: 500;
}
Expand Down