Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Running jinjify.
  • Loading branch information
felixfontein committed Jun 7, 2017
1 parent 3824f7d commit a6856f1
Show file tree
Hide file tree
Showing 13 changed files with 145 additions and 169 deletions.
13 changes: 6 additions & 7 deletions nikola/data/themes/base-jinja/templates/archiveindex.tmpl
@@ -1,14 +1,13 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %}
{% import 'feed_helper.tmpl' as feed with context %}

{% block extra_head %}
{{ super() }}
{{ feed.head(archive_name) }}
{% endblock %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content_header %}
{{ archive_nav.archive_navigation() }}
{{ parent.content_header() }}
<header>
<h1>{{ title|e }}</h1>
</header>
{{ archive_nav.archive_navigation() }}
{{ translation_links.link(archive) }}
{% endblock %}
10 changes: 2 additions & 8 deletions nikola/data/themes/base-jinja/templates/author.tmpl
@@ -1,12 +1,6 @@
{# -*- coding: utf-8 -*- #}
{% extends 'list_post.tmpl' %}
{% import 'feed_helper.tmpl' as feed with context %}

{% block extra_head %}
{{ super() }}
{{ feed.head(author) }}
{% endblock %}

{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content %}
<article class="authorpage">
Expand All @@ -16,7 +10,7 @@
<p>{{ description }}</p>
{% endif %}
<div class="metadata">
{{ feed.link(author) }}
{{ translation_links.link(author) }}
</div>
</header>
{% if posts %}
Expand Down
14 changes: 10 additions & 4 deletions nikola/data/themes/base-jinja/templates/authorindex.tmpl
@@ -1,8 +1,14 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}
{% import 'feed_helper.tmpl' as feed with context %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block extra_head %}
{{ super() }}
{{ feed.head(author) }}
{% block content_header %}
{{ parent.content_header() }}
<header>
<h1>{{ title|e }}</h1>
{{ translation_links.link(author) }}
{% if description %}
<p>{{ description }}</p>
{% endif %}
</header>
{% endblock %}
8 changes: 4 additions & 4 deletions nikola/data/themes/base-jinja/templates/base_helper.tmpl
@@ -1,5 +1,5 @@
{# -*- coding: utf-8 -*- #}
{% import 'feed_helper.tmpl' as feed with context %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% macro html_headstart() %}
<!DOCTYPE html>
Expand Down Expand Up @@ -42,7 +42,7 @@ lang="{{ lang }}">
{% if meta_generator_tag %}
<meta name="generator" content="Nikola (getnikola.com)">
{% endif %}
{{ feed.head() }}
{{ translation_links.head() }}
<link rel="canonical" href="{{ abs_link(permalink) }}">

{% if favicons %}
Expand Down Expand Up @@ -98,9 +98,9 @@ lang="{{ lang }}">
{% endif %}
{% endmacro %}

{# This function is deprecated; use feed_helper directly. #}
{# This function is deprecated; use translation_link_helper directly. #}
{% macro html_feedlinks() %}
{{ feed.head() }}
{{ translation_links.head() }}
{% endmacro %}

{% macro html_translations() %}
Expand Down
69 changes: 0 additions & 69 deletions nikola/data/themes/base-jinja/templates/feed_helper.tmpl

This file was deleted.

13 changes: 0 additions & 13 deletions nikola/data/themes/base-jinja/templates/index.tmpl
Expand Up @@ -11,23 +11,10 @@
<link rel="prefetch" href="{{ posts[0].permalink() }}" type="text/html">
{% endif %}
{{ math.math_styles_ifposts(posts) }}
{% if has_other_languages and other_languages %}
{% for language, classification, _ in other_languages %}
<link rel="alternate" hreflang="{{ language }}" href="{{ _link(kind, classification, language) }}">
{% endfor %}
{% endif %}
{% endblock %}

{% block content %}
{% block content_header %}
{% if has_other_languages and other_languages %}
<div class="translationslist translations">
<h3 class="translationslist-intro">{{ messages("Also available in:") }}</h3>
{% for language, classification, name in other_languages %}
<p><a href="{{ _link(kind, classification, language) }}" rel="alternate">{{ messages("LANGUAGE", language) }} ({{ name|e }})</a></p>
{% endfor %}
</div>
{% endif %}
{% endblock %}
{% if 'main_index' in pagekind %}
{{ front_index_header }}
Expand Down
18 changes: 2 additions & 16 deletions nikola/data/themes/base-jinja/templates/list.tmpl
@@ -1,29 +1,15 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %}

{% block extra_head %}
{% if has_other_languages and other_languages %}
{% for language, classification, _ in other_languages %}
<link rel="alternate" hreflang="{{ language }}" href="{{ _link(kind, classification, language) }}">
{% endfor %}
{% endif %}
{% endblock %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content %}
<article class="listpage">
<header>
<h1>{{ title|e }}</h1>
</header>
{{ archive_nav.archive_navigation() }}
{% if has_other_languages and other_languages %}
<div class="translationslist translations">
<h3 class="translationslist-intro">{{ messages("Also available in:") }}</h3>
{% for language, classification, name in other_languages %}
<p><a href="{{ _link(kind, classification, language) }}" rel="alternate">{{ messages("LANGUAGE", language) }} ({{ name|e }})</a></p>
{% endfor %}
</div>
{% endif %}
{{ translation_links.link(classification) }}
{% if items %}
<ul class="postlist">
{% for text, link, count in items %}
Expand Down
18 changes: 2 additions & 16 deletions nikola/data/themes/base-jinja/templates/list_post.tmpl
@@ -1,29 +1,15 @@
{# -*- coding: utf-8 -*- #}
{% extends 'base.tmpl' %}
{% import 'archive_navigation_helper.tmpl' as archive_nav with context %}

{% block extra_head %}
{% if has_other_languages and other_languages %}
{% for language, classification, _ in other_languages %}
<link rel="alternate" hreflang="{{ language }}" href="{{ _link(kind, classification, language) }}">
{% endfor %}
{% endif %}
{% endblock %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content %}
<article class="listpage">
<header>
<h1>{{ title|e }}</h1>
</header>
{{ archive_nav.archive_navigation() }}
{% if has_other_languages and other_languages %}
<div class="translationslist translations">
<h3 class="translationslist-intro">{{ messages("Also available in:") }}</h3>
{% for language, classification, name in other_languages %}
<p><a href="{{ _link(kind, classification, language) }}" rel="alternate">{{ messages("LANGUAGE", language) }} ({{ name|e }})</a></p>
{% endfor %}
</div>
{% endif %}
{{ translation_links.link(classification) }}
{% if posts %}
<ul class="postlist">
{% for post in posts %}
Expand Down
9 changes: 2 additions & 7 deletions nikola/data/themes/base-jinja/templates/sectionindex.tmpl
@@ -1,17 +1,12 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}
{% import 'feed_helper.tmpl' as feed with context %}

{% block extra_head %}
{{ super() }}
{{ feed.head(section) }}
{% endblock %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content %}
<div class="sectionindex">
<header>
<h2><a href="{{ _link('section_index', section) }}">{{ title|e }}</a></h2>
{{ feed.link(section) }}
{{ translation_links.link(section) }}
</header>
{{ super() }}
</div>
Expand Down
18 changes: 2 additions & 16 deletions nikola/data/themes/base-jinja/templates/tag.tmpl
@@ -1,12 +1,6 @@
{# -*- coding: utf-8 -*- #}
{% extends 'list_post.tmpl' %}
{% import 'feed_helper.tmpl' as feed with context %}

{% block extra_head %}
{{ super() }}
{{ feed.head(tag) }}
{% endblock %}

{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content %}
<article class="tagpage">
Expand All @@ -24,16 +18,8 @@
</ul>
{% endif %}
<div class="metadata">
{{ feed.link(tag) }}
{{ translation_links.link(tag) }}
</div>
{% if has_other_languages and other_languages %}
<div class="translationslist translations">
<h3 class="translationslist-intro">{{ messages("Also available in:") }}</h3>
{% for language, classification, name in other_languages %}
<p><a href="{{ _link(kind, classification, language) }}" rel="alternate">{{ messages("LANGUAGE", language) }} ({{ name|e }})</a></p>
{% endfor %}
</div>
{% endif %}
</header>
{% if posts %}
<ul class="postlist">
Expand Down
8 changes: 2 additions & 6 deletions nikola/data/themes/base-jinja/templates/tagindex.tmpl
@@ -1,11 +1,12 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}
{% import 'feed_helper.tmpl' as feed with context %}
{% import 'translation_link_helper.tmpl' as translation_links with context %}

{% block content_header %}
{{ parent.content_header() }}
<header>
<h1>{{ title|e }}</h1>
{{ translation_links.link(tag) }}
{% if description %}
<p>{{ description }}</p>
{% endif %}
Expand All @@ -19,8 +20,3 @@
{% endif %}
</header>
{% endblock %}

{% block extra_head %}
{{ super() }}
{{ feed.head(tag) }}
{% endblock %}

0 comments on commit a6856f1

Please sign in to comment.