From 7423f4f5d176baad15d3456312bab2524a88d545 Mon Sep 17 00:00:00 2001 From: Toshaan Bharvani Date: Thu, 9 Dec 2021 12:21:12 +0100 Subject: [PATCH] all images are now processed to webp Signed-off-by: Toshaan Bharvani --- .../layouts/boardofdirectors/list.html | 55 +++++++++---------- .../layouts/groups/single.html | 2 +- .../openpowerfoundation/layouts/hub/list.html | 2 +- .../layouts/members/list.html | 2 +- .../layouts/steeringcommittee/list.html | 6 +- 5 files changed, 32 insertions(+), 35 deletions(-) diff --git a/themes/openpowerfoundation/layouts/boardofdirectors/list.html b/themes/openpowerfoundation/layouts/boardofdirectors/list.html index 3460586..a67cab5 100644 --- a/themes/openpowerfoundation/layouts/boardofdirectors/list.html +++ b/themes/openpowerfoundation/layouts/boardofdirectors/list.html @@ -4,25 +4,25 @@
-

{{ .Title }}

- {{ range .Data.Pages.ByWeight }} +

{{ .Title }}

+ {{ range .Data.Pages.ByWeight }}
- {{ $personfile := .File.BaseFileName }} - {{ range where .Site.Pages "Section" "persons" }} - {{ $person := .File.BaseFileName }} - {{ if eq $personfile $person }} + {{ $personfile := .File.BaseFileName }} + {{ range where .Site.Pages "Section" "persons" }} + {{ $person := .File.BaseFileName }} + {{ if eq $personfile $person }} {{ if .Param "image" }} - {{ $imagename := .Param "image" }} - {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }} - {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "390x390" }} - {{ .Title }} - {{ else }} - {{ .Title }} - {{ end }} - {{ end }} + {{ $imagename := .Param "image" }} + {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }} + {{ $imageresource := resources.Get $imagelocation }} + {{ $image := $imageresource.Fit "390x390 webp" }} + {{ .Title }} + {{ else }} + {{ .Title }} + {{ end }} {{ end }} + {{ end }}

{{ .Title }}, {{ .Param "position" }}

@@ -35,28 +35,25 @@ {{ if eq $personfile $person }}

{{ if eq $persontitle "Hugh Blemings" }} - Individual + Individual {{ else if eq $persontitle "James Kulina"}} - OpenPOWER Foundation + OpenPOWER Foundation {{ else }} - - {{ range where .Site.Pages "Section" "members" }} - {{ $company_title := upper .Title }} - - {{if eq $company_member $company_title}} - {{ $company_member }} - {{ end }} + {{ range where .Site.Pages "Section" "members" }} + {{ $company_title := upper .Title }} + {{ if eq $company_member $company_title }} + {{ $company_member }} + {{ end }} {{ end }} - {{ end }} - + {{ end }}

{{ .Content }}

- {{ end }} - {{ end }} {{ end }} -
+ {{ end }} + {{ end }} +
{{ partial "footer.html" . }} diff --git a/themes/openpowerfoundation/layouts/groups/single.html b/themes/openpowerfoundation/layouts/groups/single.html index faf3563..d987275 100644 --- a/themes/openpowerfoundation/layouts/groups/single.html +++ b/themes/openpowerfoundation/layouts/groups/single.html @@ -114,7 +114,7 @@ {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "75x75" }} + {{ $image := $imageresource.Fit "75x75 webp" }} {{ .Title }} {{ else }} {{ .Title }} diff --git a/themes/openpowerfoundation/layouts/hub/list.html b/themes/openpowerfoundation/layouts/hub/list.html index af25f60..3c39874 100644 --- a/themes/openpowerfoundation/layouts/hub/list.html +++ b/themes/openpowerfoundation/layouts/hub/list.html @@ -32,7 +32,7 @@ {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "100x100" }} + {{ $image := $imageresource.Fit "100x100 webp" }} {{ .Title }} {{ end }} {{ end }} diff --git a/themes/openpowerfoundation/layouts/members/list.html b/themes/openpowerfoundation/layouts/members/list.html index de7466f..2447a92 100644 --- a/themes/openpowerfoundation/layouts/members/list.html +++ b/themes/openpowerfoundation/layouts/members/list.html @@ -18,7 +18,7 @@ {{ $key := .identifier }} {{ $imageheight := .image.height }} {{ $imagewidth := .image.width }} - {{ $imagesize := .size }} + {{ $imagesize := printf "%s webp" .size }} {{ $col := .col }}
{{ range $.Site.Pages }} diff --git a/themes/openpowerfoundation/layouts/steeringcommittee/list.html b/themes/openpowerfoundation/layouts/steeringcommittee/list.html index 6f38d48..216ed64 100644 --- a/themes/openpowerfoundation/layouts/steeringcommittee/list.html +++ b/themes/openpowerfoundation/layouts/steeringcommittee/list.html @@ -38,7 +38,7 @@ {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "100x100" }} + {{ $image := $imageresource.Fit "100x100 webp" }} {{ .Title }} {{ else }} {{ .Title }} @@ -90,7 +90,7 @@ {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "100x100" }} + {{ $image := $imageresource.Fit "100x100 webp" }} {{ .Title }} {{ else }} {{ .Title }} @@ -107,7 +107,7 @@ {{ $imagename := .Param "image" }} {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }} {{ $imageresource := resources.Get $imagelocation }} - {{ $image := $imageresource.Fit "100x400" }} + {{ $image := $imageresource.Fit "100x400 webp" }} {{ .Title }} {{ else }}