feat: caching headers

This commit is contained in:
2026-03-02 22:37:48 +01:00
parent 19fb5b9292
commit e689ab08c9
19 changed files with 292 additions and 55 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import (
templ Home(pages []page.PageHeader) {
for _, page := range pages {
@components.ImageTile("https://picsum.photos/1000/500") {
<a class="flex items-center justify-center h-full " href={ "/" + page.UID }>
@components.ImageTile("https://picsum.photos/" + page.CoverImageUID) {
<a class="flex items-center justify-center h-full " href={ "/" + page.UID } preload="mouseover">
<h2
class="text-3xl font-bold text-white hover:underline text-shadow-lg"
>
+2 -2
View File
@@ -60,7 +60,7 @@ func Home(pages []page.PageHeader) templ.Component {
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\"><h2 class=\"text-3xl font-bold text-white hover:underline text-shadow-lg\">")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 2, "\" preload=\"mouseover\"><h2 class=\"text-3xl font-bold text-white hover:underline text-shadow-lg\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -79,7 +79,7 @@ func Home(pages []page.PageHeader) templ.Component {
}
return nil
})
templ_7745c5c3_Err = components.ImageTile("https://picsum.photos/1000/500").Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
templ_7745c5c3_Err = components.ImageTile("https://picsum.photos/"+page.CoverImageUID).Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}