Files
nixos-router/pkgs/router-webui/templates/layout.html
T
nilsandClaude Sonnet 5.5 9cb2d28ea1 Put the Update and Packages pages on one Updates page
Router software and packages are two parts of one page, with one overlay,
one confirmation banner and both logs. /upgrade redirects to it; the
actions keep their addresses.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-24 22:55:54 +01:00

53 lines
2.5 KiB
HTML

<!doctype html>
<html lang="en"{{with .Theme}} data-theme="{{.}}"{{end}}>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{if .CSRF}}<meta name="csrf" content="{{.CSRF}}">{{end}}
<title>{{.Title}} · router</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body{{if not .LoggedIn}} class="bare"{{end}}>
<header>
<strong>router</strong>
{{if .LoggedIn}}
<input type="checkbox" id="menu" class="menu-toggle" aria-label="Menu">
<label for="menu" class="menu-button">Menu</label>
<nav>
<a href="/"{{if eq .Title "Overview"}} aria-current="page"{{end}}>Overview</a>
<div class="group"><span>Network</span>
<a href="/network"{{if eq .Title "Network"}} aria-current="page"{{end}}>Interfaces</a>
<a href="/dhcp"{{if eq .Title "DHCP"}} aria-current="page"{{end}}>DHCP</a>
<a href="/dns"{{if eq .Title "DNS"}} aria-current="page"{{end}}>DNS</a>
<a href="/wireguard"{{if eq .Title "WireGuard"}} aria-current="page"{{end}}>WireGuard</a>
<a href="/firewall"{{if eq .Title "Firewall"}} aria-current="page"{{end}}>Firewall</a>
</div>
<div class="group"><span>Services</span>
<a href="/ddns"{{if eq .Title "Dynamic DNS"}} aria-current="page"{{end}}>Dynamic DNS</a>
<a href="/dnsproviders"{{if eq .Title "DNS providers"}} aria-current="page"{{end}}>DNS providers</a>
<a href="/certificate"{{if eq .Title "Certificate"}} aria-current="page"{{end}}>Certificate</a>
<a href="/prometheus"{{if eq .Title "Prometheus"}} aria-current="page"{{end}}>Prometheus</a>
</div>
<div class="group"><span>System</span>
<a href="/update"{{if eq .Title "Updates"}} aria-current="page"{{end}}>Updates</a>
<a href="/tokens"{{if eq .Title "API access"}} aria-current="page"{{end}}>API access</a>
<a href="/advanced"{{if eq .Title "Advanced"}} aria-current="page"{{end}}>Advanced</a>
</div>
<form method="post" action="/logout"><input type="hidden" name="csrf" value="{{.CSRF}}"><button class="link">Log out</button></form>
</nav>
{{end}}
</header>
<main>
<h1>{{.Title}}</h1>
{{if .Flash}}<p class="flash">{{.Flash}}</p>{{end}}
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
<div id="live"{{if .Live}} data-live="{{.Live}}"{{end}}>{{template "content" .}}</div>
</main>
<script src="/static/menu.js"></script>
<script src="/static/live.js"></script>
<script src="/static/upload.js"></script>
<script src="/static/dialog.js"></script>
<script src="/static/diff.js"></script>
</body>
</html>