feat: add Prettier with go-template and toml plugins, format all files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-08 13:18:05 +02:00
parent b78bc26322
commit 436223913e
36 changed files with 1765 additions and 1178 deletions
+19 -22
View File
@@ -2,35 +2,32 @@
Renders an image or video from a front matter map.
Usage:
{{ partial "media.html" (dict "media" .Params.banner "class" "w-full h-full object-cover") }}
Parameters:
media — map with keys: type (image|video), src, alt
class — CSS classes applied to the img/video element
lazy — set to false to disable lazy loading (default true)
*/ -}}
{{ partial "media.html" (dict "media" .Params.banner "class" "w-full h-full object-cover")
}}
Parameters: media — map with keys: type (image|video), src, alt class — CSS classes applied to the img/video element
lazy — set to false to disable lazy loading (default true) */ -}}
{{- $media := .media -}}
{{- $class := .class | default "" -}}
{{- $lazy := .lazy | default true -}}
{{- with $media -}}
{{- if eq .type "video" -}}
<video
class="{{ $class }}"
src="{{ .src }}"
autoplay
loop
muted
playsinline
{{- with .alt }} aria-label="{{ . }}"{{ end }}
></video>
<video
class="{{ $class }}"
src="{{ .src }}"
autoplay
loop
muted
playsinline
{{- with .alt }}aria-label="{{ . }}"{{ end }}
></video>
{{- else -}}
<img
class="{{ $class }}"
src="{{ .src }}"
alt="{{ .alt | default "" }}"
{{- if $lazy }} loading="lazy" decoding="async"{{ end }}
>
<img
class="{{ $class }}"
src="{{ .src }}"
alt="{{ .alt | default "" }}"
{{- if $lazy }}loading="lazy" decoding="async"{{ end }}
/>
{{- end -}}
{{- end -}}