Implementing tag filters

This commit is contained in:
Lucas Cimon
2017-08-14 22:18:28 +02:00
parent 89ff3dee70
commit 8d5d7491bc
9 changed files with 78 additions and 50 deletions

View File

@@ -1,12 +1,22 @@
{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block header_extra %}
{% if MG_FILTER_TAGS %}
{% for filter_tag in MG_FILTER_TAGS %}
<button class="mg-tag-filter" onclick="toggleTagFilter('{{ filter_tag }}')">{{ filter_tag.replace('lang:', '') }}</button>
{% endfor %}
{% endif %}
{% endblock %}
{% block content %}
<div class="uk-width-medium-4-5">
{% if articles %}
{% for article in (articles_page.object_list if articles_page else articles) %}
{% if loop.index == 1 %}
{% if not MG_NO_EXCERPT and loop.index == 1 %}
{% include "partials/article-excerpt.html" %}
{% else %}
{% include "partials/article-short.html" %}