summaryrefslogtreecommitdiff
path: root/layouts/partials/single/next-prev.html
blob: 4d6e96228bef55f8d8e04a8c54b82f3026f8329f (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
{{- /* Navigation for next & previous post and back to top */ -}}
{{- if ne .Params.excludeFromLists true }}
<nav class="post__navigation" aria-label="{{ lang.Translate "post.navigation" | default "Post navigation" }}">
    <ul class="post__navigation-list">
        {{- with .PrevInSection }}
            <li class="post__navigation-prev">
                <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="prev">
                    <span class="post__navigation-label">
                        &larr; {{ lang.Translate "post.previous" | default "Previous post:" }}
                    </span>
                    <span class="post__navigation-title">
                        {{ .Title }}
                    </span>
                </a>
            </li>
        {{- end }}

        {{- with .NextInSection }}
            <li class="post__navigation-next">
                <a href="{{ .RelPermalink }}" class="post__navigation-link" rel="next">
                    <span class="post__navigation-label">
                        {{ lang.Translate "post.next" | default "Next post:" }}
                    </span>
                    <span class="post__navigation-title">
                        {{ .Title }} &rarr;
                    </span>
                </a>
            </li>
        {{- end }}
    </ul>
</nav>

<a
    href="#"
    class="post__scroll-top"
    aria-label="{{ lang.Translate "posts.top" | default "Back to top" }}"
    title="{{ lang.Translate "posts.top" | default "Back to top" }}"
>
    <svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
        <path d="M17 15L12 10L7 15" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
    </svg>
</a>
{{- end }}