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

simple.html « homes « partials « layouts - github.com/pjbakker/flexible-seo-hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d4a650a8979fa1f0b70ff82d8c8fefa17cc66f46 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
{{- $showGeneratedList := $.Params.showGeneratedList | default $.Site.Params.showGeneratedList | default true }}
{{- $showItemMeta := $.Params.showItemMeta | default $.Site.Params.showItemMeta | default true }}
<div class="container" role="main">
  {{- with .Content }}
  <article>
    <div class="row justify-content-center">
      <div class="col-md-8">
        {{- . -}}
      </div>
    </div>
  </article>
  {{- end }}
  {{ if eq $showGeneratedList true -}}
    {{ with .Sections }}
    <div class="row justify-content-center">
      <div class="col-md-8">
        <ul class="list-group">
          {{ range . }}
          <li class="list-group-item d-flex justify-content-between align-items-center">
            <a href="{{.Permalink}}">{{ .Title }}</a>
            <span class="badge badge-pill badge-primary">{{ len .Pages }}</span>
          </li>
          {{ end }}
        </ul>
      </div>
    </div>
    {{ end }}

    <div class="row justify-content-center mt-3">
      <div class="col-md-8 posts-list">
        {{ range .Paginator.Pages }}
        <article class="list-preview mt-3">
          <a href="{{ .Permalink }}">
          <h2 class="item-title">{{ .Title }}</h2>

          {{ if .Params.subtitle }}
            <h3 class="item-subtitle">
            {{- .Params.subtitle -}}
            </h3>
          {{ end }}
          </a>

          {{- if eq $showItemMeta true }}
          <p class="item-meta">
            {{ partial "item_meta.html" . }}
          </p>
          {{- end }}
          <div class="item-entry">
            {{ if .Truncated }}
              {{ .Summary }}
              <a href="{{ .Permalink }}" class="post-read-more">[Read more]</a>
            {{ else }}
              {{ .Content }}
            {{ end }}
          </div>

          {{ if .Params.tags }}
          <div class="blog-tags">
            {{ range .Params.tags }}
            <a href="{{ $.Site.LanguagePrefix | absURL }}tags/{{ . | urlize }}/">{{ . }}</a>&nbsp;
            {{ end }}
          </div>
          {{ end }}

        </article>
        {{ end }}
      </div>
    </div>
    <div class="row justify-content-center mt-3">
      <div class="col-md-8 posts-list">
      {{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
      <ul class="pagination">
        {{ if .Paginator.HasPrev }}
        <li class="page-item">
          <a class="page-link" href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">&larr; Newer posts</a>
        </li>
        {{ end }}
        {{ if .Paginator.HasNext }}
        <li class="page-item">
          <a class="page-link" href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">Older posts &rarr;</a>
        </li>
        {{ end }}
      </ul>
      {{ end }}
      </div>
    </div>
    {{- end }}
  </div>