Update
This commit is contained in:
23
layouts/shortcodes/actu.html
Normal file
23
layouts/shortcodes/actu.html
Normal file
@ -0,0 +1,23 @@
|
||||
<div class="news">
|
||||
{{ with .Site.GetPage "/actu" }}
|
||||
{{ $actu := . }}
|
||||
{{ range .Resources.ByType "page" }}
|
||||
{{ if or (not .Params.draft) (eq .Hugo.Environment "development") }}
|
||||
<article class="card">
|
||||
<div class="card-image">
|
||||
{{ $src := $actu.Resources.GetMatch (printf "*%s/%s*" (path.Base .File.Dir) (.Params.Image)) }}
|
||||
{{ if $src }}
|
||||
{{ $image := $src.Fill "432x300" }}
|
||||
<img src="{{ $image.RelPermalink }}" />
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<h3>{{ .Title }}</h3>
|
||||
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }}</time>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
10
layouts/shortcodes/cell.html
Normal file
10
layouts/shortcodes/cell.html
Normal file
@ -0,0 +1,10 @@
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
{{ $markdown := .Get "markdown" | default false }}
|
||||
<div class="cell{{ with $class }} {{ . }}{{ end }}">
|
||||
{{ if $markdown }}
|
||||
{{ $.Page.RenderString .Inner }}
|
||||
{{ else }}
|
||||
{{ .Inner }}
|
||||
{{ end }}
|
||||
</div>
|
3
layouts/shortcodes/grid.html
Normal file
3
layouts/shortcodes/grid.html
Normal file
@ -0,0 +1,3 @@
|
||||
{{ $class := .Get "class" }}
|
||||
{{ $body := .Get "text" | default .Inner }}
|
||||
<div class="grid{{ with $class }} {{ . }}{{ end }}">{{ $body }}</div>
|
1
layouts/shortcodes/image.html
Normal file
1
layouts/shortcodes/image.html
Normal file
@ -0,0 +1 @@
|
||||
{{ partial "image.html" . }}
|
Reference in New Issue
Block a user