summaryrefslogtreecommitdiff
path: root/layouts/_default/single.html
blob: 7ef1f8d4530cb2fbc1607d67b9668c755a5ad056 (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
{{ define "main" }}
<article>{{ .Page.Content }}</article>

{{- if not (in .Params.category "pages") }}
  <BR>
  added on {{ .PublishDate.Format "January 2, 2006" }} 
  {{- if isset .Params "tags" -}}
    {{- $tagsLen := len .Params.tags -}}
    {{- if gt $tagsLen 0 -}}
      &nbsp;with tags:  
      {{- range $k, $v := .Params.tags -}}
        {{- $url := printf "tags/%s" (. | urlize | lower) -}}
        <a href="{{ $url | absURL }}"> {{ . | title }}</a>
        {{- if lt $k (sub $tagsLen 1) }} &middot; {{ end -}}
      {{- end -}}
      </div>
    {{- end -}}
  {{- end }}
  <hr/>

  {{ if or .Next .Prev -}}
  <div>
    {{- with .Prev }} <a class="prev-link" href="{{ .RelPermalink}}"> &#8592; Previous</a> {{ end -}}
    {{- with .Next -}}<a class="next-link" href="{{ .RelPermalink}}">Next &#8594;</a> {{ end -}}
  </div>
  {{ end -}}

  {{ end }}
{{ end }}