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

single.html « _default « layouts - github.com/rhazdon/hugo-theme-hello-friend-ng.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 47579d9b5e66eb4d429b8ceeea04b87f4c16a1fa (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
{{ define "main" }}
  <div class="post">
    <h2 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
    <div class="post-meta">
      <span class="post-date">
        {{ .Date.Format "2006-01-02" }}
      </span>
      <span class="post-author">Written by {{ .Params.Author }}</span>
    </div>

    {{ if .Params.tags }}
      <span class="post-tags">
        {{ range .Params.tags }}
          #<a href="{{ $.Site.BaseURL }}tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
        {{ end }}
      </span>
    {{ end }}

    {{ with .Params.Cover }}
      <img src="/img/{{ . }}" class="post-cover" />
    {{ end }}

    <div class="post-content">
      {{ .Content }}
    </div>
    {{ if or .NextInSection .PrevInSection }}
      <div class="pagination">
        <div class="pagination__title">
          <span class="pagination__title-h">Read other posts</span>
          <hr />
        </div>
        <div class="pagination__buttons">
          {{ if .NextInSection }}
            <span class="button previous">
              <a href="{{ .NextInSection.Permalink }}">
                <span class="button__icon">←</span>
                <span class="button__text">{{ .NextInSection.Title }}</span>
              </a>
            </span>
          {{ end }}
          {{ if .PrevInSection }}
            <span class="button next">
              <a href="{{ .PrevInSection.Permalink }}">
                <span class="button__text">{{ .PrevInSection.Title }}</span>
                <span class="button__icon">→</span>
              </a>
            </span>
          {{ end }}
        </div>
      </div>
    {{ end }}
  </div>
{{ end }}