hugo-theme-hyde-hyde/layouts/partials/page-single/post-meta.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 -->
{{ if not .Date.IsZero }}
<i class="fas fa-calendar-alt"></i> {{ .Date.Format (.Site.Params.dateformat | default "Jan 02, 2006") }}
{{ end }}
2018-07-16 03:22:00 +00:00
<!-- categories -->
{{ with .Params.categories }}
{{ $total := len . }}
{{ if gt $total 0 }}
2018-07-16 03:22:00 +00:00
in
{{ $total := sub $total 1 }}
{{ range $i, $cat := sort . }}
<a class="badge badge-category" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>
2018-07-23 04:00:54 +00:00
{{ if lt $i $total }}•{{ end }}
{{ 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="badge badge-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 }}