feat: Avancement dans l'architecture du site
This commit is contained in:
@ -1 +1,9 @@
|
||||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
{{/*
|
||||
S'il n'y a pas de / dans l'url d'un lien alors on ajoute le path du répertoire
|
||||
*/}}
|
||||
{{ $isExternalLink := strings.HasPrefix .Destination "http" }}
|
||||
{{ $isTelLink := strings.HasPrefix .Destination "tel:" }}
|
||||
{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
|
||||
{{ $hasSlash := in .Destination "/" }}
|
||||
{{ $path := cond (or (or $isTelLink $isMailtoLink) $hasSlash) .Destination (path.Join "/" .Page.Dir .Destination) }}
|
||||
<a href="{{ $path | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isExternalLink }} target="_blank" rel="noopener"{{ end }}{{ if $isTelLink }} rel="nofollow"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||
|
@ -1,8 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container">
|
||||
<div class="container md">
|
||||
{{ .Content }}
|
||||
<ul>
|
||||
{{ block "list" . }}
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .URL }}">{{ .RenderString .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container">
|
||||
<div class="container md">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
|
15
layouts/actualites/list.html
Normal file
15
layouts/actualites/list.html
Normal file
@ -0,0 +1,15 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container md">
|
||||
{{ .Content }}
|
||||
<ul>
|
||||
{{ block "list" . }}
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .URL }}">{{ .Date.Day }} {{ index $.Site.Data.mois (printf "%d" .Date.Month) }} {{ .Date.Year }} - {{ .RenderString .Title }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container news">
|
||||
<div class="container news md">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
@ -3,7 +3,7 @@
|
||||
<h1>Le fil <strong>des actualités</strong></h1>
|
||||
<div class="infos">
|
||||
<div class="news">
|
||||
{{ $headless := .Site.GetPage "/news" }}
|
||||
{{ $headless := .Site.GetPage "/actualites" }}
|
||||
{{ $lastnews := first 4 (sort $headless.Pages "Date" "desc") }}
|
||||
{{ $first := index (first 1 $lastnews) 0 }}
|
||||
{{ $others := after 1 $lastnews }}
|
||||
|
@ -1,13 +1,9 @@
|
||||
{{ $headless := .Site.GetPage "/viemunicipale/leconseilmunicipal" }}
|
||||
|
||||
<div class="container grid-xl conseilmunicipal">
|
||||
<div class="columns">
|
||||
<div class="container conseilmunicipal">
|
||||
{{ range sort $.Site.Data.conseilmunicipal.conseilmunicipal "nom" }}
|
||||
{{ $image := $headless.Resources.GetMatch .image }}
|
||||
{{ $resized := $image.Resize "250x" }}
|
||||
<div class="column col-3 col-xl-4 col-lg-6 col-sm-12">
|
||||
{{ partial "person.html" (merge . (dict "image" $resized.RelPermalink)) }}
|
||||
</div>
|
||||
{{ partial "person.html" (merge . (dict "image" $resized.RelPermalink)) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,11 +5,15 @@
|
||||
<h3>Mairie de Crémeaux</h3>
|
||||
<p>Place de Pierre-Bénite</p>
|
||||
<p>42260 Crémeaux</p>
|
||||
<p>04 77 62 50 67</p>
|
||||
<p>mairie@cremeaux.fr</p>
|
||||
<p><a href="tel:0477625067" rel="nofollow">04 77 62 50 67</a></p>
|
||||
<p><a href="mailto:mairie@cremeaux.fr">mairie@cremeaux.fr</a></p>
|
||||
<p>
|
||||
<a href="/actualites/index.xml"><img src="/icons/rss.svg" alt="Flux RSS de l'actualité à Crémeaux" title="Flux RSS de l'actualité à Crémeaux" class="icons" /></a>
|
||||
<a target="_blank" rel="noopener" href="https://www.facebook.com/vivre.a.cremeaux/"><img src="/icons/facebook.svg" alt="Facebook : Vivre à Crémeaux" title="Facebook : Vivre à Crémeaux" class="icons" /></a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="logo">
|
||||
<img src="/icons/logo-footer.png" alt="Commune de Crémeaux" />
|
||||
<img width="135" height="163" src="/icons/logo-footer.png" alt="Commune de Crémeaux" />
|
||||
</div>
|
||||
<div class="horaire">
|
||||
<h3>Horaire d'ouverture<br>au public :</h3>
|
||||
@ -19,5 +23,5 @@
|
||||
</div>
|
||||
</footer>
|
||||
<footer class="explain">
|
||||
Ce site est réalisé par <a href="https://weko.io">Weko</a> de façon <a href="https://weko.io">éco-responsable, économe en énergie et sans aucun traceur</a>.
|
||||
Ce site est réalisé par <a href="https://weko.io">Weko</a> de façon éco-responsable.
|
||||
</footer>
|
||||
|
@ -1,15 +1,16 @@
|
||||
{{ $imageSize := cond .IsHome "1920x850 Top" "1920x450 Center" }}
|
||||
<header class="header{{ if .IsHome }} home{{ end }}">
|
||||
{{ if .Resources }}
|
||||
{{ if .Resources.ByType "image" }}
|
||||
{{ $image := .Resources.GetMatch (default "*" .Params.image) }}
|
||||
{{ if $image }}
|
||||
{{ $resized := $image.Fill "1400x600 Center"}}
|
||||
<img class="hero" src="{{ $resized.RelPermalink }}" alt="{{ .Title }}" />
|
||||
{{ $resized := $image.Fill $imageSize }}
|
||||
<img class="hero" src="{{ $resized.RelPermalink }}" />
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $headless := .Site.GetPage "/" }}
|
||||
{{ $image := $headless.Resources.GetMatch "*" }}
|
||||
{{ $resized := $image.Fill "1400x600 Top"}}
|
||||
<img class="hero" src="{{ $resized.RelPermalink }}" alt="{{ .Title }}" />
|
||||
{{ $resized := $image.Fill $imageSize }}
|
||||
<img class="hero" src="{{ $resized.RelPermalink }}" />
|
||||
{{ end }}
|
||||
<nav class="nav">
|
||||
<div class="container">
|
||||
@ -21,11 +22,20 @@
|
||||
<button class="open-button">≡ Menu</button>
|
||||
<ol id="menu">
|
||||
{{ range .Site.Menus.main }}
|
||||
<li>
|
||||
<li class="menu{{ if .HasChildren }} withSubmenu{{ end }}">
|
||||
<a href="{{ .URL }}">
|
||||
<img class="icons" src="/icons/{{ .Identifier }}.svg" alt="{{ .Name }}" />
|
||||
<span>{{ .Name }}</span>
|
||||
</a>
|
||||
{{ if .HasChildren }}
|
||||
<ol class="submenu">
|
||||
{{ range .Children }}
|
||||
<li>
|
||||
<a href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ol>
|
||||
|
@ -3,13 +3,10 @@
|
||||
<img src="{{ .image }}" alt="Photo de {{ .prenom }} {{ .nom }}" />
|
||||
</div>
|
||||
<div class="card-header">
|
||||
<div class="card-title h5">{{ .prenom }} {{ .nom }}</div>
|
||||
<div class="card-subtitle text-gray">{{ .fonction }}</div>
|
||||
<h2>{{ .prenom }} {{ .nom }}</h2>
|
||||
<h3>{{ .fonction }} - {{ .age }} ans</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ .job }}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<span class="label label-rounded label-primary">{{ .age }} ans</span>
|
||||
</div>
|
||||
</div>
|
||||
|
8
layouts/viemunicipale/commissions.html
Normal file
8
layouts/viemunicipale/commissions.html
Normal file
@ -0,0 +1,8 @@
|
||||
{{ define "main" }}
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container commissions md">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
@ -1,7 +1,7 @@
|
||||
{{ define "main" }}
|
||||
<div class="container grid-lg contenu">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<div class="container grid-sm">
|
||||
<div class="container">
|
||||
<h1>{{ .RenderString .Title }}</h1>
|
||||
<div class="container news md">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user