...quite. But now, I'm rly happy

master
Quentin Duchemin 2022-11-07 01:59:36 +01:00
parent fe13ce8d5e
commit 87b0f5b3ba
Signed by: Chosto
GPG Key ID: 0547178FEEDE7D6B
1 changed files with 27 additions and 16 deletions

View File

@ -3,8 +3,8 @@
<figure class="image is-3by2">
{{ $imageURL := "https://bulma.io/images/placeholders/480x320.png" }}
{{ with .Resources.GetMatch "top.jpg" }}
{{ $image := .Fill "480x320 left" }}
{{ $imageURL = $image.Permalink }}
{{ $image := .Fill "480x320 left" }}
{{ $imageURL = $image.Permalink }}
{{ end }}
<a href="{{ .Permalink }}"><img src="{{ $imageURL }}" alt="Placeholder image"></a>
</figure>
@ -40,23 +40,34 @@
<!-- If a special summary (before ToC) have been defined,
prefer using it because it has more chances to be a better summary -->
{{ if (isset .Params "summary" )}}
{{ .Params.summary }}
{{ .Params.summary }}
{{ else }}
{{ .Content | plainify | safeHTML | truncate 300 "..." }}
{{ .Content | plainify | safeHTML | truncate 300 "..." }}
{{ end }}
</div>
<footer class="card-footer has-text-centered">
{{ with .Params.categories }}
<div class="card-footer-item is-centered is-rounded">
{{ range . }}
<span class="tag mx-1"><a href="{{ "categories" | absURL }}/{{ . | urlize }}">{{ . }}</a></span>
{{ end }}
</div>
{{ with .Params.categories }}
<div class="card-footer-item is-centered is-rounded">
{{ range . }}
<span class="tag mx-1"><a href="{{ " categories" | absURL }}/{{ . | urlize }}">{{ . }}</a></span>
{{ end }}
<div class="card-footer-item is-size-7">
<time datetime="{{ .Date.Format `2006-01-02T15:04:05Z07:00` | safeHTML }}">
{{ .Date.Day }} {{ slicestr (index $.Site.Data.months_fr (printf "%d" .Date.Month)) 0 3 }} {{ .Date.Year }}
</time>&nbsp;&nbsp;{{ div .FuzzyWordCount 230 }} minutes
</div>
{{ end }}
<div class="card-footer-item is-size-7">
<div class="level is-mobile">
<div class="level-right">
<div class="level-item">
<time datetime="{{ .Date.Format `2006-01-02T15:04:05Z07:00` | safeHTML }}">
{{ .Date.Day }} {{ slicestr (index $.Site.Data.months_fr (printf "%d" .Date.Month)) 0 3 }} {{ .Date.Year
}}
</div>
</div>
<div class="level-left">
<div class="level-item">
</time>&nbsp;&nbsp;{{ div .FuzzyWordCount 230 }} min
</div>
</div>
</div>
</footer>
</div>
</footer>
</div>