initial commit

This commit is contained in:
Matthieu Bessat 2022-09-28 22:49:59 +02:00
commit 16137dce12
80 changed files with 1757 additions and 0 deletions

View 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 }}

View file

@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{ .Title }}</title>
{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
{{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}
{{/*
{{ range .Site.Params.customCSS -}}
<link rel="stylesheet" href="{{ . | relURL }}?rnd={{ now.Unix }}">
{{- end }}
*/}}
{{ with .OutputFormats.Get "RSS" -}}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- 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 }}">
</head>
<body>
{{ partial "header" . }}
{{ block "main" . }}{{ end }}
{{ partial "footer" . }}
</body>
</html>

View file

@ -0,0 +1,26 @@
{{ define "main" }}
<main>
{{ $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 }}

View file

@ -0,0 +1,16 @@
{{ define "main" }}
<main>
<article>
<h1>{{ .Title }}</h1>
<div>Publié le <b><time>{{ .Date | time.Format ":date_full" }}</time></b></div>
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a>
{{ end }}
<div>
{{ .Content }}
</div>
</article>
</main>
{{ partial "sidebar.html" . }}
{{ end }}

View 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>

View file

@ -0,0 +1 @@
Term page for image tag

55
layouts/images/list.html Normal file
View file

@ -0,0 +1,55 @@
{{ define "main" }}
<main>
<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 }}
<div class="gallery-tags__title">Filtrer par étiquettes</div>
<div class="gallery-tags__list">
<ul>
{{- range .Site.Taxonomies.tags -}}
<li>
<a href="{{ .Page.RelPermalink }}">{{ .Page.Title }}</a>
</li>
{{- end -}}
</ul>
</div>
</div>
<div class="gallery__items-container">
<div class="gallery__items">
{{ range (.Paginator 8).Pages }}
<a class="gallery__item" href="{{ .RelPermalink }}">
{{ $image := .Resources.GetMatch "original.jpg" }}
{{ $image := $image.Resize "x350" }}
{{ with $image }}
<img
class="gallery__image"
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>
</main>
{{ end }}

View file

@ -0,0 +1,51 @@
{{ define "main" }}
<main>
<article class="single-image">
<!-- <b><time>{{ .Date.Format (default "2006-01-02 15:04:05" .Site.Params.dateFmt) }}</time></b> -->
<div class="single-image__side">
<h1>{{ .Title }}</h1>
<div class="single-image__property single-image__tags">
<div class="property-name">Étiquettes associées à l'image :</div>
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-tags" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<path d="M7.859 6h-2.834a2.025 2.025 0 0 0 -2.025 2.025v2.834c0 .537 .213 1.052 .593 1.432l6.116 6.116a2.025 2.025 0 0 0 2.864 0l2.834 -2.834a2.025 2.025 0 0 0 0 -2.864l-6.117 -6.116a2.025 2.025 0 0 0 -1.431 -.593z" />
<path d="M17.573 18.407l2.834 -2.834a2.025 2.025 0 0 0 0 -2.864l-7.117 -7.116" />
<path d="M6 9h-.01" />
</svg>
<ul>
{{ range .Params.tags }}
<li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li>
{{ end }}
</ul>
</div>
<div class="single-image__property single-image__original-name">
<div class="property-name">Nom original :</div><pre>{{ .Params.original_name }}</pre>
</div>
<div class="single-image__content">
{{ .Content }}
</div>
</div>
<div class="single-image__image-container">
{{ $image := .Resources.GetMatch "original.jpg" }}
{{ with $image }}
<img
class="single-image__image"
src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}"
/>
{{ end }}
</div>
</article>
{{ if or .Next .Prev -}}
<div class="gallery__nextprev">
{{- with .Prev }}
<a href="{{ .RelPermalink}}"><div id="prevart">Previous</div></a>
{{ end -}}
{{- with .Next -}}
<a href="{{ .RelPermalink}}"><div id="nextart">Next</div></a>
{{ end -}}
</div>
{{ end -}}
</main>
{{ end }}

10
layouts/index.html Normal file
View file

@ -0,0 +1,10 @@
{{ define "main" }}
<main>
<h1>Main page title</h1>
{{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }}
{{ range $paginator.Pages }}
{{ .Render "summary" }}
{{ end }}
{{ partial "pagination.html" . }}
</main>
{{ end }}

View file

@ -0,0 +1,4 @@
<footer>
<a href="/"><b>{{ .Site.Title }}</b></a>
<a href="/a-propos-du-site">A propos de ce site</a>
</footer>

View file

@ -0,0 +1,15 @@
<header>
{{ strings.Repeat ( .Site.Title | len | add 5 ) "=" }}<br>
== <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> ==<br>
{{ strings.Repeat ( .Site.Title | len | add 5 ) "=" }}
<div style="float: right;">{{ .Site.Params.subtitle }}</div><br>
<nav>
<a href="/actualites"><b>Actualité</b></a>.
<a href="/association"><b>L'association</b></a>.
<a href="/histoires"><b>Histoire de la chapelle</b></a>.
<a href="/images"><b>Gallerie</b></a>.
{{ range .Site.Menus.main }}
<a href="{{ .URL | relURL }}"><b>{{ .Name }}</b></a>.
{{ end }}
</nav>
</header>

View 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>

View 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>