all images are now processed to webp

Signed-off-by: Toshaan Bharvani <toshaan@vantosh.com>
archetype-theme-transition
Toshaan Bharvani 3 years ago
parent 92ce340806
commit 7423f4f5d1

@ -16,7 +16,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "390x390" }} {{ $image := $imageresource.Fit "390x390 webp" }}
<img class="img-fluid" src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}"> <img class="img-fluid" src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }} {{ else }}
{{ .Title }} {{ .Title }}
@ -39,16 +39,13 @@
{{ else if eq $persontitle "James Kulina"}} {{ else if eq $persontitle "James Kulina"}}
<a href="https://openpowerfoundation.org" target="_blank">OpenPOWER Foundation</a> <a href="https://openpowerfoundation.org" target="_blank">OpenPOWER Foundation</a>
{{ else }} {{ else }}

{{ range where .Site.Pages "Section" "members" }} {{ range where .Site.Pages "Section" "members" }}
{{ $company_title := upper .Title }} {{ $company_title := upper .Title }}

{{ if eq $company_member $company_title }}
{{if eq $company_member $company_title}}
<a href="{{ .Param "link" }}" target="_blank">{{ $company_member }}</a> <a href="{{ .Param "link" }}" target="_blank">{{ $company_member }}</a>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
</h3> </h3>
<p>{{ .Content }}</p> <p>{{ .Content }}</p>
</div> </div>

@ -114,7 +114,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "75x75" }} {{ $image := $imageresource.Fit "75x75 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }} {{ else }}
{{ .Title }} {{ .Title }}

@ -32,7 +32,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "100x100" }} {{ $image := $imageresource.Fit "100x100 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}">
{{ end }} {{ end }}
{{ end }} {{ end }}

@ -18,7 +18,7 @@
{{ $key := .identifier }} {{ $key := .identifier }}
{{ $imageheight := .image.height }} {{ $imageheight := .image.height }}
{{ $imagewidth := .image.width }} {{ $imagewidth := .image.width }}
{{ $imagesize := .size }} {{ $imagesize := printf "%s webp" .size }}
{{ $col := .col }} {{ $col := .col }}
<div class="row d-flex justify-content-center"> <div class="row d-flex justify-content-center">
{{ range $.Site.Pages }} {{ range $.Site.Pages }}

@ -38,7 +38,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "100x100" }} {{ $image := $imageresource.Fit "100x100 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }} {{ else }}
{{ .Title }} {{ .Title }}
@ -90,7 +90,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/members/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "100x100" }} {{ $image := $imageresource.Fit "100x100 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}" title="{{ .Title }}">
{{ else }} {{ else }}
{{ .Title }} {{ .Title }}
@ -107,7 +107,7 @@
{{ $imagename := .Param "image" }} {{ $imagename := .Param "image" }}
{{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }} {{ $imagelocation := (printf "%s/%s" "images/persons/" $imagename) }}
{{ $imageresource := resources.Get $imagelocation }} {{ $imageresource := resources.Get $imagelocation }}
{{ $image := $imageresource.Fit "100x400" }} {{ $image := $imageresource.Fit "100x400 webp" }}
<img src="{{ $image.RelPermalink }}" alt="{{ .Title }}"> <img src="{{ $image.RelPermalink }}" alt="{{ .Title }}">
{{ else }} {{ else }}
&nbsp; &nbsp;

Loading…
Cancel
Save