feat: translation middleware
This commit is contained in:
+12
-4
@@ -1,12 +1,20 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/web/layouts"
|
||||
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/internal/components/page"
|
||||
"git.schreifuchs.ch/schreifuchs/schreifuchs.ch/web/components"
|
||||
)
|
||||
|
||||
templ Index() {
|
||||
@layouts.Base("Home") {
|
||||
@components.Hello()
|
||||
templ Home(pages []page.Page) {
|
||||
for _, page := range pages {
|
||||
@components.ImageTile("https://picsum.photos/500/1000") {
|
||||
<a class="flex items-center justify-center h-full text-white" href={ "/" + page.UID }>
|
||||
<h2
|
||||
class="text-3xl font-bold text-white hover:underline text-shadow-lg"
|
||||
>
|
||||
{ page.Title }
|
||||
</h2>
|
||||
</a>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user