Duplicate the history nav bar on the top of the page

This commit is contained in:
MatthiasSaihttam 2021-10-12 12:54:22 -04:00
parent 9d49698394
commit 0647597ef9
3 changed files with 22 additions and 2 deletions

View File

@ -212,8 +212,13 @@ a {
.history-nav ul {
margin: 0;
padding: 0;
margin-left: 40px;
list-style: none;
}
.history-nav.top ul {
margin-left: 10px;
}
.history-nav li {
display: inline;

View File

@ -15,6 +15,20 @@
{% endblock %}
{% block main %}
{% if not first_page %}
<nav id="page-nav" class="history-nav top" aria-label="History Navigation">
<ul>
{% for page in pages %}
{% if page.slug == current_page %}
<li><span class="current-page">{{ page.formatted_name }}</span></li>
{% else %}
<li><a href="?page={{ page.slug }}">{{ page.formatted_name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</nav>
{% endif %}
{% load tz %}
{% for thought in thoughts %}
@ -59,7 +73,7 @@
{% endblock %}
{% block footer %}
<nav id="page-nav" class="history-nav" aria-label="History Navigation">
<nav class="history-nav" aria-label="History Navigation">
<ul>
{% for page in pages %}
{% if page.slug == current_page %}

View File

@ -57,7 +57,8 @@ def index(request):
"highlighted": highlighted_uuid,
"authenticated": authenticated,
"pages": pages,
"current_page": requested_slug
"current_page": requested_slug,
"first_page": requested_page == pages[0] # if you're viewing the first page
})