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