Skip to content

Commit

Permalink
Running scripts/jinjify.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Dec 26, 2016
1 parent 8ee8349 commit 5f1ff5c
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
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 %}
7 changes: 6 additions & 1 deletion nikola/data/themes/base-jinja/templates/archiveindex.tmpl
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 %}
2 changes: 2 additions & 0 deletions nikola/data/themes/base-jinja/templates/list.tmpl
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,13 @@
{# -*- coding: utf-8 -*- #} {# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %} {% extends 'base.tmpl' %}
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %}


{% block content %} {% block content %}
<article class="listpage"> <article class="listpage">
<header> <header>
<h1>{{ title|e }}</h1> <h1>{{ title|e }}</h1>
</header> </header>
{{ archive_nav.archive_navigation() }}
{% if items %} {% if items %}
<ul class="postlist"> <ul class="postlist">
{% for text, link, count in items %} {% for text, link, count in items %}
Expand Down
2 changes: 2 additions & 0 deletions nikola/data/themes/base-jinja/templates/list_post.tmpl
Original file line number Original file line Diff line number Diff line change
@@ -1,11 +1,13 @@
{# -*- coding: utf-8 -*- #} {# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %} {% extends 'base.tmpl' %}
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %}


{% block content %} {% block content %}
<article class="listpage"> <article class="listpage">
<header> <header>
<h1>{{ title|e }}</h1> <h1>{{ title|e }}</h1>
</header> </header>
{{ archive_nav.archive_navigation() }}
{% if posts %} {% if posts %}
<ul class="postlist"> <ul class="postlist">
{% for post in posts %} {% for post in posts %}
Expand Down

0 comments on commit 5f1ff5c

Please sign in to comment.