hugo-bearblog/layouts/_default/list.html

51 lines
1.5 KiB
HTML

{{ define "main" }}
<content>
{{ if .Data.Singular }}
<h3 style="margin-bottom:0">Filtering for "{{ .Title }}"</h3>
<small>
<a href="{{ "blog" | relURL }}">Remove filter</a>
</small>
{{ end }}
<!-- blog/_index.md content will goes here. -->
{{ .Content }}
<ul class="blog-posts">
{{ range .Pages }}
<li>
<span>
<i>
<time datetime='{{ .Date.Format "2006-01-02" }}' pubdate>
{{ .Date.Format (default "02 Jan, 2006" .Site.Params.dateFormat) }}
</time>
</i>
</span>
<a class="random-color blog-link" href="{{ .Permalink }}">{{ .Title }}</a>
</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 }}
{{ if .Data.Singular }}
{{else}}
<small>
<div>
{{ range .Site.Taxonomies.tags }}
<a href="{{ .Page.Permalink }}">#{{ .Page.Title }}</a>&nbsp;
{{ end }}
</div>
</small>
{{ end }}
</content>
{{ end }}