summaryrefslogtreecommitdiffstats
path: root/layouts/stream/list.html
blob: 7f3a92f12965e00f308b106c3c067cd57a727ea1 (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
{{ define "main" }}


{{ .Content }}


{{ $paginator := .Paginate (where site.RegularPages "Section" "stream") }}


{{ range $paginator.Pages }}

<h3 id="{{ .Date.Format "Monday, 2 January 2006"| urlize}}">{{ .Date.Format "Monday, 2 January 2006" }}</h3>


<div style="margin-bottom: 1em;">
    {{ .Content }}
</div>

<!-- {{ if $paginator.HasPrev }} -->
<!--     <p>this page is paginated</p> -->
<!--     {{ $.Page.Scratch.Add "imgpath" "PAGINATED" }} -->
<!-- {{ else }} -->
<!--     <p>this page is NOT paginated</p> -->
<!--     {{ $.Page.Scratch.Set "imgpath" "img/" }} -->
<!-- {{ end }} -->


{{ if .Params.tags }}
<div style="background-color: rgb(240, 240, 240);">
    This post is tagged with: 
    {{ range .Params.tags }}
    <a href="{{ "tags" | absURL }}/{{ . | urlize }}">{{ . }}</a>
    {{ end }}
    {{ else }}
    <div style="background-color: rgb(240, 240, 240); margin-top: 20px;">
        This post is untagged. 
    </div>
    {{ end }}
</div>
<span><small><a href="{{ "stream" | absURL }}/#{{ .Date.Format "Monday 2 January 2006" | urlize}}">permalink</a></small></span>

<hr class="new1">
{{ end }}

<p><em>Navigation:</em></p>
    
{{ if $paginator.HasPrev }}
    <a href="{{ $paginator.Prev.URL }}">&larr;</a>
{{ end }}


{{ range $paginator.Pagers }}
    {{ if (eq .PageNumber $paginator.PageNumber) }} 
        <strong><a href="{{ .URL }}" style="background-color: lightgray; color: black">{{ .PageNumber }}</a></strong>
    {{ else }}
        <a href="{{ .URL }}">{{ .PageNumber }}</a>
    {{ end }}
{{ end }}

{{ if $paginator.HasNext}}
    <a href="{{ $paginator.Next.URL }}">&rarr;</a>
{{ end }}


{{ end }}