Files
meshi/ui/pages/home.templ
2025-12-03 11:12:04 +00:00

111 lines
3.8 KiB
Plaintext

package pages
import (
"github.com/b2dennis/meshi/ui/components/table"
"github.com/b2dennis/meshi/ui/components/card"
"github.com/b2dennis/meshi/csv"
)
templ Home(plan csv.Plan) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Menüplan</title>
<link href="/assets/css/output.css" type="text/css" rel="stylesheet">
</head>
<body class="w-full min-h-screen flex items-center justify-center dark bg-card">
@card.Card(card.Props{Class: "w-4/5 h-4/5"}) {
@table.Table() {
@table.Header() {
@table.Row() {
@table.Head() {
Wochentag
}
@table.Head() {
Frühstück
}
@table.Head() {
Mittagessen
}
@table.Head() {
Abendessen
}
}
}
@table.Row() {
@table.Cell() {
Montag
}
for _, menu := range plan.Menus[0] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Dienstag
}
for _, menu := range plan.Menus[1] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Mittwoch
}
for _, menu := range plan.Menus[2] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Donnerstag
}
for _, menu := range plan.Menus[3] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Freitag
}
for _, menu := range plan.Menus[4] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Samstag
}
for _, menu := range plan.Menus[5] {
@table.Cell() {
{menu}
}
}
}
@table.Row() {
@table.Cell() {
Sonntag
}
for _, menu := range plan.Menus[6] {
@table.Cell() {
{menu}
}
}
}
}
}
</body>
</html>
}