37 lines
1.7 KiB
HTML
37 lines
1.7 KiB
HTML
{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
|
|
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
|
|
|
|
{{define "layout"}}<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="referrer" content="same-origin">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="color-scheme" content="light dark">
|
|
<title>{{template "title" .}} - {{.AppName}}</title>
|
|
<link rel="icon" href="data:,">
|
|
<link rel="stylesheet" href="{{.Static}}css/app.css">
|
|
{{if .Script}}<script type="module" src="{{.Static}}js/{{.Script}}.js"></script>
|
|
{{end}}</head>
|
|
<body>
|
|
<a class="skip" href="#app">Skip to content</a>
|
|
<header class="topbar">
|
|
<a class="brand" href="/">{{.AppName}}</a>
|
|
{{if .Username}}<nav class="nav" aria-label="Main">
|
|
<a href="/"{{if eq .Section "zones"}} aria-current="page"{{end}}>Zones</a>
|
|
<a href="/audit"{{if eq .Section "audit"}} aria-current="page"{{end}}>Audit</a>
|
|
<a href="/account"{{if eq .Section "account"}} aria-current="page"{{end}}>Account</a>
|
|
{{if .IsAdmin}}<a href="/users"{{if eq .Section "users"}} aria-current="page"{{end}}>Users</a>
|
|
{{end}}</nav>
|
|
<form class="logout" method="post" action="/logout">
|
|
<span class="who"><span class="who-name">{{.Username}}</span> <span class="badge badge-muted">{{.Role}}</span></span>
|
|
<button type="submit" class="btn btn-small">Log out</button>
|
|
</form>
|
|
{{end}}</header>
|
|
<main id="app" class="page page-{{.Page}}" tabindex="-1" data-page="{{.Page}}" data-username="{{.Username}}" data-role="{{.Role}}" data-zone="{{.Zone}}" data-target-user="{{.TargetUser}}">
|
|
{{template "content" .}}
|
|
</main>
|
|
<div id="toasts" class="toasts" role="status" aria-live="polite" aria-atomic="false"></div>
|
|
</body>
|
|
</html>{{end}}
|