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

single.html « post « layouts - github.com/zwbetz-gh/cupper-hugo-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9003db60ca87625f2ad9140b72520a8a43972576 (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" }}
  <main id="main">
    <h1>
      <svg class="bookmark-icon" aria-hidden="true" viewBox="0 0 40 50" focusable="false">
        <use xlink:href="#bookmark"></use>
      </svg>
      {{ .Title }}
    </h1>

    <div class="date">
      {{ $dateFormat := $.Site.Params.dateFormat | default "Jan 2, 2006" }}
      {{ $publishDate := .PublishDate }}
      <strong>{{ T "publish_date" }} </strong>{{ $publishDate.Format $dateFormat }}
      {{ with .Lastmod }}
        {{ if gt . $publishDate }}
          <br>
          <strong>{{ T "last_updated" }} </strong>{{ .Format $dateFormat }}
        {{ end }}
      {{ end }}
    </div>

    {{ with .Params.tags }}
      <div class="tags">
        <strong>{{ T "tags" }} </strong>
        <ul aria-label="{{ T "aria_label_tags" }}">
          {{ range . }}
            <li>
              <svg class="tag-icon" aria-hidden="true" viewBox="0 0 177.16535 177.16535" focusable="false">
                <use xlink:href="#tag"></use>
              </svg>
              {{ $href := print ("tags/" | relLangURL) (. | urlize) "/" }}
              <a href="{{ $href }}">{{ . }}</a>
            </li>
          {{ end }}
        </ul>
      </div>
    {{ end }}
    
    {{ if ne .Params.toc false }}
      {{ partial "toc" . }}
    {{ end }}

    {{ .Content }}
  </main>
  {{ partial "disqus.html" . }}
{{ end }}