55 lines
1.2 KiB
HTML
55 lines
1.2 KiB
HTML
|
{{ define "main" }}
|
||
|
<h1>Nos derniers articles :</h1>
|
||
|
<ul class="articles-list list-style-none">
|
||
|
{{ range .Pages }}
|
||
|
<li class=article-item>
|
||
|
{{ if .Params.categories }}
|
||
|
<div class=categories>
|
||
|
{{ $lencat := (len .Params.categories) }}
|
||
|
{{ if (gt $lencat 1) }}
|
||
|
Dans les catégories
|
||
|
{{ else if (eq $lencat 1) }}
|
||
|
Dans la catégorie
|
||
|
{{ else }}
|
||
|
|
||
|
{{ end }}
|
||
|
{{ range $index, $element := .Params.categories }}
|
||
|
<span class=categorie>{{ $element }}</span>
|
||
|
{{ if (not (eq (add $index 1) $lencat)) }}
|
||
|
et
|
||
|
{{ end }}
|
||
|
|
||
|
{{ end }}
|
||
|
</div>
|
||
|
{{ end }}
|
||
|
<div class=infos>
|
||
|
{{ if isset .Params "authors" }}
|
||
|
<span class=authors>
|
||
|
Fait par
|
||
|
{{ $len := (len .Params.authors) }}
|
||
|
{{ range $index, $element := .Params.authors }}
|
||
|
<span class=author>{{ $element }}</span>
|
||
|
{{ if (not (eq (add $index 1) $len)) }}
|
||
|
et
|
||
|
{{ end }}
|
||
|
|
||
|
{{ end }}
|
||
|
</span>
|
||
|
<span name=separator> - </span>
|
||
|
{{ end }}
|
||
|
<time class=date>
|
||
|
{{.Date.Format "2006-01-02"}}
|
||
|
</time>
|
||
|
</div>
|
||
|
<a class=article-item-main href="{{ .Permalink }}">
|
||
|
{{ if .Params.baneer }}
|
||
|
<img src="{{ .Params.baneer }}" class=baneer>
|
||
|
{{ end }}
|
||
|
<p class=title >{{.Title}}</p>
|
||
|
<p class=description></p>
|
||
|
</a>
|
||
|
</li>
|
||
|
{{ end }}
|
||
|
</ul>
|
||
|
{{ end }}
|