feat: caching headers
This commit is contained in:
@@ -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"
|
||||
>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user