~ruther/blog

ref: 1e4dd2e3a3a3029087f7d501e0715d4756ff8a78 blog/themes/poison/layouts/partials/post/navigation.html -rw-r--r-- 1.3 KiB
1e4dd2e3 — Rutherther chore: add rsync 9 months ago
                                                                                
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
<hr>
<div class="footer">
    {{ if .Params.series }}
    {{ $Site := .Site }}
    {{ $postTitle := .Title }}
    <p>
    This is a post in the <b><a href="{{ $Site.BaseURL }}series/{{ .Params.series | urlize }}">{{ .Params.series }}</a></b> series.
        <br>Other posts in this series:
        <ul class="series">
            {{ $seriesUrl := print "series/" (.Params.series | urlize) }}
            {{ $series := .Site.GetPage $seriesUrl }}
            {{ range $series.Pages }}
            <li>
                {{ .Date | time.Format ":date_long" }} -
                {{ if ne .Title $postTitle }}
                    <a href="{{ .RelPermalink }}">{{ .Title }}</a>
                {{ else }}
                    {{ .Title }}
                {{ end }}
            </li>
            {{ end }}
        </ul>
    </p>
    {{ else }}
	    {{ if .PrevInSection }}
            <a class="previous-post" href="{{ .PrevInSection.Permalink }}?ref=footer"><span style="font-weight:bold;">« Previous</span><br>{{ .PrevInSection.Title | truncate 50 "..."}}</a>
        {{ end }}
	    {{ if .NextInSection }}
            <div class="next-post">
                <a href="{{ .NextInSection.Permalink }}?ref=footer"><span style="font-weight:bold;">Next »</span><br>{{ .NextInSection.Title | truncate 50 "..." }}</a>
            </div>
        {{ end }}
    {{ end }}
</div>