Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Moved subcategories header from index.tmpl to tagindex.tmpl where it …
…belongs.
  • Loading branch information
felixfontein committed May 10, 2015
1 parent 1de2d7c commit 2eb7bbc
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
9 changes: 1 addition & 8 deletions nikola/data/themes/base-jinja/templates/index.tmpl
Expand Up @@ -11,14 +11,7 @@
{% endblock %}

{% block content %}
{% if subcategories %}
{{ messages('Subcategories:') }}
<ul>
{% for name, link in subcategories %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% block content_header %}{% endblock %}
<div class="postindex">
{% for post in posts %}
<article class="h-entry post-{{ post.meta('type') }}">
Expand Down
11 changes: 11 additions & 0 deletions nikola/data/themes/base-jinja/templates/tagindex.tmpl
@@ -1,6 +1,17 @@
{# -*- coding: utf-8 -*- #}
{% extends 'index.tmpl' %}

{% block content_header %}
{% if subcategories %}
{{ messages('Subcategories:') }}
<ul>
{% for name, link in subcategories %}
<li><a href="{{ link }}">{{ name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

{% block extra_head %}
{{ super() }}
{% if translations|length > 1 and generate_atom %}
Expand Down
9 changes: 1 addition & 8 deletions nikola/data/themes/base/templates/index.tmpl
Expand Up @@ -11,14 +11,7 @@
</%block>

<%block name="content">
%if subcategories:
${messages('Subcategories:')}
<ul>
%for name, link in subcategories:
<li><a href="${link}">${name}</a></li>
%endfor
</ul>
%endif
<%block name="content_header"></%block>
<div class="postindex">
% for post in posts:
<article class="h-entry post-${post.meta('type')}">
Expand Down
11 changes: 11 additions & 0 deletions nikola/data/themes/base/templates/tagindex.tmpl
@@ -1,6 +1,17 @@
## -*- coding: utf-8 -*-
<%inherit file="index.tmpl"/>

<%block name="content_header">
%if subcategories:
${messages('Subcategories:')}
<ul>
%for name, link in subcategories:
<li><a href="${link}">${name}</a></li>
%endfor
</ul>
%endif
</%block>

<%block name="extra_head">
${parent.extra_head()}
%if len(translations) > 1 and generate_atom:
Expand Down

0 comments on commit 2eb7bbc

Please sign in to comment.