-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ee8349
commit 5f1ff5c
Showing
4 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
nikola/data/themes/base-jinja/templates/archive_navigation_helper.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
{# -*- coding: utf-8 -*- #} | |||
|
|||
{% macro archive_navigation() %} | |||
{% if 'archive_page' in pagekind %} | |||
{% if has_archive_navigation %} | |||
<nav class="archivenav"> | |||
<ul class="pager"> | |||
{% if previous_archive %} | |||
<li class="previous"><a href="{{ previous_archive }}" rel="prev">{{ messages("Previous") }}</a></li> | |||
{% else %} | |||
<li class="previous disabled"><a href="#" rel="prev">{{ messages("Previous") }}</a></li> | |||
{% endif %} | |||
{% if up_archive %} | |||
<li class="up"><a href="{{ up_archive }}" rel="up">{{ messages("Up") }}</a></li> | |||
{% else %} | |||
<li class="up disabled"><a href="#" rel="up">{{ messages("Up") }}</a></li> | |||
{% endif %} | |||
{% if next_archive %} | |||
<li class="next"><a href="{{ next_archive }}" rel="next">{{ messages("Next") }}</a></li> | |||
{% else %} | |||
<li class="next disabled"><a href="#" rel="next">{{ messages("Next") }}</a></li> | |||
{% endif %} | |||
</ul> | |||
</nav> | |||
{% endif %} | |||
{% endif %} | |||
{% endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,13 +1,18 @@ | |||
{# -*- coding: utf-8 -*- #} | {# -*- coding: utf-8 -*- #} | ||
{% extends 'index.tmpl' %} | {% extends 'index.tmpl' %} | ||
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %} | |||
|
|
||
{% block extra_head %} | {% block extra_head %} | ||
{{ super() }} | {{ super() }} | ||
{% if translations|length > 1 and generate_atom %} | {% if translations|length > 1 and generate_atom %} | ||
{% for language in translations|sort %} | {% for language in translations|sort %} | ||
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} section ({{ language }})" href="{{ _link("archive_atom", archive_name, language) }}"> | <link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} archive ({{ language }})" href="{{ _link("archive_atom", archive_name, language) }}"> | ||
{% endfor %} | {% endfor %} | ||
{% elif generate_atom %} | {% elif generate_atom %} | ||
<link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} archive" href="{{ _link("archive_atom", archive_name) }}"> | <link rel="alternate" type="application/atom+xml" title="Atom for the {{ archive_name }} archive" href="{{ _link("archive_atom", archive_name) }}"> | ||
{% endif %} | {% endif %} | ||
{% endblock %} | {% endblock %} | ||
|
|||
{% block content_header %} | |||
{{ archive_nav.archive_navigation() }} | |||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters