summaryrefslogtreecommitdiff
path: root/themes/emily_zola_theme/templates/post.html
blob: 5f05c62beb3d48db42e0af6cd173eb0ebfc85e1d (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{% extends "base.html" %}

{% block content %}

<h3>
  Categories & Tags
</h3>
<p class="taxonomies_list">
{% set categories = get_taxonomy(kind="categories") %}
  {% for term in categories.items %}
      <a href="{{ term.permalink }}">/{{ term.name }}
      ({{ term.pages | length }})</a>&nbsp;
  {% endfor %}
</ul>
</p>

<p class="taxonomies_list">
{% set tags = get_taxonomy(kind="tags") %}
  {% for term in tags.items %}
    <a href="{{ term.permalink }}">#{{ term.name }}
    ({{ term.pages | length }})</a>&nbsp;
  {% endfor %}
</ul>
</p>

{% for year, posts in section.pages | group_by(attribute="year") %}
    <h3>{{ year }}</h3>

    {% for post in posts %}
    <p>
      <div class="date">
        {{ post.date }}
      </div>
      <div class="archive_title">
        <a href="{{ post.permalink }}">{{ post.title }}</a>
      </div>
      <div class="taxonomies_index">
          {% if post.taxonomies.categories %}
              {% for category in post.taxonomies.categories %}
              &emsp;<a href="{{ get_taxonomy_url(kind="categories", name=category) | safe }}">/{{ category }}</a>
              {% endfor %}
          {% endif %}
          {% if post.taxonomies.tags %}
              {% for tag in post.taxonomies.tags %}
              &emsp;<a href="{{ get_taxonomy_url(kind="tags", name=tag) | safe }}">#{{ tag }}</a>
              {% endfor %}
          {% endif %}
      </div>      
    </p>
    {% endfor %}
    
{% endfor %}

{% endblock content %}