Initial commit
This commit is contained in:
17
layouts/_default/baseof.html
Normal file
17
layouts/_default/baseof.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ or site.Language.LanguageCode }}" dir="{{ or site.Language.LanguageDirection `ltr` }}">
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
{{ partial "header.html" . }}
|
||||
</header>
|
||||
<main>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
<footer class="bg-mms-nightblue text-white py-4">
|
||||
{{ partial "footer.html" . }}
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
51
layouts/_default/home.html
Normal file
51
layouts/_default/home.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{{ define "main" }}
|
||||
<div class="m-auto max-w-6xl">
|
||||
<div class="mx-auto my-16 grid max-w-2xl auto-rows-fr grid-cols-1 gap-8 sm:mt-20 lg:mx-0 lg:max-w-6xl lg:grid-cols-3">
|
||||
{{ range where site.RegularPages "Section" "pages" }}
|
||||
<a href="{{.Page.RelPermalink}}">
|
||||
<article class="relative isolate flex flex-col justify-end overflow-hidden rounded-2xl px-8 py-12 text-white bg-mms-nightblue">
|
||||
{{ $img := resources.Get .Page.Params.featuredimage}}
|
||||
<img src="{{$img.RelPermalink}}" alt="{{.Page.Title}}" />
|
||||
<h3 class="text-center text-2xl my-5">{{.Page.Params.subtitle}}</h3>
|
||||
<p class="text-center">{{.Page.Params.description}}</p>
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="m-auto my-16 max-w-6xl">
|
||||
<h2 class="text-2xl text-mms-nightblue text-center">Qu'est-ce que la Maison de la Mobilité Solidaire</h2>
|
||||
<div class="mx-auto grid max-w-2xl auto-rows-fr grid-cols-1 gap-8 lg:mx-10 lg:max-w-6xl lg:grid-cols-2">
|
||||
<div>
|
||||
{{$img := resources.Get "images/visuel-mms43.svg"}}
|
||||
<img src="{{$img.RelPermalink}}" alt="{{.Site.Title}}" />
|
||||
</div>
|
||||
<div class="p-8 text-justify">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="h-10 bg-mms-nightblue"> </div>
|
||||
|
||||
<div class="m-auto my-16 max-w-6xl">
|
||||
<h2 class="text-2xl text-mms-nightblue text-center">Les dernières actus de la MMS 43</h2>
|
||||
{{ range where site.RegularPages "Section" "articles" }}
|
||||
<a href="{{.Page.RelPermalink}}">
|
||||
<article class="my-16">
|
||||
<h3 class="text-xl text-mms-nightblue font-bold">{{.Page.LinkTitle}}</h3>
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time class="text-mms-turquoise font-bold" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
<div class="my-4">
|
||||
{{.Page.Summary}}
|
||||
{{ if .Truncated }}
|
||||
<a class="text-mms-turquoise" href="{{ .RelPermalink }}">Lire la suire ...</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
8
layouts/_default/list.html
Normal file
8
layouts/_default/list.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ define "main" }}
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ .Content }}
|
||||
{{ range .Pages }}
|
||||
<h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
|
||||
{{ .Summary }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
14
layouts/_default/single.html
Normal file
14
layouts/_default/single.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ define "main" }}
|
||||
<div class="m-auto max-w-6xl py-20">
|
||||
<h1 class="text-2xl text-mms-nightblue font-bold">{{ .Title }}</h1>
|
||||
|
||||
{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}
|
||||
{{ $dateHuman := .Date | time.Format ":date_long" }}
|
||||
<time class="text-mms-turquoise font-bold" datetime="{{ $dateMachine }}">{{ $dateHuman }}</time>
|
||||
|
||||
<div class="my-6 text-justify">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
</div>
|
||||
{{ end }}
|
||||
28
layouts/partials/footer.html
Normal file
28
layouts/partials/footer.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div class="m-auto max-w-6xl">
|
||||
<div class="mx-auto grid max-w-2xl auto-rows-fr grid-cols-1 gap-8 lg:mx-0 lg:max-w-6xl lg:grid-cols-3">
|
||||
<div>
|
||||
{{$img := resources.Get "images/logo-mms43-white.svg"}}
|
||||
<img class="h-32 w-auto" src="{{$img.RelPermalink}}" />
|
||||
</div>
|
||||
<div class="py-6">
|
||||
<ul>
|
||||
{{ range where site.RegularPages "Section" "pages" }}
|
||||
<li>
|
||||
<a class="" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li>
|
||||
<strong><a href="{{.Site.Params.parcoursmob}}">Espace partenaires</a></strong>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="py-6">
|
||||
<ul>
|
||||
<li><a href="https://fit-formation.fr/">FIT</a></li>
|
||||
<li><a href="https://www.solidarauto43.org/">Solidarauto 43</a></li>
|
||||
<li><a href="https://www.fondationface.org/">FACE</a></li>
|
||||
<li><a href="https://mobilite-durable-inclusive.fr/">Le programme TIMS</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
5
layouts/partials/head.html
Normal file
5
layouts/partials/head.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width">
|
||||
<title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title>
|
||||
{{ partialCached "head/css.html" . }}
|
||||
{{ partialCached "head/js.html" . }}
|
||||
15
layouts/partials/head/css.html
Normal file
15
layouts/partials/head/css.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ with resources.Get "css/main.css" }}
|
||||
{{ $opts := dict
|
||||
"minify" hugo.IsProduction
|
||||
"inlineImports" true
|
||||
}}
|
||||
{{ with . | css.TailwindCSS $opts }}
|
||||
{{ if hugo.IsProduction }}
|
||||
{{ with . | fingerprint }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<link rel="stylesheet" href="{{ .RelPermalink }}">
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
12
layouts/partials/head/js.html
Normal file
12
layouts/partials/head/js.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{- with resources.Get "js/main.js" }}
|
||||
{{- if eq hugo.Environment "development" }}
|
||||
{{- with . | js.Build }}
|
||||
<script src="{{ .RelPermalink }}"></script>
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- $opts := dict "minify" true }}
|
||||
{{- with . | js.Build $opts | fingerprint }}
|
||||
<script src="{{ .RelPermalink }}" integrity="{{- .Data.Integrity }}" crossorigin="anonymous"></script>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
18
layouts/partials/header.html
Normal file
18
layouts/partials/header.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<nav class="bg-white shadow">
|
||||
<div class="mx-auto max-w-7xl px-2 sm:px-6 lg:px-8">
|
||||
<div class="relative flex h-24 justify-between">
|
||||
<div class="flex shrink-0 items-center">
|
||||
{{ $logo := resources.Get .Site.Params.logo}}
|
||||
<a href="{{.Site.BaseURL}}"><img class="h-24 w-auto" src="{{ $logo.Permalink }}" alt="{{ site.Title }}" /></a>
|
||||
</div>
|
||||
{{ partial "menu.html" }}
|
||||
<div class="flex shrink-0 items-center">
|
||||
<a href="{{.Site.Params.parcoursmob}}">
|
||||
<button type="button" class="relative inline-flex items-center gap-x-1.5 rounded-lg bg-mms-nightblue px-3 py-2 text-sm font-semibold text-white shadow-xs hover:bg-mms-darkgray focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mms-nightblue">
|
||||
Espace partenaires
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
5
layouts/partials/menu.html
Normal file
5
layouts/partials/menu.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div class='hidden sm:ml-6 sm:flex sm:space-x-8'>
|
||||
{{ range where site.RegularPages "Section" "pages" }}
|
||||
<a class="inline-flex items-center px-1 pt-1 text-xl font-medium text-mms-nightblue" href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
23
layouts/partials/terms.html
Normal file
23
layouts/partials/terms.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{{- /*
|
||||
For a given taxonomy, renders a list of terms assigned to the page.
|
||||
|
||||
@context {page} page The current page.
|
||||
@context {string} taxonomy The taxonomy.
|
||||
|
||||
@example: {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }}
|
||||
*/}}
|
||||
|
||||
{{- $page := .page }}
|
||||
{{- $taxonomy := .taxonomy }}
|
||||
|
||||
{{- with $page.GetTerms $taxonomy }}
|
||||
{{- $label := (index . 0).Parent.LinkTitle }}
|
||||
<div>
|
||||
<div>{{ $label }}:</div>
|
||||
<ul>
|
||||
{{- range . }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
|
||||
{{- end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user