Split app into subpages, persist ingame time, and add 14-month dashboard calendar

This commit is contained in:
Kai
2026-02-16 12:53:35 +01:00
parent 5c37a7ba43
commit 5528d3e688
15 changed files with 1522 additions and 1145 deletions

34
templates/general.html Normal file
View File

@@ -0,0 +1,34 @@
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FarmCal - Allgemein</title>
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<header class="top"><h1>FarmCal</h1><p>Allgemeine Einstellungen</p></header>
<nav class="tabs">
<a href="/" class="{{if eq .ActivePath "/"}}active{{end}}">Dashboard</a>
<a href="/planning" class="{{if eq .ActivePath "/planning"}}active{{end}}">Anbau planen</a>
<a href="/crops" class="{{if eq .ActivePath "/crops"}}active{{end}}">Feldfruechte</a>
<a href="/fields" class="{{if eq .ActivePath "/fields"}}active{{end}}">Felder & Gruppen</a>
<a href="/general" class="{{if eq .ActivePath "/general"}}active{{end}}">Allgemein</a>
</nav>
<main class="layout">
<section class="card">
<h2>Tage pro Monat</h2>
<form method="post" action="/settings/days" class="grid">
<label>Tage pro Ingame-Monat
<input type="number" name="days_per_month" min="1" max="31" value="{{.Settings.DaysPerMonth}}" required>
</label>
<button type="submit">Speichern</button>
</form>
</section>
</main>
{{if .Error}}<div class="toast error">{{.Error}}</div>{{end}}
{{if .Info}}<div class="toast info">{{.Info}}</div>{{end}}
</body>
</html>