Initial commit: TechCare Hugo site

Hugo site scaffold with blog and hardware pages, layouts, styles,
fonts, and image assets.
This commit is contained in:
2026-10-05 13:34:35 +00:00
commit e14602d01d
51 changed files with 1024 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
{{- /* Resolves a front-matter "featured" path (relative to assets/) through
Hugo's image pipeline. Hugo's Resize also scales up, so only convert to
WebP and shrink when the source is wider than the given width. */ -}}
{{- $path := .path -}}
{{- $max := .max -}}
{{- $class := .class -}}
{{- $alt := .alt | default "" -}}
{{- $loading := .loading | default "eager" -}}
{{- with resources.Get $path -}}
{{- $img := . -}}
{{- if and (eq $img.ResourceType "image") (gt $img.Width $max) -}}
{{- $img = $img.Resize (printf "%dx q82 webp" $max) -}}
{{- end -}}
<img class="{{ $class }}" src="{{ $img.RelPermalink }}" alt="{{ $alt }}" width="{{ $img.Width }}" height="{{ $img.Height }}" loading="{{ $loading }}" decoding="async"{{ if eq $loading "eager" }} fetchpriority="high"{{ end }}>
{{- else -}}
{{- warnf "featured image not found in assets: %s" $path -}}
{{- end -}}