blob: 349f575c5275af10aa9466084f902e89786d8902 (
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
35
36
|
{% 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 = { 'value': 0 } -%}
{%- for item in articles -%}
{%- if tag in item.taglist -%}
{%- if total.update({'value': total.value + 1}) -%}{%- endif -%}
{%- endif -%}
{%- if item == articles | last %}
<li><a href="/tags/{{ tag }}.html">{{ tag }} ({{ total.value }})</a></li>
{%- endif -%}
{%- endfor -%}
{%- endfor %}
</ul>
{% endblock %}
|