From 07665afe283e8c446b9f1b7f84dd180c8ebbe201 Mon Sep 17 00:00:00 2001 From: Florian du Garage Num Date: Thu, 30 Nov 2023 17:50:24 +0100 Subject: [PATCH] image processing --- .gitignore | 2 +- layouts/actions_culturelles/list.html | 9 +++++++-- layouts/compagnie/list.html | 13 +++++++++---- layouts/index.html | 7 ++++++- layouts/partenaires/list.html | 14 ++++++++++++-- layouts/presse/list.html | 6 +++++- layouts/spectacles/list.html | 17 +++++++++++------ layouts/spectacles/single.html | 24 ++++++++++++++++++------ 8 files changed, 69 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 1b52ad5..6676cd5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ resources .hugo_build* -public/* \ No newline at end of file +public \ No newline at end of file diff --git a/layouts/actions_culturelles/list.html b/layouts/actions_culturelles/list.html index 7f7bee9..208c379 100644 --- a/layouts/actions_culturelles/list.html +++ b/layouts/actions_culturelles/list.html @@ -36,8 +36,13 @@
{{ $img := resources.GetMatch (print .File.Dir "/illustration.*") }} {{ with $img }} -
- + {{- $jpeg := .Resize (printf "%dx%d jpeg" .Width .Height) }} + {{- $webp := .Resize (printf "%dx%d webp picture" .Width .Height) }} +
+ + + {{ .Permalink }} +
{{ end }}
diff --git a/layouts/compagnie/list.html b/layouts/compagnie/list.html index 11aac2e..8554294 100644 --- a/layouts/compagnie/list.html +++ b/layouts/compagnie/list.html @@ -15,12 +15,17 @@
{{ range .Pages }}
+ {{ $img := resources.GetMatch (print .File.Dir "/portrait.*") }} + {{ with $img}} + {{- $jpeg := .Resize "800x jpeg" }} + {{- $webp := .Resize "800x webp picture" }}
- {{ $img := resources.GetMatch (print .File.Dir "/portrait.*") }} - {{ with $img}} - Artiste - {{ end }} + + + {{ .Permalink }} +
+ {{ end }}

{{ .Title }}

{{ end }} diff --git a/layouts/index.html b/layouts/index.html index d50c032..7c20d2b 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -8,8 +8,13 @@ diff --git a/layouts/partenaires/list.html b/layouts/partenaires/list.html index feb1339..ef2c0d3 100644 --- a/layouts/partenaires/list.html +++ b/layouts/partenaires/list.html @@ -19,9 +19,14 @@

{{ .Title }}

{{ range $img }} + {{- $jpeg := .Resize "600x jpeg" }} + {{- $webp := .Resize "600x webp text" }}
- + + + {{ .Permalink }} +
{{ end }} @@ -37,9 +42,14 @@

{{ .Title }}

{{ range $img }} + {{- $jpeg := .Resize "600x jpeg" }} + {{- $webp := .Resize "600x webp text" }}
- + + + {{ .Permalink }} +
{{ end }} diff --git a/layouts/presse/list.html b/layouts/presse/list.html index 83ffc30..4aa2d26 100644 --- a/layouts/presse/list.html +++ b/layouts/presse/list.html @@ -14,8 +14,12 @@ {{ if and (isset .Params "presse") (.Params.presse) }} {{ $img := resources.GetMatch (print .File.Dir "/principal.*") }} + {{ with $img }} + {{- $jpeg := .Crop "1400x400 jpeg" }} + {{- $webp := .Crop "1400x400 webp picture" }} -
+
+ {{ end }}

{{ .Title }}

diff --git a/layouts/spectacles/list.html b/layouts/spectacles/list.html index 47dbeab..70e24a8 100644 --- a/layouts/spectacles/list.html +++ b/layouts/spectacles/list.html @@ -13,17 +13,22 @@ {{ range .Pages.ByDate.Reverse }} {{ end }}
diff --git a/layouts/spectacles/single.html b/layouts/spectacles/single.html index ceae054..b085a80 100644 --- a/layouts/spectacles/single.html +++ b/layouts/spectacles/single.html @@ -17,8 +17,13 @@
{{ $img := resources.GetMatch (print .File.Dir "/principal.*") }} {{ with $img }} + {{- $jpeg := .Resize (printf "%dx%d jpeg" .Width .Height) }} + {{- $webp := .Resize (printf "%dx%d webp picture" .Width .Height) }}
- + + + {{ .Permalink }} +
{{ end }}
@@ -83,8 +88,13 @@
{{ $img := resources.GetMatch ( print .File.Dir "/savoir.*") }} {{ with $img }} + {{- $jpeg := .Resize (printf "%dx%d jpeg" .Width .Height) }} + {{- $webp := .Resize (printf "%dx%d webp picture" .Width .Height) }}
- + + + {{ .Permalink }} +
{{ end }}
@@ -118,10 +128,12 @@ {{ with $imgs }} {{ range $imgs }} - {{ $img := .}} - - {{ $img.Name }} - + {{- $jpeg := .Resize "600x jpeg" }} + {{- $webp := .Resize "600x webp picture" }} + + + {{ .Name }} + {{ end}} {{ end }}