pelican-mg/templates/index.html

51 lines
1.9 KiB
HTML
Raw Permalink Normal View History

2014-12-29 22:08:56 +00:00
{% extends "base.html" %}
2017-08-14 20:18:28 +00:00
2017-10-27 06:55:38 +00:00
{% block header_text %}<h1>{{ super() }}</h1>{% endblock %}
2017-08-14 20:18:28 +00:00
{% block header_extra %}
{% if MG_LANG_FILTER_TAGS or MG_FILTER_TAGS %}
<script>
window.langs = {{ MG_LANG_FILTER_TAGS|tojson }};
</script>
<ul class="mg-tag-filters">
{% if MG_LANG_FILTER_TAGS %}
<li><button id="lang-tag-filter" class="mg-tag-filter" onclick='toggleLangTagFilter.bind(this)()' title="Language filter (disabled)">lang</button></li>
{% endif %}
2017-08-14 20:18:28 +00:00
{% if MG_FILTER_TAGS %}
{% for filter_tag in MG_FILTER_TAGS %}
<li><button id="{{ filter_tag }}-tag-filter" class="mg-tag-filter" onclick="toggleTagFilter.bind(this)('{{ filter_tag }}')" title="Tag filter (disabled)">{{ filter_tag }}</button></li>
2017-08-14 20:18:28 +00:00
{% endfor %}
</ul>
{% endif %}
2017-08-14 20:18:28 +00:00
{% endif %}
{% endblock %}
2014-12-29 22:08:56 +00:00
{% block content %}
2019-05-28 05:48:26 +00:00
<div class="uk-width-4-5@m">
2014-12-29 22:08:56 +00:00
{% if articles %}
<ul class="mg-articles">
{% for article in (articles_page.object_list if articles_page else articles) %}
<li>
2017-08-14 20:18:28 +00:00
{% if not MG_NO_EXCERPT and loop.index == 1 %}
{% include "partials/article-excerpt.html" %}
2015-01-01 20:06:34 +00:00
{% else %}
{% include "partials/article-short.html" %}
2015-01-01 20:06:34 +00:00
{% endif %}
</li>
2014-12-29 22:08:56 +00:00
{% endfor %}
</ul>
2015-01-01 20:06:34 +00:00
{% if DEFAULT_PAGINATION and articles_paginator.num_pages > 1 %}
<ul class="uk-pagination">
2019-05-28 05:42:17 +00:00
{% if articles_previous_page %}<li><a href="{{ SITEURL }}/{{ articles_previous_page.url }}"><i class="fas fa-fast-backward"></i></a></li>{% endif %}
2015-01-01 20:06:34 +00:00
{% 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>
2019-05-28 05:42:17 +00:00
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}"><i class="fas fa-fast-forward"></i></a></li>{% endif %}
2015-01-01 20:06:34 +00:00
{% if articles_next_page %}<li><a href="{{ SITEURL }}/{{ articles_next_page.url }}">{{ articles_next_page.number }}</a></li>{% endif %}
</ul>
{% endif %}
2014-12-29 22:08:56 +00:00
{% endif %}
</div>
{% endblock %}