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-06-01 18:19:04 +02:00
|
|
|
e "github.com/willoma/gomplements"
|
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(
|
2024-06-01 18:19:04 +02:00
|
|
|
b.Media(
|
|
|
|
|
b.MarginBottom(0),
|
|
|
|
|
b.MediaLeft(
|
|
|
|
|
Figure,
|
2024-06-11 00:20:40 +02:00
|
|
|
b.ImageImg("assets/images/darius_circle_noEdge_crop_upscayl_1x_realesrgan-x4plus-anime.png",
|
2025-02-25 22:08:40 +01:00
|
|
|
b.OnImg(e.Class("object-scale-down grayscale "+
|
2024-06-11 11:03:08 +02:00
|
|
|
"max-h-[calc(25vh_-_3.75rem)] "+
|
|
|
|
|
"sm:max-h-[calc(40vh_-_3.75rem)] "+
|
|
|
|
|
"md:max-h-[calc(60vh_-_3.75rem)] "+
|
|
|
|
|
"lg:max-h-[calc(100vh_-_3.75rem)] ")),
|
2024-06-11 00:20:40 +02:00
|
|
|
),
|
2024-06-01 18:19:04 +02:00
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
b.Section(
|
2024-06-11 11:03:08 +02:00
|
|
|
b.Margin(100),
|
2024-06-01 18:19:04 +02:00
|
|
|
e.H1("Darius Klein",
|
2025-02-25 22:08:40 +01:00
|
|
|
e.Class("title backdrop-blur "+
|
2024-06-11 11:03:08 +02:00
|
|
|
"text-2xl "+
|
|
|
|
|
"sm:text-4xl "+
|
|
|
|
|
"md:text-6xl "+
|
|
|
|
|
"lg:text-8xl "),
|
|
|
|
|
),
|
2024-06-01 18:19:04 +02:00
|
|
|
e.H2(
|
|
|
|
|
"Backend developer die zelf zijn servers kan opzetten.",
|
2025-02-25 22:08:40 +01:00
|
|
|
e.Class("subtitle backdrop-blur"),
|
2024-06-11 11:03:08 +02:00
|
|
|
),
|
|
|
|
|
|
|
|
|
|
b.ButtonAHref("/projects", "Mijn projecten.", b.Primary, b.Centered, b.Large),
|
2024-06-01 18:19:04 +02:00
|
|
|
),
|
|
|
|
|
Class("flex"),
|
|
|
|
|
),
|
2024-05-29 16:14:34 +02:00
|
|
|
Hr(Class("h-1 border-t-0 bg-neutral-300 dark:bg-white/100 flex")),
|
|
|
|
|
)
|
2024-05-16 22:56:04 +02:00
|
|
|
}
|