2024-05-16 22:56:04 +02:00
|
|
|
package handlers
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
g "github.com/maragudk/gomponents"
|
2024-05-18 18:20:37 +02:00
|
|
|
. "github.com/maragudk/gomponents/html"
|
2024-05-29 16:14:34 +02:00
|
|
|
b "github.com/willoma/bulma-gomponents"
|
2024-05-16 22:56:04 +02:00
|
|
|
"net/http"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func HomePageHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
|
2024-05-18 13:43:22 +02:00
|
|
|
err := Page("Homepage", createHomeBody(w, r)).Render(w)
|
2024-05-16 22:56:04 +02:00
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-18 18:22:44 +02:00
|
|
|
func createHomeBody(w http.ResponseWriter, r *http.Request) g.Node {
|
2024-05-16 22:56:04 +02:00
|
|
|
|
2024-05-29 16:14:34 +02:00
|
|
|
return Body(
|
|
|
|
|
Div(
|
|
|
|
|
Class("flex max-h-[calc(100vh_-_3.75rem)]"),
|
|
|
|
|
b.ImageImg("assets/images/Darius_pasfoto_2023_Large.png",
|
|
|
|
|
b.OnImg(Class("object-scale-down max-h-full m-auto")),
|
|
|
|
|
)),
|
|
|
|
|
Hr(Class("h-1 border-t-0 bg-neutral-300 dark:bg-white/100 flex")),
|
|
|
|
|
)
|
2024-05-16 22:56:04 +02:00
|
|
|
}
|