initial commit
This commit is contained in:
commit
3d068a4adf
78 changed files with 3285 additions and 0 deletions
37
layouts/partials/contact-card.html
Normal file
37
layouts/partials/contact-card.html
Normal file
|
@ -0,0 +1,37 @@
|
|||
<dl class="card contact-card">
|
||||
<dt>
|
||||
Nom
|
||||
</dt>
|
||||
<dd>
|
||||
{{ site.Data.contact.name }}
|
||||
</dd>
|
||||
|
||||
<dt>Téléphone</dt>
|
||||
<dd>
|
||||
<a href="tel:{{ site.Data.contact.phone }}">{{ site.Data.contact.phone }}</a>
|
||||
</dd>
|
||||
|
||||
<dt>Adresse électronique</dt>
|
||||
<dd>
|
||||
<a href="mailto:{{ site.Data.contact.email }}">{{ site.Data.contact.email }}</a>
|
||||
</dd>
|
||||
|
||||
<dt>Facebook</dt>
|
||||
<dd>
|
||||
<a href="{{ site.Data.contact.facebook.url }}">{{ site.Data.contact.facebook.name }}</a>
|
||||
</dd>
|
||||
|
||||
<dt>Adresse</dt>
|
||||
<dd>
|
||||
{{ site.Data.contact.address.house_number }}
|
||||
{{ site.Data.contact.address.street_name }}<br>
|
||||
{{ site.Data.contact.address.postal_code }}
|
||||
{{ site.Data.contact.address.quarter }}
|
||||
{{ site.Data.contact.address.city }}
|
||||
</dd>
|
||||
|
||||
<dt>SIRET</dt>
|
||||
<dd>
|
||||
{{ site.Data.contact.siret }}
|
||||
</dd>
|
||||
</dl>
|
13
layouts/partials/data/description.html
Normal file
13
layouts/partials/data/description.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!-- Use site subtitle by default -->
|
||||
{{ $description := .Site.Params.sidebar.subtitle }}
|
||||
|
||||
{{ if .Description }}
|
||||
<!-- Page description exists -->
|
||||
{{ $description = .Description }}
|
||||
{{ else if .IsPage }}
|
||||
<!-- Use page summary -->
|
||||
{{ $description = .Summary }}
|
||||
{{ end }}
|
||||
|
||||
{{ return ($description | plainify)}}
|
||||
|
39
layouts/partials/data/title.html
Normal file
39
layouts/partials/data/title.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
{{- $title := .Title -}}
|
||||
{{- $siteTitle := .Site.Title -}}
|
||||
|
||||
{{- if .IsHome -}}
|
||||
<!-- Homepage, and it's pagination -->
|
||||
|
||||
<!-- Build paginator -->
|
||||
{{ $pages := where .Site.RegularPages "Section" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
{{ $filtered := ($pages | intersect $notHidden) }}
|
||||
{{ $pag := .Paginate ($filtered) }}
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<!-- Paginated. Append page number to title -->
|
||||
{{ $title = printf "%s - %s" .Paginator $siteTitle }}
|
||||
{{ else }}
|
||||
{{ $title = $siteTitle}}
|
||||
{{ end }}
|
||||
{{- else if eq .Kind "term" -}}
|
||||
<!-- Taxonomy page -->
|
||||
|
||||
<!-- Build paginator -->
|
||||
{{ $notHidden := where .Pages "Params.hidden" "!=" true }}
|
||||
{{ $pag := .Paginate ($notHidden) }}
|
||||
|
||||
<!-- {TAXONOMY_TYPE}: {TAXONOMY_TERM} -->
|
||||
{{ $title = slice (title .Data.Singular) ": " $title }}
|
||||
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<!-- Add page number-->
|
||||
{{ $title = $title | append " - " .Paginator }}
|
||||
{{ end }}
|
||||
|
||||
{{ $title = $title | append " - " $siteTitle }}
|
||||
{{ $title = delimit $title "" }}
|
||||
{{- end -}}
|
||||
|
||||
{{ return $title }}
|
||||
|
136
layouts/partials/footer.html
Normal file
136
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,136 @@
|
|||
<footer
|
||||
id="footer"
|
||||
class="footer">
|
||||
<div class="footer-cover-back"></div>
|
||||
<div class="footer-cover"></div>
|
||||
<div class="footer-border">
|
||||
<span class="footer-border-item"></span>
|
||||
<span class="footer-border-item"></span>
|
||||
<span class="footer-border-item"></span>
|
||||
</div>
|
||||
<div class="footer-container container mx-auto">
|
||||
<div>
|
||||
<div class="flex flex-wrap">
|
||||
<div class="w-full md:w-1/2">
|
||||
<div class="footer-title-container">
|
||||
<a
|
||||
class="link footer-logo"
|
||||
href="/"
|
||||
>
|
||||
{{ $image := resources.Get "images/logo.png" }}
|
||||
<img
|
||||
src="{{ $image.RelPermalink }}"
|
||||
class="logo">
|
||||
</a>
|
||||
<div>
|
||||
<div class="footer-title">
|
||||
We Robot
|
||||
</div>
|
||||
|
||||
<div class="footer-description">
|
||||
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.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full md:w-1/4">
|
||||
<div class="footer-links">
|
||||
<a
|
||||
href="/"
|
||||
class="link">
|
||||
Home
|
||||
</a>
|
||||
<a
|
||||
href="/blog"
|
||||
class="link">
|
||||
Blog
|
||||
</a>
|
||||
<a
|
||||
href="/photos"
|
||||
class="link">
|
||||
Photos
|
||||
</a>
|
||||
<a
|
||||
href="/donate"
|
||||
class="link">
|
||||
Donate
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-full md:w-1/4">
|
||||
<div class="footer-links">
|
||||
<a
|
||||
href="/about"
|
||||
class="link">
|
||||
About
|
||||
</a>
|
||||
<a
|
||||
href="/about#place"
|
||||
class="link">
|
||||
Où sommes nous
|
||||
</a>
|
||||
<a
|
||||
href="/contact"
|
||||
class="link">
|
||||
Contact us
|
||||
</a>
|
||||
<a
|
||||
href="/legals"
|
||||
class="link">
|
||||
Legals
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-between footer-footer">
|
||||
<div class="footer-socials">
|
||||
<a
|
||||
href=""
|
||||
class="footer-socials-item link">
|
||||
{{ partial "svg" "facebook" }}
|
||||
</a>
|
||||
<a
|
||||
href=""
|
||||
class="footer-socials-item link">
|
||||
{{ partial "svg" "instagram" }}
|
||||
</a>
|
||||
<a
|
||||
href=""
|
||||
class="footer-socials-item link">
|
||||
{{ partial "svg" "twitter" }}
|
||||
</a>
|
||||
<!--
|
||||
<a
|
||||
:href="$env.socials.youtube"
|
||||
class="footer-socials-item link">
|
||||
<img src="~/assets/img/youtube.svg">
|
||||
</a> -->
|
||||
<a
|
||||
href=""
|
||||
class="footer-socials-item link">
|
||||
{{ partial "svg" "github" }}
|
||||
</a>
|
||||
</div>
|
||||
<div
|
||||
id="h"
|
||||
class="footer-locale">
|
||||
<a
|
||||
class="button button-primary"
|
||||
@click="onSwapLocale">
|
||||
<div class="button-icon">
|
||||
<i class="fa fas fa-flag"></i>
|
||||
</div>
|
||||
<div
|
||||
class="link button-text">
|
||||
<span>
|
||||
Français
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
29
layouts/partials/head.html
Normal file
29
layouts/partials/head.html
Normal file
|
@ -0,0 +1,29 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
<meta name="description" content="{{ $description }}">
|
||||
|
||||
{{- with .Site.Params.author -}}
|
||||
<meta name="author" content="{{ . }}">
|
||||
{{ end }}
|
||||
|
||||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
<title>{{ $title }}</title>
|
||||
|
||||
<link rel="canonical" href="{{ .Permalink }}">
|
||||
|
||||
{{ partial "opengraph/include.html" . }}
|
||||
|
||||
{{ range .AlternativeOutputFormats }}
|
||||
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
|
||||
{{ end }}
|
||||
|
||||
{{ with .Site.Params.favicon }}
|
||||
<link rel="shortcut icon" href="{{ . }}" />
|
||||
{{ end }}
|
||||
|
||||
<!-- Note: j'ai galérer à rajouter du scss car en fait y'avait déja une variable $style de définit plus haut... -->
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||
|
82
layouts/partials/header.html
Normal file
82
layouts/partials/header.html
Normal file
|
@ -0,0 +1,82 @@
|
|||
<!-- :class="{'not-complete' : $store.state.headerComplete === false}" -->
|
||||
<div
|
||||
id="header"
|
||||
class="header"
|
||||
>
|
||||
<div class="header-container container mx-auto">
|
||||
<a
|
||||
href="/"
|
||||
class="link">
|
||||
<div class="header-title-container">
|
||||
<div class="header-logo">
|
||||
{{ $image := resources.Get "images/logo.png" }}
|
||||
<img
|
||||
src="{{ $image.RelPermalink }}"
|
||||
class="logo">
|
||||
</div>
|
||||
<div class="header-title">
|
||||
<div class="header-title-title">header title</div>
|
||||
<div class="header-sub-title">header sub title</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<div class="header-nav-responsive-button-container">
|
||||
<div
|
||||
class="header-nav-responsive-button"
|
||||
>
|
||||
<i class="fa fas fa-bars"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-nav">
|
||||
<div class="header-nav-item">
|
||||
<a
|
||||
href="/"
|
||||
class="link">
|
||||
Home
|
||||
</a>
|
||||
</div>
|
||||
<div class="header-nav-item">
|
||||
<a
|
||||
href="/blog"
|
||||
class="link">Blog</a>
|
||||
</div>
|
||||
<div class="header-nav-item">
|
||||
<a
|
||||
href="/about"
|
||||
class="link">About</a>
|
||||
</div>
|
||||
<div class="header-nav-item">
|
||||
<a
|
||||
href="/contact-us"
|
||||
class="link">Contact</a>
|
||||
</div>
|
||||
<div class="header-nav-item">
|
||||
<a
|
||||
href="/donate"
|
||||
class="link link-primary">Donate</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-locale-container">
|
||||
<div
|
||||
id="h"
|
||||
class="footer-locale ">
|
||||
<a
|
||||
class="button button-primary"
|
||||
>
|
||||
<div class="button-icon">
|
||||
<i class="fa fas fa-flag"></i>
|
||||
</div>
|
||||
<div
|
||||
class="link button-text">
|
||||
<!-- <span> -->
|
||||
<!-- English -->
|
||||
<!-- </span> -->
|
||||
<span>
|
||||
Français
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
63
layouts/partials/helpers/image.html
Normal file
63
layouts/partials/helpers/image.html
Normal file
|
@ -0,0 +1,63 @@
|
|||
<!-- Modified to have the featured image field as a dict (being able to specify meta data and display option for image) -->
|
||||
{{ $result := dict "exists" false "permalink" nil "resource" nil "isDefault" false }}
|
||||
{{ $imageField := "featured_image" }}
|
||||
{{ $imageValue := index .Context.Params $imageField }}
|
||||
{{ printf "%#v" "hello debu" }}
|
||||
|
||||
{{ if $imageValue }}
|
||||
{{ $imageValue := index $imageValue "src" }}
|
||||
<!-- If page has `image` field set -->
|
||||
{{ $result = merge $result (dict "exists" true) }}
|
||||
{{ $url := urls.Parse $imageValue }}
|
||||
|
||||
{{ if or (eq $url.Scheme "http") (eq $url.Scheme "https") }}
|
||||
<!-- Is an external image -->
|
||||
{{ $result = merge $result (dict "permalink" $imageValue) }}
|
||||
{{ else }}
|
||||
{{ $pageResourceImage := .Context.Resources.GetMatch (printf "%s" ($imageValue | safeURL)) }}
|
||||
|
||||
{{ if $pageResourceImage }}
|
||||
<!-- If image is found under page bundle -->
|
||||
{{ $result = merge $result (dict "permalink" $pageResourceImage.RelPermalink) }}
|
||||
|
||||
<!-- Disable SVG image processing, not supported by Hugo -->
|
||||
{{ if ne (path.Ext $imageValue) ".svg" }}
|
||||
{{ $result = merge $result (dict "resource" $pageResourceImage) }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<!-- Can not find the image under page bundle. Could be a relative linked image -->
|
||||
{{ $result = merge $result (dict "permalink" (relURL $imageValue)) }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
<!-- Type arg is set, check for defaultImage setting -->
|
||||
{{ $defaultImageSetting := .Context.Site.Params.defaultImage }}
|
||||
|
||||
{{ $result = merge $result (dict "isDefault" true) }}
|
||||
{{ $result = merge $result (dict "exists" true) }}
|
||||
|
||||
{{ if $defaultImageSetting.local }}
|
||||
{{ $siteResourceImage := resources.GetMatch (printf "%s" ($defaultImageSetting.src | safeURL)) }}
|
||||
|
||||
{{ if $siteResourceImage }}
|
||||
<!-- Try search image under site's assets folder -->
|
||||
{{ $result = merge $result (dict "permalink" $siteResourceImage.RelPermalink) }}
|
||||
{{ $result = merge $result (dict "resource" $siteResourceImage) }}
|
||||
{{ else }}
|
||||
<!-- Can not find the image -->
|
||||
{{ errorf "Failed loading image: %q" $defaultImageSetting.src }}
|
||||
{{ $result = merge $result (dict "exists" false) }}
|
||||
{{ end }}
|
||||
|
||||
{{ else }}
|
||||
<!-- External image -->
|
||||
{{ $result = merge $result (dict "permalink" (relURL $defaultImageSetting.src)) }}
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ end }}
|
||||
|
||||
{{ return $result }}
|
||||
|
54
layouts/partials/images-list.html
Normal file
54
layouts/partials/images-list.html
Normal file
|
@ -0,0 +1,54 @@
|
|||
<div class="gallery">
|
||||
<div class="gallery__side">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
<p class="gallery-tags__title">Filtrer par étiquettes :</p>
|
||||
<ul class="gallery-tags__list tags-list">
|
||||
{{- if eq (.Scratch.Get "image_list_context") "imtags" -}}
|
||||
<li class="gallery-tags__item tags-list__item">
|
||||
<a href="/images">Tout</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- range .Site.Taxonomies.imtags -}}
|
||||
<li class="gallery-tags__item tags-list__item">
|
||||
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="gallery__items-container">
|
||||
<div class="gallery__items">
|
||||
{{ range $item := (.Paginator 8).Pages }}
|
||||
<a class="gallery__item" href="{{ .RelPermalink }}">
|
||||
{{ $image := .Resources.GetMatch "original.jpg" }}
|
||||
{{ $image := $image.Resize "x350" }}
|
||||
{{ with $image }}
|
||||
<img
|
||||
class="gallery__image"
|
||||
title="{{ $item.Title }}"
|
||||
src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"
|
||||
/>
|
||||
{{ end }}
|
||||
|
||||
{{/*
|
||||
<div class="post-title">
|
||||
{{ if eq $listtitle "Posts" }}
|
||||
{{ .Date.Format "2006-01-02" }} <a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ else }}
|
||||
<a href="{{ .RelPermalink }}">{{.Title }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
*/}}
|
||||
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ partial "pagination.html" . }}
|
||||
</div>
|
||||
</div>
|
42
layouts/partials/opengraph/include.html
Normal file
42
layouts/partials/opengraph/include.html
Normal file
|
@ -0,0 +1,42 @@
|
|||
{{- $title := partialCached "data/title" . .RelPermalink -}}
|
||||
{{- $description := partialCached "data/description" . .RelPermalink -}}
|
||||
|
||||
<meta property='og:title' content='{{ $title }}'>
|
||||
<meta property='og:description' content='{{ $description }}'>
|
||||
<meta property='og:url' content='{{ .Permalink }}'>
|
||||
<meta property='og:site_name' content='{{ .Site.Title }}'>
|
||||
<meta property='og:type' content='
|
||||
{{- if .IsPage -}}
|
||||
article
|
||||
{{- else -}}
|
||||
website
|
||||
{{- end -}}
|
||||
'>
|
||||
|
||||
<meta property='og:locale' content='{{ .Site.LanguageCode }}'>
|
||||
|
||||
{{- if .IsPage -}}
|
||||
<meta property='article:section' content='{{ .Section | title }}' />
|
||||
{{- range .Params.tags -}}
|
||||
<meta property='article:tag' content='{{ . }}' />
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- if .IsPage -}}
|
||||
{{- if not .Date.IsZero -}}
|
||||
<meta property='article:published_time' content='{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
|
||||
{{- end -}}
|
||||
{{- if not .Lastmod.IsZero -}}
|
||||
<meta property='article:modified_time' content='{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}'/>
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- if not .Site.LastChange.IsZero -}}
|
||||
<meta property='og:updated_time' content='{{ .Site.LastChange.Format " 2006-01-02T15:04:05-07:00 " | safeHTML }}'/>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{ $image := partialCached "helpers/image" (dict "Context" . "Type" "opengraph") .RelPermalink "opengraph" }}
|
||||
{{- if $image.exists -}}
|
||||
<meta property='og:image' content='{{ absURL $image.permalink }}' />
|
||||
{{- end -}}
|
||||
|
19
layouts/partials/pagination.html
Normal file
19
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<div class="pagination-nav">
|
||||
<div>
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="pagination-nav__prev" href="{{ .Paginator.Prev.URL }}">
|
||||
Page précédente
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="pagination-nav__page">
|
||||
{{ .Paginator.PageNumber }} de {{ .Paginator.TotalPages }}
|
||||
</div>
|
||||
<div>
|
||||
{{ if .Paginator.HasNext }}
|
||||
<a class="pagination-nav__next" href="{{ .Paginator.Next.URL }}">
|
||||
Page suivante
|
||||
</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
14
layouts/partials/sidebar.html
Normal file
14
layouts/partials/sidebar.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<aside>
|
||||
<div>
|
||||
<div>
|
||||
<h3>LATEST POSTS</h3>
|
||||
</div>
|
||||
<div>
|
||||
<ul>
|
||||
{{ range first 5 (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
16
layouts/partials/slippy-map.html
Normal file
16
layouts/partials/slippy-map.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<div class="maplibre-map" id="short-code-slippy-map"></div>
|
||||
<script src="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.js"></script>
|
||||
<link href="https://unpkg.com/maplibre-gl@2.4.0/dist/maplibre-gl.css" rel="stylesheet" />
|
||||
<script>
|
||||
var map = new maplibregl.Map({
|
||||
container: 'short-code-slippy-map',
|
||||
style:
|
||||
'https://api.maptiler.com/maps/streets/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL',
|
||||
center: [{{ .lng}}, {{ .lat }}],
|
||||
zoom: {{ .zoom }}
|
||||
});
|
||||
|
||||
var marker = new maplibregl.Marker()
|
||||
.setLngLat([{{ .lng }}, {{ .lat }}])
|
||||
.addTo(map);
|
||||
</script>
|
7
layouts/partials/svg.html
Normal file
7
layouts/partials/svg.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
{{ $svg := . }}
|
||||
{{ $class := print $svg "-icon" }}
|
||||
{{ $match := "<svg (.*)?>(.*)</svg>" }}
|
||||
|
||||
{{ $replaceWith := printf `<svg class="%s" ${1}>${2}</svg>` $class }}
|
||||
{{ return (replaceRE $match $replaceWith (printf "/assets/images/%s.svg" $svg | readFile) | safeHTML) }}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue