69 lines
2.1 KiB
Plaintext
69 lines
2.1 KiB
Plaintext
package pages
|
|
|
|
import (
|
|
"github.com/b2dennis/meshi/ui/components/table"
|
|
"github.com/b2dennis/meshi/ui/components/card"
|
|
"github.com/b2dennis/meshi/csv"
|
|
)
|
|
|
|
var weekdays = [7]string{
|
|
"Montag",
|
|
"Dienstag",
|
|
"Mittwoch",
|
|
"Donnerstag",
|
|
"Freitag",
|
|
"Samstag",
|
|
"Sonntag",
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
for i,day := range(weekdays) {
|
|
{{
|
|
class := ""
|
|
if i == 6 {
|
|
class = "border-b-0"
|
|
}
|
|
}}
|
|
@table.Row(table.RowProps{Class: class}) {
|
|
@table.Cell() {
|
|
{day}
|
|
}
|
|
for _, menu := range plan.Menus[i] {
|
|
@table.Cell() {
|
|
{menu}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</body>
|
|
</html>
|
|
} |