summaryrefslogtreecommitdiff
path: root/project/templates/tags.html
blob: a3edfccd9faa23a912d78e0c3d07b026ed63524e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

{% extends "base.html" %}



{% block title %}Tags{% endblock %}



{% block style %}
    <link href="/css/tags.css" rel="stylesheet">
{% endblock %}



{% block content %}

<h4>Tags</h4>

<ul>
    {%- for tag in tags -%}
        {%- set total = 0 -%}
        {%- for item in articles -%}
            {%- if tag in item.taglist -%}{%- set total = total + 1 -%}{%- endif -%}
            {%- if item == articles | last %}
    <li><a href="/tags/{{ tag }}.html">{{ tag }} ({{ total }})</a></li>
            {%- endif -%}
        {%- endfor -%}
    {%- endfor %}
</ul>

{% endblock %}