hugo-theme-hyde-hyde/layouts/partials/post_content.html

37 lines
1.3 KiB
HTML
Raw Normal View History

2018-01-24 09:42:50 +00:00
<div class="post">
<h1>{{ .Title }}</h1>
{{ if ne .Params.showpagemeta false }}
<div class="col-sm-12 col-md-12">
<span class="text-left post-date meta">
<!-- published date -->
2018-03-29 23:49:07 +00:00
{{ if not .Date.IsZero }}
2018-03-30 07:09:06 +00:00
<i class="fas fa-calendar-alt"></i> {{ .Date.Format (.Site.Params.dateform | default "Jan 02, 2006") -}}
2018-03-29 23:49:07 +00:00
{{ end }}
2018-01-24 09:42:50 +00:00
<!-- categories -->
2018-03-30 07:09:06 +00:00
{{ with .Params.categories }}
{{ $total := len . }}
2018-01-24 09:42:50 +00:00
{{ if gt $total 0 }}
in
{{ $total := sub $total 1 }}
2018-03-30 07:09:06 +00:00
{{ range $i, $cat := sort . }}
2018-01-24 09:42:50 +00:00
<a class="meta" href="{{ "/categories/" | relURL }}{{ $cat | urlize }}">{{ $cat | upper }}</a>
{{ if lt $i $total }},{{ end }}
{{ end }}
{{ end }}
{{ end }}
<!-- tags -->
2018-03-30 07:09:06 +00:00
{{ with .Params.tags }}
{{ $total := len . }}
2018-01-24 09:42:50 +00:00
{{ if gt $total 0 }}
<br/>
2018-03-29 23:49:07 +00:00
{{ $subtotal := sub $total 1 }} <i class="fas fa-tags"></i>
2018-03-30 07:09:06 +00:00
{{ range $i, $tag := sort . }}
<a class="meta" href="{{ "/tags/" | relURL }}{{ $tag | urlize }}">{{ $tag | lower }}</a>{{ if lt $i $subtotal }} {{ end }}
2018-01-24 09:42:50 +00:00
{{ end }}
{{ end }}
{{ end }}
</span>
</div>
{{ end }}
{{ .Content }}
</div>