Update
This commit is contained in:
@ -1,23 +1,13 @@
|
||||
{{ define "main" }}
|
||||
<div class="bg">
|
||||
<p id="actu" class="ancre" />
|
||||
<div class="container">
|
||||
<h2>Actualités</h2>
|
||||
<p>
|
||||
orem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg colored">
|
||||
<p id="about" class="ancre" />
|
||||
<div class="container">
|
||||
{{ with .Site.GetPage "/about.md" }}{{ .Content }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg">
|
||||
<p id="contact" class="ancre" />
|
||||
<div class="container">
|
||||
{{ with .Site.GetPage "/contact.md" }}{{ .Content }}{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
{{ with .Site.GetPage "/accueil" }}
|
||||
{{ $pages := .Resources.ByType "page" }}
|
||||
{{ range sort $pages "Params.weight" }}
|
||||
<div class="bg{{if isset .Params "bg_colored" }} colored{{end}}">
|
||||
{{ with .File }}<p id="{{ .BaseFileName }}" class="ancre" />{{ end }}
|
||||
<div class="container">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
2
layouts/partials/image.html
Normal file
2
layouts/partials/image.html
Normal file
@ -0,0 +1,2 @@
|
||||
test
|
||||
{{ .Page.Dir }}
|
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