hugo-theme-hyde-hyde/layouts/partials/post-meta-top.html

35 lines
1.2 KiB
HTML
Raw Normal View History

2018-07-16 03:22:00 +00:00
{{ if ne .Params.showpagemeta false }}
2018-07-20 20:32:00 +00:00
<div class="post__meta">
2018-07-16 03:22:00 +00:00
<!-- published date -->
2018-07-20 20:32:00 +00:00
{{ if not .Date.IsZero -}}
2018-07-16 03:22:00 +00:00
<i class="fas fa-calendar-alt"></i> {{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") -}}
2018-07-20 20:32:00 +00:00
{{- end }}
2018-07-16 03:22:00 +00:00
<!-- categories -->
2018-07-20 20:32:00 +00:00
{{- with .Params.categories -}}
{{- $total := len . -}}
{{ if gt $total 0 -}}
2018-07-16 03:22:00 +00:00
in
2018-07-20 20:32:00 +00:00
{{- $total := sub $total 1 -}}
{{- range $i, $cat := sort . }}
<a class="post__category" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>
2018-07-23 04:00:54 +00:00
{{ if lt $i $total }}•{{ end }}
2018-07-20 20:32:00 +00:00
{{- end -}}
{{- end -}}
{{- end -}}
2018-07-16 03:22:00 +00:00
<!-- tags -->
{{ with .Params.tags }}
{{ $total := len . }}
{{ if gt $total 0 }}
<br/>
{{ $subtotal := sub $total 1 }} <i class="fas fa-tags"></i>
2018-07-20 20:32:00 +00:00
{{ range $i, $tag := . }}
<a class="post__tag" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">{{ $tag | lower }}</a>
2018-07-16 03:22:00 +00:00
{{ if lt $i $subtotal }} {{ end }}
{{ end }}
{{ end }}
{{ end }}
<br/>
<i class="fas fa-clock"></i> {{ .ReadingTime }} min read
</div>
{{ end }}