Compare commits

..

6 commits

8 changed files with 41 additions and 13 deletions

View file

@ -10,6 +10,13 @@ other = "tags"
one = "archive" one = "archive"
other = "archives" other = "archives"
[shows]
one = "spectacle"
other = "spectacles"
[movies]
one = "film"
other = "films"
[reading_time] [reading_time]
one = "Une minute de lecture" one = "Une minute de lecture"
other = "{{ .Count }} minutes de lecture" other = "{{ .Count }} minutes de lecture"

View file

@ -10,7 +10,6 @@
{{ .Content }} {{ .Content }}
</article> </article>
</section> </section>
{{ partial "footer.html" . }}
</main> </main>
</body> </body>
</html> </html>

View file

@ -10,15 +10,29 @@
{{ i18n "articles" | title }} {{ i18n "articles" | title }}
</h1> </h1>
</header> </header>
<h2 class="list-subtitle">
{{ i18n "shows" | title }}
</h2>
<div class="archives-list"> <div class="archives-list">
{{- range .Paginator.Pages -}} {{- 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 -}} {{- end -}}
</div> </div>
</article> </article>
{{ partial "pagination.html" . }} {{ partial "pagination.html" . }}
</section> </section>
{{ partial "footer.html" . }}
</main> </main>
</body> </body>
</html> </html>

View file

@ -11,23 +11,28 @@
{{ $img := newScratch }} {{ $img := newScratch }}
{{ $folder := (print "/content/" .File.Dir "gallery/") }} {{ $folder := (print "/content/" .File.Dir "gallery/") }}
{{ $files := readDir $folder }} {{ $files := readDir $folder }}
{{ $img.Set "max" 0 }}
{{ range sort $files "Name" "asc" }} {{ range sort $files "Name" "asc" }}
{{ if not .IsDir }} {{ 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 }}
{{ 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" }} {{ range $index, $val := $img.Get "list" }}
{{ $curr := index (split $val ".") 0 }} {{ $curr := index (split $val ".") 0 }}
{{ $prec := mod (add (sub $index 1) ($img.Get "max")) ($img.Get "max") }} {{ $prec := mod (add (sub $index 1) ($img.Get "max")) ($img.Get "max") }}
{{ $next := mod (add $index 1) ($img.Get "max") }} {{ $next := mod (add $index 1) ($img.Get "max") }}
<a class="thumb hidden_link" href="#img{{ $index }}"> <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> </a>
<!-- lightbox container hidden with CSS --> <!-- 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="#img{{ $prec }}" class="light-btn hidden_link btn-prev"><<</a>
<a href="#_" class="btn-close hidden_link">X</a> <a href="#_" class="btn-close hidden_link">X</a>
<img src="gallery/{{ $val }}"> <img src="gallery/{{ $val }}">
@ -57,7 +62,6 @@
{{ partial "article-footer.html" . }} {{ partial "article-footer.html" . }}
</article> </article>
</section> </section>
{{ partial "footer.html" . }}
</main> </main>
</body> </body>
</html> </html>

View file

@ -9,13 +9,15 @@
<header> <header>
<h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2> <h2><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
</header> </header>
<div id="footer-name" class="footer-element">{{ .Site.Params.name }}</div>
{{ partial "social.html" . }}
<article> <article>
{{ .Summary }} {{ .Summary }}
</article> </article>
{{ end }} {{ end }}
{{ end }} {{ end }}
</div> </div>
{{ partial "footer.html" . }}
</main> </main>
</body> </body>
</html> </html>

View file

@ -6,4 +6,6 @@
<h1>{{ .Site.Params.author }}</h1> <h1>{{ .Site.Params.author }}</h1>
<h2>{{ .Site.Params.info }}</h2> <h2>{{ .Site.Params.info }}</h2>
</div> </div>
{{ partial "social.html" . }}
</div> </div>

View file

@ -20,7 +20,7 @@
<meta name="author" content="{{ .Site.Params.author }}"> <meta name="author" content="{{ .Site.Params.author }}">
{{ end }} {{ end }}
<link rel="stylesheet" href="/css/style.css"> <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)) }} {{ if and (.Site.Params.favicon) (fileExists (print "static/images/" .Site.Params.favicon)) }}
{{ $name := .Site.Params.favicon }} {{ $name := .Site.Params.favicon }}
{{ $splitted := split $name "." }} {{ $splitted := split $name "." }}

View file

@ -796,7 +796,7 @@ blockquote:after {
.thumb:hover { .thumb:hover {
z-index: 2; z-index: 2;
} }
.thumb>img { .thumb img {
max-height: 150px; max-height: 150px;
max-width: 150px; max-width: 150px;
border: solid 4px var(--background-color-dark); border: solid 4px var(--background-color-dark);