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

list.html « _default « layouts - github.com/panr/hugo-theme-hello-friend.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 43e613afe289b181044189d2effb9c98a2084b96 (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
{{ define "main" }}
  <div class="posts">
    {{ range .Pages }}
      <article class="post on-list">
        <h1 class="post-title"><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
        <div class="post-meta">
          {{ if .Date }}
            <time class="post-date">
              {{ .Date.Format ($.Site.Params.DateFormatList | default "2006-01-02") }}
            </time>

            {{ if $.Site.Params.LastModDisplay }}
              {{ partial "lastmod.html" . }}
            {{ end }}
          {{ end }}
          {{ with .Params.Author }}
            <span class="post-author"
              >— {{ $.Site.Params.WrittenBy | default "Written by" }} {{ . }}</span
            >{{ end }}


          {{ if $.Site.Params.ShowReadingTime }}
            <span class="post-read-time"
              >— {{ .ReadingTime }} {{ $.Site.Params.MinuteReadingTime | default "min read" }}</span
            >
          {{ end }}
        </div>

        {{ if .Params.tags }}
          <span class="post-tags">
            {{ range .Params.tags }}
              <a href="{{ (urlize (printf "tags/%s" . )) | absLangURL }}/">#{{ . }}</a>&nbsp;
            {{ end }}
          </span>
        {{ end }}

        {{ if .Params.Cover }}
          {{ partial "postcover.html" . }}
        {{ end }}

        <div class="post-content">
          {{ with .Description }}
            {{ . | markdownify }}
            {{ else }}
            {{ if .Truncated }}
              {{ .Summary }}
            {{ end }}
          {{ end }}
        </div>
        {{ if not .Params.hideReadMore }}
          <div>
            <a class="read-more button" href="{{ .RelPermalink }}"
              >{{ $.Site.Params.ReadMore | default "Read more" }} →</a
            >
          </div>
        {{ end }}
      </article>
    {{ end }}
    {{ partial "pagination.html" . }}
  </div>
{{ end }}