Ajout de page et du style principal

This commit is contained in:
2020-09-02 16:54:03 +02:00
parent f622ee0206
commit e06307538c
66 changed files with 4023 additions and 14 deletions

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="{{ .Site.Language.Lang }}">
{{ partial "head.html" . }}
<body{{ $currentPage := . }}{{ range .Site.Menus.main }}
{{ if or ($currentPage.IsMenuCurrent "main" .) (eq $currentPage.Menus.main.Pre .Pre) }} class="{{ .Pre }}"{{ end }}
{{ if $currentPage.IsHome }} class="home"{{ end }}
{{ end }}>
{{ partial "header.html" . }}
{{ block "all" . }}
<main role="main" id="content">
{{ block "main" . }}{{ end }}
</main>
{{ end }}
{{ partial "footer.html" . }}
{{ partial "js.html" . }}
</body>
</html>

5
layouts/index.html Normal file
View File

@ -0,0 +1,5 @@
{{ define "all" }}
{{ $image := .Resources.GetMatch "*" }}
{{ $resized := $image.Fill "1400x600 Top"}}
<img class="paysage" alt="Vue sur Crémeaux" src="{{ $resized.RelPermalink }}" />
{{ end }}

View File

@ -0,0 +1,11 @@
{{ $headless := .Site.GetPage "/viemunicipale/leconseilmunicipal" }}
<ul class="conseilmunicipal">
{{ range $.Site.Data.conseilmunicipal.conseilmunicipal }}
{{ $image := $headless.Resources.GetMatch .image }}
{{ $resized := $image.Resize "250x" }}
<li>
{{ partial "person.html" (merge . (dict "image" $resized.RelPermalink)) }}
</li>
{{ end }}
</ul>

View File

@ -0,0 +1,27 @@
<footer class="footer">
<div class="container">
<div>
<div class="title">
<h4>Mairie</h4>
</div>
<p>⏰ Lundi, mardi, jeudi et vendredi de 8h40 à 12h15, mercredi de 9h15 à 12h15.</p>
<p>📞 04 77 62 50 67</p>
<p>📫 mairie@cremeaux.fr</p>
</div>
<div>
<div class="title">
<h4>Bibliothèque Municipale</h4>
</div>
<p>⏰ Mercredi de 16h40 à 18h40, vendredi et samedi de 10h à 12h.</p>
<p>📞 04 77 62 82 66</p>
<p>📫 biblio@cremeaux.fr</p>
</div>
<div>
<div class="title">
<h4>Agence Postale</h4>
</div>
<p>⏰ Mardi, mercredi, jeudi, vendredi et samedi de 9h15 à 12h15.</p>
<p>📞 04 77 62 56 49</p>
</div>
</div>
</footer>

View File

@ -0,0 +1,29 @@
<header class="header">
<div class="container">
<a href="/" class="title">
<h1>Crémeaux</h1>
</a>
<nav class="nav">
{{ $currentPage := . }}
<ul class="menu">
{{ range .Site.Menus.main }}
<li class="{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }} {{ .Pre }}">
<a href="{{ .URL }}" class="{{ .Identifier }}">{{ .Name }}</a>
{{ if .HasChildren }}
<ul class="sousmenu {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{ end }}">
{{ range .Children }}
<li class="{{ if $currentPage.IsMenuCurrent "main" . }}active{{ end }} {{ .Pre }}">
<a href="{{ .URL }}">{{ .Name }}</a>
</li>
{{ end }}
</ul>
{{ end }}
</li>
{{ end }}
</ul>
</nav>
<button class="nav-button" type="button" role="button" aria-label="open/close navigation"><i>Menu</i></button>
</div>
</header>

View File

@ -0,0 +1,6 @@
{{ $headless := .Site.GetPage "/viemunicipale/lemotdumaire" }}
<center>
{{ $image := $headless.Resources.GetMatch "*" }}
{{ $resized := $image.Resize "300x" }}
<img class="round" src="{{ $resized.RelPermalink }}" alt="Didier PONCET" />
</center>

View File

@ -0,0 +1,7 @@
<figure>
<img src="{{ .image }}" alt="Photo de {{ .prenom }} {{ .nom }}" />
<figcaption>
<h3>{{ .prenom }} {{ .nom }}{{ if isset . "fonction" }} - <i>{{ .fonction }}</i>{{ end }}</h4>
<p>{{ .job }}, {{ .age }}&nbsp;ans</p>
</figcaption>
</figure>

View File

@ -0,0 +1 @@
{{ partial "conseilmunicipal.html" . }}

View File

@ -0,0 +1 @@
{{ partial "maire.html" . }}

View File

@ -0,0 +1,7 @@
{{ define "all" }}
{{ .Content }}
<div class="conseil">
{{ partial "conseilmunicipal.html" . }}
</div>
{{ end }}