summaryrefslogtreecommitdiff
path: root/layouts/tags/term.html
blob: cb7d1b01464b7c097628427238b59bf20ba520b5 (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
{{- /* List of All Articles for a Specific Tag */ -}}
{{- define "main" }}
<article class="tag-page">
    <header class="tag-page__header">
        <h1 class="tag-page__headline">
            <span class="tag-page__label">
                {{ lang.Translate "tags_with" | default "Tagged with:" }}
            </span>
            <span class="tag-page__name">
                #{{ .Title }}
            </span>
        </h1>
        <p class="tag-page__count">
            {{ lang.Translate "tags_postcount_number" .Pages.Len | default (printf "%d posts found" .Pages.Len) }}
        </p>
    </header>

    <section class="tag-page__content" aria-label="{{ lang.Translate "tags_posts_list" | default "Posts with this tag:" }}">
        {{- with .Pages }}
            <ul class="tag-page__posts-list">
                {{- range . }}
                    <li class="tag-page__post">
                        {{- partial "list/post-card.html" . }}
                    </li>
                {{- end }}
            </ul>
        {{- else }}
            <p class="tag-page__empty">
                {{ lang.Translate "tags_no_posts" | default "No posts found with this tag." }}
            </p>
        {{- end }}
    </section>

    <footer class="tag-page__footer">
        <nav class="tag-page__navigation" aria-label="{{ lang.Translate "tags_navigation" | default "Tag navigation" }}">
            <a href="{{ .Parent.RelPermalink }}" class="tag-page__view-all-link">
                {{ lang.Translate "tags_all" | default "All tags" }} »
            </a>
        </nav>
    </footer>
</article>
{{- end }}