Welcome to mirror list, hosted at ThFree Co, Russian Federation.

list.html « _default « layouts - github.com/rmsubekti/the-roots-home.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e9a92fea0319e60a8ed4b5ea85dd6538c1761497 (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
{{ define "main" }}
<section class="content item-list">
    {{if and (not .IsHome) .Parent }} 
        <div class="item"><ion-icon name="arrow-undo-sharp"></ion-icon>&nbsp;<a title="{{.Parent.Title}}" href="{{.Parent.Permalink}}">../</a></div>
    {{ end }}
    {{ range (.Paginate ( (.Pages.ByDate.Reverse).ByWeight) 100).Pages  }}
    <div class="item">
        <h3 class="item-title">
            {{ if eq .Kind "page" }}
            <ion-icon name="document-text-outline"></ion-icon>&nbsp;
            {{ else if eq .Kind "term"}}
            <ion-icon name="bookmarks-outline"></ion-icon>&nbsp;
            {{ else }}
            <ion-icon name="folder-outline"></ion-icon>&nbsp;
            {{ end }} 
            <a title="{{ .Title }}" href="{{ .Permalink }}">
                {{ $item := . }}
                {{ with .File}}
                    {{if and (eq $item.Kind "page") (not (eq (path.Base .Path) "index.md")) }}
                        {{ path.Base .Path }}{{ else }}{{ path.Base $item.RelPermalink }} 
                    {{end}} 
                {{ else }}
                {{ path.Base $item.RelPermalink }} 
                {{end}}
            </a>
        </h3>
        <span>{{with .GitInfo }} <em>@{{.AbbreviatedHash}}</em> {{.Subject }} {{ end }}</span>
        <time datetime="2006-01-02">{{ .Date.Format "2 Jan 2006" | }}</time>
    </div>
    {{ end }}         
    {{ with .Paginator}}
    <div class="pagination">
        <div class="next">
            {{ if .HasNext }}
            <a href="{{.Next.URL}}">Oldest</a>
            {{ end }}
        </div>
        <div class="prev">
            {{ if .HasPrev }}
            <a href="{{.Prev.URL}}">Newest</a>
        {{ end }}
        </div>
    </div>
    {{ end }}
</section>
{{ end }}