hugo-bearblog/layouts/_default/list.html

51 lines
1.5 KiB
HTML
Raw Normal View History

2020-08-31 09:40:11 -04:00
{{ define "main" }}
<content>
{{ if .Data.Singular }}
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
<small>
<a href="{{ "blog" | relURL }}">Remove filter</a>
2020-08-31 09:40:11 -04:00
</small>
{{ end }}
<!-- blog/_index.md content will goes here. -->
{{ .Content }}
<ul class="blog-posts">
2020-08-31 09:40:11 -04:00
{{ range .Pages }}
<li>
<span>
<i>
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
2020-08-31 09:40:11 -04:00
</time>
</i>
</span>
<a class="random-color blog-link" href="{{ .Permalink }}">{{ .Title }}</a>
2020-08-31 09:40:11 -04:00
</li>
{{ else }}
<li>
No posts yet
</li>
{{ end }}
</ul>
{{- /* Random Color Script */}}
{{- $random_color_script := (resources.Get "js/random_color.js") | resources.Minify }}
{{- if not site.Params.assets.disableFingerprinting }}
{{- $random_color_script := $random_color_script | fingerprint }}
<script async crossorigin="anonymous" src="{{ $random_color_script.RelPermalink }}" integrity="{{ $random_color_script.Data.Integrity }}"></script>
{{ else }}
<script async crossorigin="anonymous" src="{{ $random_color_script.RelPermalink }}"></script>
{{ end }}
2020-08-31 09:40:11 -04:00
{{ if .Data.Singular }}
{{else}}
<small>
<div>
{{ range .Site.Taxonomies.tags }}
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
{{ end }}
</div>
</small>
{{ end }}
</content>
{{ end }}