Compare commits

...

2 Commits

Author SHA1 Message Date
888aaedb58 fix singleview con featured svg (#102)
Reviewed-on: BgLUG/bglug.it#102
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-07-14 09:16:04 +00:00
c050d29aa3 added robots.txt (#101)
Reviewed-on: BgLUG/bglug.it#101
Co-authored-by: paspo <paolo@asperti.com>
Co-committed-by: paspo <paolo@asperti.com>
2024-07-14 09:15:06 +00:00
2 changed files with 8 additions and 3 deletions

View File

@ -9,6 +9,7 @@ theme: hugo-arcana
copyright: 2024 © Bergamo Linux Users Group
paginate: 20
timeout: 60s
enableRobotsTXT: true
params:
description: Bergamo Linux Users Group

View File

@ -11,6 +11,7 @@
{{- if or .Params.image .Params.featured }}
{{- $maxHeight := 600 -}}
{{ $rasters := slice "jpeg" "png" }}
{{- $img := "#" -}}
{{- if .Params.image -}}
@ -22,11 +23,14 @@
{{/* se è stata definita un'immagine featured */}}
{{- $img = .Page.Resources.GetMatch .Params.featured -}}
{{- end -}}
{{- $image := $img.Resize (printf "x%d" $maxHeight) -}}
<span class="image featured">
<img src="{{ $image.RelPermalink }}" alt="{{ .Params.image_alt }}" style="width: {{ $image.Width }}px; max-height: {{ $maxHeight }}px;" />
{{- if in $rasters $img.MediaType.SubType -}}
{{- $img = $img.Resize (printf "x%d" $maxHeight) -}}
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.image_alt }}" style="width: {{ $img.Width }}px; max-height: {{ $maxHeight }}px;" />
{{ else }}
<img src="{{ $img.RelPermalink }}" alt="{{ .Params.image_alt }}" style="max-height: {{ $maxHeight }}px;" />
{{ end }}
</span>
{{ end }}