diff --git a/i18n/fr.toml b/i18n/fr.toml index 6feb502..2a60565 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -10,6 +10,13 @@ other = "tags" one = "archive" other = "archives" +[shows] +one = "spectacle" +other = "spectacles" +[movies] +one = "film" +other = "films" + [reading_time] one = "Une minute de lecture" other = "{{ .Count }} minutes de lecture" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 38bc8ac..0296cf9 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -10,7 +10,6 @@ {{ .Content }} </article> </section> - {{ partial "footer.html" . }} </main> </body> </html> diff --git a/layouts/archives/list.html b/layouts/archives/list.html index ad45179..1e1bdec 100644 --- a/layouts/archives/list.html +++ b/layouts/archives/list.html @@ -10,15 +10,29 @@ {{ i18n "articles" | title }} </h1> </header> + <h2 class="list-subtitle"> + {{ i18n "shows" | title }} + </h2> <div class="archives-list"> {{- range .Paginator.Pages -}} - {{- .Render "li" -}} + {{ if in .Params.categories "Spectacle" }} + {{- .Render "li" -}} + {{- end -}} + {{- end -}} + </div> + <h2 class="list-subtitle"> + {{ i18n "movies" | title }} + </h2> + <div class="archives-list"> + {{- range .Paginator.Pages -}} + {{ if in .Params.categories "Film" }} + {{- .Render "li" -}} + {{- end -}} {{- end -}} </div> </article> {{ partial "pagination.html" . }} </section> - {{ partial "footer.html" . }} </main> </body> </html> diff --git a/layouts/archives/single.html b/layouts/archives/single.html index 9c43e46..596ca63 100644 --- a/layouts/archives/single.html +++ b/layouts/archives/single.html @@ -11,23 +11,28 @@ {{ $img := newScratch }} {{ $folder := (print "/content/" .File.Dir "gallery/") }} {{ $files := readDir $folder }} + {{ $img.Set "max" 0 }} {{ range sort $files "Name" "asc" }} {{ if not .IsDir }} - {{ $img.Add "list" (slice .Name) }} + {{ if not (in .Name "thumb") }} + {{ $img.Add "list" (slice .Name) }} + {{ $img.Set "max" (add ($img.Get "max") 1) }} + {{ end }} {{ end }} {{ end }} - {{ with ($img.Get "list") }} - {{ $img.Set "max" (add 1 (int (index (split (index (split (index (last 1 .) 0) ".") 0) "img") 1))) }} - {{ end }} {{ range $index, $val := $img.Get "list" }} {{ $curr := index (split $val ".") 0 }} {{ $prec := mod (add (sub $index 1) ($img.Get "max")) ($img.Get "max") }} {{ $next := mod (add $index 1) ($img.Get "max") }} <a class="thumb hidden_link" href="#img{{ $index }}"> - <img src="gallery/thumb/{{ $curr }}.jpg"> + <picture> + <source srcset="gallery/{{ $curr }}.thumb.avif" type="image/avif"/> + <source srcset="gallery/{{ $curr }}.thumb.webp" type="image/webp"/> + <img src="gallery/{{ $curr }}.thumb.jpg"/> + </picture> </a> <!-- lightbox container hidden with CSS --> - <div class="lightbox" id="{{ $curr }}"> + <div class="lightbox" id="img{{ $index }}"> <a href="#img{{ $prec }}" class="light-btn hidden_link btn-prev"><<</a> <a href="#_" class="btn-close hidden_link">X</a> <img src="gallery/{{ $val }}"> @@ -57,7 +62,6 @@ {{ partial "article-footer.html" . }} </article> </section> - {{ partial "footer.html" . }} </main> </body> </html> diff --git a/layouts/index.html b/layouts/index.html index 950f532..e2a4b7e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -9,13 +9,15 @@ <header> <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2> </header> + <div id="footer-name" class="footer-element">{{ .Site.Params.name }}</div> + {{ partial "social.html" . }} + <article> {{ .Summary }} </article> {{ end }} {{ end }} </div> - {{ partial "footer.html" . }} </main> </body> </html> diff --git a/layouts/partials/author.html b/layouts/partials/author.html index 9fe0fe5..2199bb5 100644 --- a/layouts/partials/author.html +++ b/layouts/partials/author.html @@ -6,4 +6,6 @@ <h1>{{ .Site.Params.author }}</h1> <h2>{{ .Site.Params.info }}</h2> </div> + {{ partial "social.html" . }} + </div> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 021136b..c107966 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -20,7 +20,7 @@ <meta name="author" content="{{ .Site.Params.author }}"> {{ end }} <link rel="stylesheet" href="/css/style.css"> - <link href="{{ .Site.RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"> + <link href="{{ .Site.BaseURL }}/index.xml" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}"> {{ if and (.Site.Params.favicon) (fileExists (print "static/images/" .Site.Params.favicon)) }} {{ $name := .Site.Params.favicon }} {{ $splitted := split $name "." }} diff --git a/static/css/style.css b/static/css/style.css index 42f86cf..8567eda 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -796,7 +796,7 @@ blockquote:after { .thumb:hover { z-index: 2; } -.thumb>img { +.thumb img { max-height: 150px; max-width: 150px; border: solid 4px var(--background-color-dark);