first prototype
This commit is contained in:
82
ui/pages/home.templ
Normal file
82
ui/pages/home.templ
Normal file
@@ -0,0 +1,82 @@
|
||||
package pages
|
||||
|
||||
import (
|
||||
"github.com/b2dennis/meshi/ui/components/table"
|
||||
"github.com/b2dennis/meshi/csv"
|
||||
)
|
||||
|
||||
templ Home(plan csv.Plan) {
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Menüplan</title>
|
||||
<link href="https://coder.base2.sh/@b2dennis/rose-coyote-52.main/apps/code-server/proxy/8080/assets/css/output.css" type="text/css" rel="stylesheet">
|
||||
</head>
|
||||
<body class="w-full">
|
||||
@table.Table() {
|
||||
@table.Caption() {
|
||||
Menüplan
|
||||
}
|
||||
@table.Header() {
|
||||
@table.Row() {
|
||||
@table.Head() {
|
||||
Mahlzeit
|
||||
}
|
||||
@table.Head() {
|
||||
Montag
|
||||
}
|
||||
@table.Head() {
|
||||
Dienstag
|
||||
}
|
||||
@table.Head() {
|
||||
Mittwoch
|
||||
}
|
||||
@table.Head() {
|
||||
Donnerstag
|
||||
}
|
||||
@table.Head() {
|
||||
Freitag
|
||||
}
|
||||
@table.Head() {
|
||||
Samstag
|
||||
}
|
||||
@table.Head() {
|
||||
Sonntag
|
||||
}
|
||||
}
|
||||
}
|
||||
@table.Row() {
|
||||
@table.Cell() {
|
||||
Frühstück
|
||||
}
|
||||
for _, menu := range plan.Menus[0] {
|
||||
@table.Cell() {
|
||||
{menu}
|
||||
}
|
||||
}
|
||||
}
|
||||
@table.Row() {
|
||||
@table.Cell() {
|
||||
Mittagessen
|
||||
}
|
||||
for _, menu := range plan.Menus[1] {
|
||||
@table.Cell() {
|
||||
{menu}
|
||||
}
|
||||
}
|
||||
}
|
||||
@table.Row() {
|
||||
@table.Cell() {
|
||||
Abendessen
|
||||
}
|
||||
for _, menu := range plan.Menus[2] {
|
||||
@table.Cell() {
|
||||
{menu}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
Reference in New Issue
Block a user