Build-time minification, image optimization, htmx SPA navigation, and local htmx bundle

This commit is contained in:
bronku 2026-06-10 16:15:42 +02:00
parent 50a5ca2c71
commit b95d5c2ee5
13 changed files with 186 additions and 115 deletions

View file

@ -24,6 +24,13 @@ func processImage(fileName string) string {
return dst[4:]
}
templ AvifImage(srcPath, alt string) {
<img src={ processImage(srcPath) } alt={ alt }/>
templ AvifImage(srcPath, alt string, lazy bool, priority bool) {
<img src={ processImage(srcPath) } alt={ alt }
if lazy {
loading="lazy"
}
if priority {
fetchpriority="high"
}
/>
}