Verbeter weergave afbeeldingen en ondersteun webp
BIN
static/afbeeldingen/personen/bert-hubert-150x150.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
static/afbeeldingen/personen/bert-hubert-150x150.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
static/afbeeldingen/personen/bert-hubert-200x200.webp
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
static/afbeeldingen/personen/bjorn-wijers-150x150.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
static/afbeeldingen/personen/bjorn-wijers-150x150.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
static/afbeeldingen/personen/bjorn-wijers-200x200.webp
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
static/afbeeldingen/personen/brenda-langedijk-150x150.jpg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
static/afbeeldingen/personen/brenda-langedijk-150x150.webp
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
static/afbeeldingen/personen/brenda-langedijk-200x200.webp
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
static/afbeeldingen/personen/fred-donck-150x150.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
static/afbeeldingen/personen/fred-donck-150x150.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/afbeeldingen/personen/fred-donck-200x200.webp
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
static/afbeeldingen/personen/hans-van-de-looy-150x150.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
static/afbeeldingen/personen/hans-van-de-looy-150x150.webp
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
static/afbeeldingen/personen/hans-van-de-looy-200x200.webp
Normal file
After Width: | Height: | Size: 5.5 KiB |
BIN
static/afbeeldingen/personen/jan-sepp-150x150.jpg
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
static/afbeeldingen/personen/jan-sepp-150x150.webp
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
static/afbeeldingen/personen/jan-sepp-200x200.webp
Normal file
After Width: | Height: | Size: 5.2 KiB |
BIN
static/afbeeldingen/personen/jeroen-baten-150x150.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
static/afbeeldingen/personen/jeroen-baten-150x150.webp
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
static/afbeeldingen/personen/jeroen-baten-200x200.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
static/afbeeldingen/personen/koen-de-jonge-150x150.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
static/afbeeldingen/personen/koen-de-jonge-150x150.webp
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
static/afbeeldingen/personen/koen-de-jonge-200x200.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
static/afbeeldingen/personen/mark-janssen-150x150.jpg
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
static/afbeeldingen/personen/mark-janssen-150x150.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
static/afbeeldingen/personen/mark-janssen-200x200.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
static/afbeeldingen/personen/michael-boelen-150x150.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
static/afbeeldingen/personen/michael-boelen-150x150.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
static/afbeeldingen/personen/michael-boelen-200x200.webp
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
static/afbeeldingen/personen/patrick-reijnen-150x150.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
static/afbeeldingen/personen/patrick-reijnen-150x150.webp
Normal file
After Width: | Height: | Size: 2.4 KiB |
BIN
static/afbeeldingen/personen/patrick-reijnen-200x200.webp
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
static/afbeeldingen/personen/rogier-spoor-150x150.jpg
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
static/afbeeldingen/personen/rogier-spoor-150x150.webp
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
static/afbeeldingen/personen/rogier-spoor-200x200.webp
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
static/afbeeldingen/personen/ronny-lam-150x150.jpg
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
static/afbeeldingen/personen/ronny-lam-150x150.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
static/afbeeldingen/personen/ronny-lam-200x200.webp
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
static/afbeeldingen/personen/rudi-van-drunen-150x150.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
static/afbeeldingen/personen/rudi-van-drunen-150x150.webp
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
static/afbeeldingen/personen/rudi-van-drunen-200x200.webp
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
static/afbeeldingen/personen/willem-toorop-150x150.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
static/afbeeldingen/personen/willem-toorop-150x150.webp
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
static/afbeeldingen/personen/willem-toorop-200x200.webp
Normal file
After Width: | Height: | Size: 4.8 KiB |
|
@ -1,8 +1,50 @@
|
|||
<img
|
||||
src="{{ .Destination | safeURL }}"
|
||||
alt="{{ .Text }}"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
class="full-width"
|
||||
/>
|
||||
<picture>
|
||||
{{ $isJPG := eq (path.Ext .Destination) ".jpg" }}
|
||||
{{ $isPNG := eq (path.Ext .Destination) ".png" }}
|
||||
|
||||
{{ if ($isJPG) -}}
|
||||
{{ $avifPath:= replaceRE "(jpg|jpeg)$i" ".avif" .Destination }}
|
||||
{{ $avifPathStatic:= printf "static/%s" $avifPath }}
|
||||
|
||||
{{ if (fileExists $avifPathStatic) -}}
|
||||
<source srcset="{{ $avifPath | safeURL }}" type="image/avif" >
|
||||
{{- end }}
|
||||
|
||||
{{ $webpPath:= replace .Destination ".jpg" ".webp" }}
|
||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||
|
||||
{{ if (fileExists $webpPathStatic) -}}
|
||||
<source srcset="{{ $webpPath | safeURL }}" type="image/webp" >
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if ($isPNG) -}}
|
||||
{{ $avifPath:= replace .Destination ".png" ".avif" }}
|
||||
{{ $avifPathStatic:= printf "static/%s" $avifPath }}
|
||||
|
||||
{{ if (fileExists $avifPathStatic) -}}
|
||||
<source srcset="{{ $avifPath | safeURL }}" type="image/avif" >
|
||||
{{- end }}
|
||||
|
||||
{{ $webpPath:= replace .Destination ".png" ".webp" }}
|
||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||
|
||||
{{ if (fileExists $webpPathStatic) -}}
|
||||
<source srcset="{{ $webpPath | safeURL }}" type="image/webp" >
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- $img := .Page.Resources.GetMatch .Destination -}}
|
||||
{{- if and (not $img) .Page.File -}}
|
||||
{{ $path := path.Join .Page.File.Dir .Destination }}
|
||||
{{- $img = resources.Get $path -}}
|
||||
{{- end -}}
|
||||
<img
|
||||
src="{{ .Destination | safeURL }}"
|
||||
alt="{{ .Text }}"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="{{ $img.Width }}"
|
||||
height="{{ $img.Height }}"
|
||||
/>
|
||||
</picture>
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
{{ $size_in_pixels := 150 }}
|
||||
|
||||
<div class="grid-team-members-small-photos">
|
||||
{{ range $key,$val := .Scratch.Get "active_members" }}
|
||||
{{ with (index $.Site.Data.personen .) }}
|
||||
<div>
|
||||
{{ if .thumbnail }}
|
||||
<figure>
|
||||
{{ if .profile_page }}
|
||||
<a href="{{ .profile_page }}"><img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}"></a>
|
||||
{{ else }}
|
||||
<img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}">
|
||||
{{ end }}
|
||||
<figcaption>
|
||||
<small><strong>{{ .name }}</strong></small>
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ if .thumbnail }}
|
||||
{{ $image := replace .thumbnail "200x200" "150x150" }}
|
||||
{{ $alttext := printf "Foto van %s" .name }}
|
||||
{{ partial "show-image.html" (dict "context" . "image" $image "alt" $alttext "figcaption" .name "link" .profile_page) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
@ -1,19 +1,9 @@
|
|||
{{ $size_in_pixels := 150 }}
|
||||
{{ if .profile_details }}
|
||||
<div>
|
||||
{{ if .profile_details.thumbnail }}
|
||||
<figure>
|
||||
{{ if .profile_details.profile_page }}
|
||||
<a href="{{ .profile_details.profile_page }}"><img src="{{ .profile_details.thumbnail }}" alt="Foto van {{ .profile_details.name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}"></a>
|
||||
{{ else }}
|
||||
<img src="{{ .profile_details.thumbnail }}" alt="Foto van {{ .profile_details.name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}">
|
||||
{{ end }}
|
||||
{{ if not .hide_figcaption }}
|
||||
<figcaption>
|
||||
<small><strong>{{ .profile_details.name }}</strong></small>
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
</figure>
|
||||
{{ $image := replace .profile_details.thumbnail "200x200" "150x150" }}
|
||||
{{ $alttext := printf "Foto van %s" .profile_details.name }}
|
||||
{{ partial "show-image.html" (dict "context" . "image" $image "alt" $alttext) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
33
themes/nluug/layouts/partials/show-image.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<figure>
|
||||
<picture>
|
||||
{{ $isJPG := eq (path.Ext .image) ".jpg" }}
|
||||
{{ $isPNG := eq (path.Ext .image) ".png" }}
|
||||
|
||||
{{ if ($isJPG) -}}
|
||||
{{ $webpPath:= replace .image ".jpg" ".webp" }}
|
||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||
|
||||
{{ if (fileExists $webpPathStatic) -}}
|
||||
<source srcset="{{ $webpPath | safeURL }}" type="image/webp">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ if ($isPNG) -}}
|
||||
{{ $webpPath:= replace .image ".png" ".webp" }}
|
||||
{{ $webpPathStatic:= printf "static/%s" $webpPath }}
|
||||
|
||||
{{ if (fileExists $webpPathStatic) -}}
|
||||
<source srcset="{{ $webpPath | safeURL }}" type="image/webp">
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ $img := imageConfig (add "/static" (.image | safeURL)) }}
|
||||
{{ if .link }}<a href="{{ .link }}">{{ end }}
|
||||
<img src="{{ .image | safeURL }}" alt="{{ .alt }}" loading="lazy" decoding="async" width="{{ $img.Width }}" height="{{ $img.Height }}">
|
||||
{{ if .link }}</a>{{ end }}
|
||||
</picture>
|
||||
{{ if .figcaption }}
|
||||
<figcaption>
|
||||
<small><strong>{{ .figcaption }}</strong></small>
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{ end }}
|
|
@ -1,21 +1,12 @@
|
|||
{{ $size_in_pixels := 150 }}
|
||||
|
||||
<div class="grid-team-members-small-photos">
|
||||
{{ range $key,$val := .Scratch.Get "related_members" }}
|
||||
{{ with (index $.Site.Data.personen .) }}
|
||||
<div>
|
||||
{{ if .thumbnail }}
|
||||
<figure>
|
||||
{{ if .profile_page }}
|
||||
<a href="{{ .profile_page }}"><img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}"></a>
|
||||
{{ else }}
|
||||
<img src="{{ .thumbnail }}" alt="Foto van {{ .name }}" height="{{ $size_in_pixels }}" width="{{ $size_in_pixels }}">
|
||||
{{ end }}
|
||||
<figcaption>
|
||||
<small><strong>{{ .name }}</strong></small>
|
||||
</figcaption>
|
||||
</figure>
|
||||
{{ end }}
|
||||
{{ if .thumbnail }}
|
||||
{{ $image := replace .thumbnail "200x200" "150x150" }}
|
||||
{{ $alttext := printf "Foto van %s" .name }}
|
||||
{{ partial "show-image.html" (dict "context" . "image" $image "alt" $alttext "figcaption" .name "link" .profile_page) }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|