42 lines
No EOL
1.2 KiB
HTML
42 lines
No EOL
1.2 KiB
HTML
{{ define "main" }}
|
|
|
|
<h1>Infos</h1>
|
|
|
|
<p>
|
|
Bienvenue sur mon blog personnel,<a href="about/">infos.</a>
|
|
</p>
|
|
<br/>
|
|
|
|
<h1>Latest posts</h1>
|
|
|
|
<div class="posts-list">
|
|
{{ with .Site.GetPage "/posts" }}
|
|
{{ range first 3 (sort .Data.Pages "Date" "desc" (where .Pages ".Params.private" "!=" true))}}
|
|
<div class="post">
|
|
<p>
|
|
<div class="date">{{ $mymonths := index $.Site.Data.moisshort }}{{ .Date.Day }} {{ index $mymonths (printf "%d" .Date.Month) }} {{ .Date.Year }}</div>
|
|
<h1><a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a></h1>
|
|
{{ .Summary }}
|
|
</p>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
<h1>Latest photos</h1>
|
|
|
|
<div class="image-grid">
|
|
{{ with .Site.GetPage "/photos" }}
|
|
{{ range first 3 (sort .Data.Pages "Date" "desc")}}
|
|
<a href="{{ .Permalink }}" title="{{ .Title }}">
|
|
{{ $image := .Page.Resources.GetMatch .Params.image }}
|
|
{{ with $image }}
|
|
{{ $thumb := .Resize "400x" }}
|
|
<img src="{{ $thumb.RelPermalink }}" alt="{{ .Title }}" class="img-responsive">
|
|
{{end}}
|
|
</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
</div>
|
|
|
|
{{ end }} |