43 lines
1.5 KiB
HTML
43 lines
1.5 KiB
HTML
{{- $flashSuccess := index . "FlashSuccess" -}}
|
|
{{- $flashError := index . "FlashError" -}}
|
|
{{- $nav := index . "NavSection" -}}
|
|
<!doctype html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>{{index . "Title"}}</title>
|
|
<style>
|
|
body { font-family: system-ui, sans-serif; margin: 0; background: #f5f7fb; color: #1f2937; }
|
|
nav { background: #111827; color: #fff; padding: 12px 16px; display: flex; gap: 12px; }
|
|
nav a { color: #e5e7eb; text-decoration: none; }
|
|
nav a.active { color: #fff; font-weight: 600; }
|
|
.container { max-width: 960px; margin: 20px auto; padding: 0 16px; }
|
|
.flash { padding: 12px 14px; border-radius: 8px; margin-bottom: 12px; }
|
|
.flash.success { background: #dcfce7; color: #166534; }
|
|
.flash.error { background: #fee2e2; color: #991b1b; }
|
|
main { background: #fff; border-radius: 10px; padding: 20px; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<nav>
|
|
<a href="/" class="{{if eq $nav "public"}}active{{end}}">Public</a>
|
|
<a href="/private" class="{{if eq $nav "private"}}active{{end}}">Private</a>
|
|
<a href="/admin" class="{{if eq $nav "admin"}}active{{end}}">Admin</a>
|
|
</nav>
|
|
|
|
<div class="container">
|
|
{{if $flashSuccess}}
|
|
<div class="flash success">{{$flashSuccess}}</div>
|
|
{{end}}
|
|
{{if $flashError}}
|
|
<div class="flash error">{{$flashError}}</div>
|
|
{{end}}
|
|
|
|
<main>
|
|
{{index . "Content"}}
|
|
</main>
|
|
</div>
|
|
</body>
|
|
</html>
|