pelican-mg/templates/index.html
2017-10-27 09:00:51 +02:00

48 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block header_text %}<h1>{{ super() }}</h1>{% endblock %}
{% block header_extra %}
{% if MG_LANG_FILTER_TAGS or MG_FILTER_TAGS %}
<ul class="mg-tag-filters">
{% if MG_LANG_FILTER_TAGS %}
<li><button class="mg-tag-filter" onclick='toggleLangTagFilter.bind(this)({{ MG_LANG_FILTER_TAGS|tojson }})' title="Language filter (disabled)">lang</button></li>
{% endif %}
{% if MG_FILTER_TAGS %}
{% for filter_tag in MG_FILTER_TAGS %}
<li><button class="mg-tag-filter" onclick="toggleTagFilter.bind(this)('{{ filter_tag }}')" title="Tag filter (disabled)">{{ filter_tag.replace('lang:', '') }}</button></li>
{% endfor %}
</ul>
{% endif %}
{% endif %}
{% endblock %}
{% block content %}
<div class="uk-width-medium-4-5">
{% if articles %}
<ul class="mg-articles">
{% for article in (articles_page.object_list if articles_page else articles) %}
<li>
{% if not MG_NO_EXCERPT and loop.index == 1 %}
{% include "partials/article-excerpt.html" %}
{% else %}
{% include "partials/article-short.html" %}
{% endif %}
</li>
{% endfor %}
</ul>
{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %}
<ul class="uk-pagination">
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="uk-icon-angle-double-left"></i></a></li>{% endif %}
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}">{{ articles_previous_page.number }}</a></li>{% endif %}
<li class="uk-active"><span>{{ articles_page.number }}</span></li>
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}"><i class="uk-icon-angle-double-right"></i></a></li>{% endif %}
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">{{ articles_next_page.number }}</a></li>{% endif %}
</ul>
{% endif %}
{% endif %}
</div>
{% endblock %}