Compare commits
6 commits
9da2a99bc9
...
05907377fe
Author | SHA1 | Date | |
---|---|---|---|
05907377fe | |||
65e10d6e7c | |||
4bc3a9824e | |||
45f889419e | |||
18d74969be | |||
fde0bdf421 |
8 changed files with 41 additions and 13 deletions
|
@ -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"
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
||||
{{ partial "footer.html" . }}
|
||||
</main>
|
||||
</body>
|
||||
</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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -6,4 +6,6 @@
|
|||
<h1>{{ .Site.Params.author }}</h1>
|
||||
<h2>{{ .Site.Params.info }}</h2>
|
||||
</div>
|
||||
{{ partial "social.html" . }}
|
||||
|
||||
</div>
|
||||
|
|
|
@ -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 "." }}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue