mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
49 lines
1.4 KiB
HTML
49 lines
1.4 KiB
HTML
<div class="post">
|
|
<h2 class="post-title">
|
|
{{ range .Params.categories }}
|
|
<code>{{ . }}</code>
|
|
{{ end }}
|
|
|
|
{{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }}
|
|
<a href="{{ .Permalink }}">{{ .Title | markdownify }}</a>
|
|
{{ if .Draft }}{{ partial "icon.html" "edit" }}{{ end }}
|
|
</h2>
|
|
|
|
{{ partial "post-metadata.html" . }}
|
|
|
|
{{ with .Resources.GetMatch "feature" }}
|
|
<div class="post-media">
|
|
<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>
|
|
</div>
|
|
{{ end }}
|
|
|
|
<div class="post-description">
|
|
{{ if .Description }}
|
|
<p>
|
|
{{ .Description | markdownify }}
|
|
</p>
|
|
{{ else }}
|
|
{{ .Summary }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
<div class="readmore">
|
|
<a href="{{ .Permalink }}">{{ i18n "read_more" }} →</a>
|
|
</div>
|
|
</div>
|