initial commit
This commit is contained in:
commit
b55f54eb6d
68 changed files with 1761 additions and 0 deletions
3
layouts/404.html
Normal file
3
layouts/404.html
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{{ define "main" }}
|
||||
<h1>Page non trouvé</h1>
|
||||
{{ end }}
|
||||
11
layouts/_default/_markup/render-image.html
Normal file
11
layouts/_default/_markup/render-image.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{{ if .Title }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
<figcaption>{{ .Title }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
|
||||
</figure>
|
||||
{{ end }}
|
||||
|
||||
15
layouts/_default/baseof.html
Normal file
15
layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
<head>
|
||||
{{ partial "head.html" . }}
|
||||
|
||||
{{- block "head" . -}}{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
<div class="footer-push">
|
||||
{{ partial "header" . }}
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
{{ partial "footer" . }}
|
||||
</body>
|
||||
</html>
|
||||
26
layouts/_default/list.html
Normal file
26
layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<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>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
32
layouts/_default/single.html
Normal file
32
layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<article class="article">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ with .Date }}
|
||||
<div>Publié le <b><time>{{ . | time.Format ":date_full" }}</time></b></div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ if $featuredImage }}
|
||||
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
||||
<figure>
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
13
layouts/_default/summary.html
Normal file
13
layouts/_default/summary.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<article>
|
||||
<h1><a href="{{ .Permalink }}">{{ .Title }}</a></h1>
|
||||
<b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b>
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Summary }}
|
||||
{{ if .Truncated }}
|
||||
<a href="{{ .Permalink }}">Read more...</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
53
layouts/actualites/list.html
Normal file
53
layouts/actualites/list.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
{{ $listtitle := .Title }}
|
||||
{{ if or .Title .Content }}
|
||||
<div>
|
||||
{{ with .Title }}<h1>{{ . }}</h1>{{ end }}
|
||||
{{ with .Content }}<div>{{ . }}</div>{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<ul class="news-list">
|
||||
{{ range .Paginator.Pages }}
|
||||
<li class="news-item">
|
||||
<a href="{{ .RelPermalink }}" class="news-item__image">
|
||||
{{ $featuredImage := (resources.Get (printf "%s" ("cover/cover.jpg" | safeURL))) }}
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage = .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ end }}
|
||||
{{ $featuredImage := $featuredImage.Resize "450x" }}
|
||||
<figure>
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
</a>
|
||||
<div class="news-item__content">
|
||||
<h2
|
||||
class="news-item__title"
|
||||
>
|
||||
<a
|
||||
href="{{ .RelPermalink }}"
|
||||
>
|
||||
{{.Title }}
|
||||
</a>
|
||||
</h2>
|
||||
<p class="news-item__date">
|
||||
{{ $date := .Date.Format "2006-01-02" }}
|
||||
<time datetime="{{ $date }}">
|
||||
{{ time.Format "2 January 2006" $date }}
|
||||
</time>
|
||||
</p>
|
||||
<div class="news-item__summary">
|
||||
{{ .Summary }}...
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</main>
|
||||
{{ end }}
|
||||
36
layouts/actualites/single.html
Normal file
36
layouts/actualites/single.html
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<article class="article">
|
||||
<h1>{{ .Title }}</h1>
|
||||
|
||||
{{ if .Date }}
|
||||
<div class="article__date">
|
||||
Publié le
|
||||
{{ $date := .Date.Format "2006-01-02" }}
|
||||
<time date="{{ $date }}">{{ time.Format "2 January 2006" $date }}</time>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
|
||||
{{ if .Params.featured_image }}
|
||||
{{ $featuredImage := .Resources.GetMatch (.Params.featured_image.src | safeURL) }}
|
||||
{{ if $featuredImage }}
|
||||
{{ $featuredImage = $featuredImage.Resize "600x" }}
|
||||
<figure class="article__featured-image">
|
||||
<img alt="" src="{{ $featuredImage.RelPermalink }}" />
|
||||
{{ with .Params.featured_image.caption }}
|
||||
<figcaption>{{ . }}</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range .Params.tags }}
|
||||
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
<div>
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</article>
|
||||
</main>
|
||||
{{ end }}
|
||||
16
layouts/contact/section.html
Normal file
16
layouts/contact/section.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<h1>Informations de contact</h2>
|
||||
<div class="columns-two">
|
||||
<div>
|
||||
{{ partial "contact-card" }}
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- https://www.openstreetmap.org/node/9526690022 -->
|
||||
<!-- 49,1755136, 1,3343608 -->
|
||||
{{ partial "slippy-map" (dict "lat" 49.175513 "lng" 1.33436 "zoom" 15) }}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
53
layouts/index.html
Normal file
53
layouts/index.html
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{{ define "main" }}
|
||||
<main class="page-container">
|
||||
<div class="landing">
|
||||
<div class="landing-one">
|
||||
<div class="landing-brand">
|
||||
<!-- <img class="half-wheel-logo" src="/half_wheel_logo.svg" alt="Demi Roue" /> -->
|
||||
<div class="brand__logo landing-half-wheel-logo">
|
||||
{{ partial "svg" "half_wheel_logo" }}
|
||||
</div>
|
||||
<h1 class="brand__name">Bicycl'Eure</h1>
|
||||
<div class="brand__role1-container">
|
||||
<h2 class="text">Atelier mobile</h2>
|
||||
</div>
|
||||
<div class="brand__role2">Réparation & Entretien - Toutes marques</div>
|
||||
<!-- <img class="full-logo" src="/full_logo.jpg" alt="Logo complet" /> -->
|
||||
</div>
|
||||
<div class="landing-description">
|
||||
<!-- <p> -->
|
||||
<!-- Bicycl'Eure est un atelier mobile de réparation et d'entretien de VÉLOS. Sur simple rendez-vous et après un diagnostic gratuit, Laurent, technicien cycle qualifié, redonnera vie à votre monture ! -->
|
||||
<!-- </p> -->
|
||||
<!-- <p>Éco-Responsable et Économique !</p> -->
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="contact-card-container"> -->
|
||||
<!-- <div class="contact-card"> -->
|
||||
<!-- <div class="address"> -->
|
||||
<!-- <div> -->
|
||||
<!-- 30 Résidence des Trois Moulins -->
|
||||
<!-- </div> -->
|
||||
<!-- <div> -->
|
||||
<!-- 27940 Aubevoye Le Val d'Hazey -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="legal-id"> -->
|
||||
<!-- SIRET 537577 785 00018 -->
|
||||
<!-- </div> -->
|
||||
<!-- <div class="phone"> -->
|
||||
<!-- 06 52 64 05 37 -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
<!-- </div> -->
|
||||
</div>
|
||||
|
||||
{{/*
|
||||
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
|
||||
{{ range $paginator.Pages }}
|
||||
{{ .Render "summary" }}
|
||||
{{ end }}
|
||||
{{ partial "pagination.html" . }}
|
||||
*/}}
|
||||
</main>
|
||||
{{ end }}
|
||||
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 }}
|
||||
|
||||
7
layouts/partials/footer.html
Normal file
7
layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<footer class="site-footer">
|
||||
<div class="site-footer__content page-container">
|
||||
<a href="/"><b>{{ .Site.Title }}</b></a>.
|
||||
<a href="/a-propos-du-site">A propos de ce site</a>.
|
||||
<a href="/contact">Nous contacter</a>.
|
||||
</div>
|
||||
</footer>
|
||||
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 "sass/main.scss" | resources.ToCSS | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
|
||||
|
||||
20
layouts/partials/header.html
Normal file
20
layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<header class="site-header">
|
||||
<div class="site-header__content page-container">
|
||||
<a class="site-header__title" href="/">
|
||||
<img
|
||||
class="site-header__logo"
|
||||
src=""
|
||||
alt="Logo Bicycleure"
|
||||
/>
|
||||
</a>
|
||||
<nav class="site-header__nav">
|
||||
<a href="/tarifs">Tarifs</a>.
|
||||
<a href="/contact">Contact</a>.
|
||||
<a href="/actualites">Actualités</a>.
|
||||
<a href="/avis">Avis</a>.
|
||||
{{ range .Site.Menus.main }}
|
||||
<a href="{{ .URL | relURL }}"><b>{{ .Name }}</b></a>.
|
||||
{{ end }}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
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) }}
|
||||
|
||||
16
layouts/shortcodes/slippy-map.html
Normal file
16
layouts/shortcodes/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: [{{ .Get "lng" }}, {{ .Get "lat" }}],
|
||||
zoom: {{ .Get "zoom" }}
|
||||
});
|
||||
|
||||
var marker = new maplibregl.Marker()
|
||||
.setLngLat([{{ .Get "lng" }}, {{ .Get "lat" }}])
|
||||
.addTo(map);
|
||||
</script>
|
||||
57
layouts/tarifs/section.html
Normal file
57
layouts/tarifs/section.html
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{{ define "main" }}
|
||||
<main class="large-container">
|
||||
{{ .Content }}
|
||||
<div class="pricing-layout">
|
||||
<div>
|
||||
<div class="moves">
|
||||
<h2>Forfait déplacement</h2>
|
||||
<ul>
|
||||
{{ range $.Site.Data.pricing.move }}
|
||||
<li class="move-item">
|
||||
De {{ .min }} à {{ .max }} km : {{ if eq .price 0 }}Gratuit{{ else }}{{ .price }} €{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="forfaits">
|
||||
|
||||
{{ range $.Site.Data.pricing.forfait }}
|
||||
<div class="forfait">
|
||||
<h2>{{ .name }}</h2>
|
||||
<div class="forfait-price">{{ .price }} €</div>
|
||||
<ul>
|
||||
{{ range .components }}
|
||||
<li>{{ .name }}</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="operations-container">
|
||||
<h2>Liste des opérations</h2>
|
||||
<div class="operations-mosaic">
|
||||
{{ range $.Site.Data.pricing.standalone }}
|
||||
<div class="operations-category">
|
||||
<h3>{{ .name }}</h3>
|
||||
<table class="operations-table">
|
||||
<tr>
|
||||
<th>Opération</th>
|
||||
<th class="operation-price">Prix</th>
|
||||
</tr>
|
||||
{{ range .components }}
|
||||
<tr>
|
||||
<td>{{ .name }}</td>
|
||||
<td class="operation-price">{{ .price }} €</td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue