personal-blog/layouts/partials/post_meta.html

50 lines
1.7 KiB
HTML
Raw Normal View History

2021-03-30 20:50:34 +00:00
<div class="post-meta">
2021-12-03 13:09:48 +00:00
{{ $baseUrl := .Site.BaseURL }}
{{ if isset .Params "topics" }}
{{ $count := len .Params.topics }}
{{ if gt $count 0 }}
2021-04-11 22:12:22 +00:00
<span>
2021-11-25 20:48:26 +00:00
<div style="float:left; font-size:medium; font-weight:normal; padding: 2px; margin: 2px">
2021-04-11 22:12:22 +00:00
<i class="fa fa-calendar fa-fw"></i>
<time> {{ with .Site.Params.dateFormat }}{{ $.Date.Format . }}{{ else }}{{ .Date.Format "02 Jan 2006, 15:04 BST" }}{{ end }}</time>
</div>
2021-11-25 20:48:26 +00:00
<div style="float:right; font-size:small; font-weight: normal; padding: 2px; margin: 2px">
<time><em>Updated: {{ .Lastmod.Format "02 Jan 2006, 15:04" }} </em></time>
2021-04-11 22:12:22 +00:00
</div>
2022-01-03 14:55:21 +00:00
{{ if isset .Params "image" }}
2022-01-04 10:53:10 +00:00
<div>
2022-01-03 14:55:21 +00:00
<img class="featured-image" src="{{ $.Site.Params.blogCdnUrl }}{{ with .Params.image }}{{ . }}{{ end }}"/>
</div>
2022-01-03 14:55:21 +00:00
{{ else }}
<!-- default -->
<div><img class="featured-image" src="https://gmgauthier.us-east-1.linodeobjects.com/blog/img/blue-gray-code.jpg" /></div>
{{ end }}
2021-12-03 13:09:48 +00:00
</span>
2021-03-30 20:50:34 +00:00
2022-01-03 14:55:21 +00:00
<span>
2021-11-25 20:48:26 +00:00
<div>
<i class="fa fa-folder fa-fw"></i>
{{ range $k, $v := .Params.topics }}
2021-12-04 10:47:48 +00:00
<a class="post-taxonomy-topic" href="{{ $baseUrl }}topics/{{ . | urlize }}">{{ . }}</a>
{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
2021-11-25 20:48:26 +00:00
{{ end }}
</div>
{{ end }}
2021-03-30 20:50:34 +00:00
{{ end }}
2021-12-03 13:09:48 +00:00
2021-11-25 20:48:26 +00:00
{{ if isset .Params "tags" }}
{{ $count := len .Params.tags }}
{{ if gt $count 0 }}
<div>
<i class="fa fa-tags fa-fw"></i>
{{ range $k, $v := .Params.tags }}
2021-12-04 10:47:48 +00:00
<a class="post-taxonomy-tag" href="{{ $baseUrl }}tags/{{ . | urlize }}">{{ . }}</a>
{{ if lt $k (sub $count 1) }}&nbsp;&#47;{{ end }}
2021-11-25 20:48:26 +00:00
{{ end }}
</div>
{{ end }}
2021-03-30 20:50:34 +00:00
{{ end }}
2022-01-03 14:55:21 +00:00
</span>
2021-03-30 20:50:34 +00:00
</div>