~ruther/blog

ref: 32f0d65bfa5928b4abb81beab0dd807aff1b72cd blog/themes/poison/layouts/partials/post/info.html -rw-r--r-- 1.4 KiB
32f0d65b — Rutherther feat: Add about me 9 months ago
                                                                                
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
<div class="info">
  <h1 class="post-title">
    <a href="{{ .Permalink }}">{{ .Title }}</a>
  </h1>

  <div class="headline">
    <div>
      {{ with .Params.author }}
        {{ with site.Taxonomies.author.Get . }}
          <span><a href="{{ .Page.RelPermalink }}">{{ .Page.LinkTitle }}</a> - </span>
        {{ else }}
          <span>{{ . }} - </span>
        {{ end }}
      {{ end }}
      {{ if .Date }}
      <time datetime="{{ .Date.Format " 2006-01-02T15:04:05Z0700" }}" class="post-date">
        {{ .Date.Format "January 2, 2006" }}
      </time>
      {{ end }}
      <span> - </span>
      <span class="reading-time">
        {{ if gt .ReadingTime 1 }}
          {{ .Scratch.Set "readingTime" "mins" }}
        {{ else }}
          {{ .Scratch.Set "readingTime" "min" }}
        {{ end }}

        <span>{{ .ReadingTime }} {{ .Scratch.Get "readingTime" }} read</span>
      </span>
    </div>

    {{ if .Params.tags }}
    <ul class="tags">
      {{ range .Params.tags }}
      <li class="tag-{{ . }}">
        <a href="{{ "tags/" | absLangURL }}{{ . | urlize }}">{{ . }}</a>
      </li>
      {{ end }}
    </ul>
    {{ end }}
  </div>

  {{ $Site := .Site }}
  {{ if .Params.series }}
  <p class="seriesname">
    Series: <a href="{{ $Site.BaseURL }}series/{{ .Params.series | urlize }}">{{ .Params.series }}</a>
  </p>
  {{ end }}

  {{ if .Params.featuredImage }}
  <p>
    <img src="{{.Params.featuredImage}}"><br>
  </p>
  {{ end }}
</div>