Skip to content

Commit

Permalink
Previous and next link (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
MakotoE authored Nov 13, 2023
1 parent 93c6e7a commit eb229d1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions _static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,13 @@ h1 {
font-size: 2rem;
font-family: 'Roboto', 'Noto Sans JP', sans-serif;
font-weight: 700;
}

.nextprevious {
display: flex;
justify-content: space-between;
}

.nextprevious p {
margin: 0 20px
}
7 changes: 7 additions & 0 deletions _themes/piccolo_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ <h3 id="searchlabel">{{ _('Quick search') }}</h3>
</div>

{{ super() }}

{%- if prev and next and ('macro/features' in pagename or 'macro/tutorial' in pagename) and '/index' not in pagename -%}
<div class="nextprevious">
<p><a href="{{ prev.link|e }}">{{ _('Previous topic') }}: {{ prev.title }}</a></p>
<p><a href="{{ next.link|e }}">{{ _('Next topic') }}: {{ next.title }}</a></p>
</div>
{%- endif -%}
{% endblock %}


Expand Down

0 comments on commit eb229d1

Please sign in to comment.