feat: Avancement général sur le contenu et le design
fixes #3, fixes #4, fixes #5, fixes #7, fixes #8, fixes #9, fixes #10
This commit is contained in:
@ -8,46 +8,15 @@
|
||||
{{ $first := index (first 1 $lastnews) 0 }}
|
||||
{{ $others := after 1 $lastnews }}
|
||||
{{ with $first }}
|
||||
<div class="post last">
|
||||
<div class="picture">
|
||||
{{ $image := .Resources.GetMatch (default "*" .Params.image) }}
|
||||
{{ $resized := $image.Fill "220x220 Center"}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img src="{{ $resized.RelPermalink }}" alt="{{ .RenderString .Title }}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="details">
|
||||
<div class="info">
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time>
|
||||
</div>
|
||||
<h2 title="{{ .RenderString .Title }}"><a href="{{ .RelPermalink }}">{{ .RenderString .Title }}</a></h2>
|
||||
<div class="text">
|
||||
{{ .Content | truncate 280 }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ .Scratch.Set "big" true }}
|
||||
{{ partial "article-preview.html" . }}
|
||||
{{ end }}
|
||||
{{ range $others }}
|
||||
<div class="post ">
|
||||
<div class="picture">
|
||||
{{ $image := .Resources.GetMatch (default "*" .Params.image) }}
|
||||
{{ if $image }}
|
||||
{{ $resized := $image.Fill "100x100 Center"}}
|
||||
<a href="{{ .RelPermalink }}">
|
||||
<img src="{{ $resized.RelPermalink }}" alt="{{ .Title }}" />
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="details">
|
||||
<span><time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time></span>
|
||||
<h3 title="{{ .Title }}"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
||||
<div class="text">
|
||||
{{ .Content | truncate 200 }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ partial "article-preview.html" . }}
|
||||
{{ end }}
|
||||
<a href="/actualites">Voir toutes les actualités</a>
|
||||
<p>
|
||||
<a href="/actualites">Voir toutes les actualités</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="opening">
|
||||
{{ .Content }}
|
||||
|
Reference in New Issue
Block a user