First version

This commit is contained in:
2020-05-22 11:13:09 +02:00
parent c1e35272ec
commit 8d48751a6c
65 changed files with 744 additions and 357 deletions

View File

@ -0,0 +1,5 @@
{{ define "main" }}
<div class="container small">
{{ .Content }}
</div>
{{ end }}

View File

@ -1,8 +1,35 @@
{{ define "main" }}
{{ $path := .Params.image }}
{{ with .Resources.GetMatch $path }}
{{ $img := .Fill "460x260" }}
<div class="actu-image"><div><img src="{{ $img.RelPermalink }}" /></div></div>
{{ end }}
{{ .Content }}
<div class="container small">
{{ $path := .Params.image }}
{{ with .Resources.GetMatch $path }}
{{ $img := .Fill "680x382 center" }}
<img class="actu-image" src="{{ $img.RelPermalink }}" />
{{ end }}
{{ .Content }}
<hr>
<h3 class="txt-center">Articles précédents et suivants</h3>
</div>
<div class="container">
<aside class="grid actualites -middle">
{{ with .NextInSection }}
{{ partial "actualite" . }}
{{else}}
<div class="cell -6of12 empty">
<div class="info grid -middle -center">
Vous lisez l'article le plus récent
</div>
</div>
{{ end }}
{{ with .PrevInSection }}
{{ partial "actualite" . }}
{{else}}
<div class="cell -6of12 empty">
<div class="info grid -middle -center">
Vous lisez l'article le plus ancien
</div>
</div>
{{ end }}
</div>
</aside>
</div>
{{ end }}

View File

@ -1,6 +1,9 @@
{{ define "main" }}
{{ .Content }}
<h2>Dernières actualités</h2>
{{ partial "actualites.html" . }}
<div class="container small">
{{ .Content }}
<h2>Dernières actualités</h2>
</div>
<div class="container">
{{ partial "actualites.html" . }}
</div>
{{ end }}

View File

@ -9,7 +9,7 @@
</a>
{{ $path := .Params.image }}
{{ with .Resources.GetMatch $path }}
{{ $img := .Fill "460x260" }}
{{ $img := .Fill "460x260 center" }}
<div class="image"><img src="{{ $img.RelPermalink }}" /></div>
{{ end }}
</div>

View File

@ -1,21 +1,14 @@
<div class="container">
<footer class="footer grid">
<p class="cell">
Les Toits du Val
<br>
🏠 8 rue Robert Lugnier 42260 St-Germain Laval
<br>
💌 bonjour@lestoitsduval.fr
<br>
📞 04 81 17 05 51
</p>
<p class="cell -right">
🄯 2019
<br>
Construit avec
<span role="img" aria-label="Coeur">💙</span>
<br>
en mode <a href="https://fr.wikipedia.org/wiki/Low-tech">Low-Tech</a>
</p>
<div class="container small">
<footer class="footer grid -nowrap">
<div class="cell">
{{ with .Site.GetPage "/contact.md" }}
{{ .Content }}
{{ end }}
</div>
<div class="cell -right">
{{ with .Site.GetPage "/copyleft.md" }}
{{ .Content }}
{{ end }}
</div>
</footer>
</div>

View File

@ -1,16 +1,3 @@
<div class="nav">
<nav class="container">
<ul class="grid -center">
{{ $pages := where site.RegularPages "Type" "in" "page" }}
{{ $pages := $pages | union (where site.Pages "Kind" "in" "section") }}
{{ range $pages.ByWeight }}
<li><a href="{{ .Permalink }}" class="">{{ .Title }}</a></li>
{{ end }}
</ul>
</nav>
</div>
<ul>
</ul>
<header class="header" role="banner">
<div class="container">
<a href="/" class="logoContainer">
@ -23,8 +10,9 @@
<div class="titleContainer">
<a href="/">
<h1>{{ .Site.Title }}</h1>
<cite>Centrales villageoises <span class="noWrap">des Val d'Aix et Isable</span></cite>
<cite>Centrales Villageoises <span class="noWrap">des Val d'Aix et Isable</span></cite>
</a>
</div>
</div>
</header>
{{ partial "nav.html" . }}

6
layouts/partials/js.html Normal file
View File

@ -0,0 +1,6 @@
{{ $targetPath := "js/main.js" }}
{{ $main := resources.Get $targetPath }}
{{ with $main }}
{{ $js := . | resources.Minify }}
<script type="text/javascript" src="{{ $js.Permalink }}"></script>
{{ end }}

20
layouts/partials/nav.html Normal file
View File

@ -0,0 +1,20 @@
<div class="nav">
<input type="checkbox" id="menu_checkbox" onchange="toggleCheckbox(this)">
<label for="menu_checkbox" class="icon-menu">
<div class="icon"></div>
</label>
<nav class="container">
{{ $title := .Title }}
{{ $section := .CurrentSection.Title }}
{{ $pages := where site.RegularPages "Type" "in" "page" }}
{{ $pages := $pages | intersect (where site.RegularPages "Params.headless" "!=" true) }}
{{ $pages := $pages | union (where site.Pages "Kind" "in" "section") }}
<ul class="grid -center">
{{ range $pages.ByWeight }}
<li class="{{ if or (eq .Title $title) (eq .Title $section) }}active{{ end }}">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
{{ end }}
</ul>
</nav>
</div>

View File

@ -1,5 +1,9 @@
{{ define "main" }}
{{ .Content }}
<div class="container small">
{{ .Content }}
</div>
{{ partial "actualites.html" . }}
<div class="container">
{{ partial "actualites.html" . }}
</div>
{{ end }}

View File

@ -0,0 +1,3 @@
<div class="cfa">
<a href="{{ index .Params "lien"}}">{{ index .Params "texte"}}</a>
</div>

View File

@ -0,0 +1,4 @@
{{- $file := .Get 0 -}}
{{- $key := .Get 1 -}}
{{- $data := index (index $.Site.Data $file) $key -}}
{{- $data -}}