bobatheme/layouts/_default/summary.html

49 lines
1.4 KiB
HTML
Raw Normal View History

2021-10-09 15:16:24 -05:00
<div class="post">
<h2 class="post-title">
2021-10-18 14:17:16 -05:00
{{ range .Params.categories }}
<code>{{ . }}</code>
{{ end }}
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
2021-10-09 15:16:24 -05:00
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
{{ if .Draft }}{{ partial "icon.html" "edit" }}{{ end }}
2021-10-09 15:16:24 -05:00
</h2>
{{ partial "post-metadata.html" . }}
2021-10-09 15:16:24 -05:00
{{ with .Resources.GetMatch "feature" }}
<div class="post-media">
2021-10-19 13:57:39 -05:00
<figure>
{{ $media := . | resources.Fingerprint "sha512" }}
{{ if eq .MediaType.MainType "image" }}
<img src="{{ $media.Permalink }}" alt="{{ $media.Title }}" />
{{ else if eq .MediaType.MainType "video" }}
<video controls>
<source src="{{ $media.Permalink }}" alt="{{ $media.Title }}">
</video>
{{ end }}
{{ with $media.Title }}
<figcaption>
{{ . | markdownify }}
</figcaption>
{{ end }}
</figure>
2021-10-09 15:16:24 -05:00
</div>
{{ end }}
<div class="post-description">
{{ if .Description }}
2021-10-09 16:02:26 -05:00
<p>
{{ .Description | markdownify }}
</p>
2021-10-09 15:16:24 -05:00
{{ else }}
2021-10-09 15:23:33 -05:00
{{ .Summary }}
2021-10-09 15:16:24 -05:00
{{ end }}
</div>
<div class="readmore">
<a href="{{ .Permalink }}">{{ i18n "read_more" }} &rarr;</a>
2021-10-09 15:16:24 -05:00
</div>
</div>