Build-time minification, image optimization, htmx SPA navigation, and local htmx bundle
This commit is contained in:
parent
50a5ca2c71
commit
b95d5c2ee5
13 changed files with 186 additions and 115 deletions
|
|
@ -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"
|
||||
}
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue