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

index.html « layouts - github.com/qqhann/hugo-primer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6ae1362354c5b3c423c48c9df57335f7251e73bb (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
47
48
49
50
51
52
53
54
55
{{ define "title" }}
  {{ .Title }} – {{ .Site.Title }}
{{ end }}


{{ define "main" }}
<!-- list template -->
<div>

  <h1>{{ .Title }}</h1>
  {{ .Content }}

  {{ range .Paginator.Pages }}
  <div>
    <div>
      <a href="{{ .RelPermalink }}">
        <h3>{{ .Title }}</h3>
      </a>
      <small>{{ .Permalink }}</small>
      {{ .Date.Format "2006-01-02" }}
    </div>
    {{ .Summary }}
  </div>
  {{ end }}

  {{ if gt .Paginator.TotalPages 1 }}
  <nav class="paginate-container">
    <div class="pagination">
      <ul>
        {{ if .Paginator.HasPrev }}
        <a href="{{ .Paginator.Prev.URL }}" class="previous_page">Prev</a>
        {{ else }}
        <span class="previous_page disabled">Prev</span>
        {{ end }}

        {{ range .Paginator.Pagers }}
          <a href="{{ .RelPermalink }}">
            {{ .PageNumber }}
          </a>
        {{ end }}

        {{ if .Paginator.HasNext }}
        <a href="{{ .Paginator.Next.URL }}" class="next_page">Next</a>
        {{ else }}
        <span class="next_page disabled">Next</span>
        {{ end }}
      </ul>
    </div>
  </nav>
  {{ end }}


</div>

{{ end }}