2026-08-23 20:39:22 +03:00
|
|
|
{{/* html/template requires {{template "name"}} names to be string
|
|
|
|
|
literals, not dynamic pipelines — so a single "layout" wrapper that
|
|
|
|
|
dispatches to a per-page content block by name isn't possible within
|
|
|
|
|
one shared template set. Instead, layout.html provides small named
|
|
|
|
|
partials (html_head, page_header, banner_inner, error_banner) that
|
|
|
|
|
each page's *_page template (see e.g. overview.html) assembles
|
|
|
|
|
around its own *_content block explicitly. A few lines of
|
|
|
|
|
boilerplate are duplicated per page as a result — see any *_page
|
|
|
|
|
define for the pattern. */}}
|
|
|
|
|
|
|
|
|
|
{{define "html_head"}}
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
|
<title>Cloud IP Validator — Admin</title>
|
2026-08-23 21:15:31 +03:00
|
|
|
<link rel="stylesheet" href="/static/vendor/bootstrap.min.css">
|
2026-08-23 20:39:22 +03:00
|
|
|
<link rel="stylesheet" href="/static/dashboard.css">
|
|
|
|
|
<script src="/static/vendor/htmx.min.js"></script>
|
|
|
|
|
<script src="/static/vendor/alpine.min.js" defer></script>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
|
|
{{define "page_header"}}
|
2026-08-23 21:15:31 +03:00
|
|
|
<nav class="navbar navbar-expand navbar-dark bg-dark">
|
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
<span class="navbar-brand mb-0">Cloud IP Validator</span>
|
|
|
|
|
<ul class="navbar-nav flex-row flex-wrap gap-1">
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "overview"}} active{{end}}" {{if eq .ActiveNav "overview"}}aria-current="page"{{end}} href="/overview">Обзор</a></li>
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "ips"}} active{{end}}" {{if eq .ActiveNav "ips"}}aria-current="page"{{end}} href="/ips">Очередь IP</a></li>
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "validators"}} active{{end}}" {{if eq .ActiveNav "validators"}}aria-current="page"{{end}} href="/validators">Валидаторы</a></li>
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "sites"}} active{{end}}" {{if eq .ActiveNav "sites"}}aria-current="page"{{end}} href="/sites">Площадки</a></li>
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "targets"}} active{{end}}" {{if eq .ActiveNav "targets"}}aria-current="page"{{end}} href="/targets">Цели</a></li>
|
|
|
|
|
<li class="nav-item"><a class="nav-link{{if eq .ActiveNav "check-types"}} active{{end}}" {{if eq .ActiveNav "check-types"}}aria-current="page"{{end}} href="/check-types">Типы проверок</a></li>
|
2026-08-23 20:39:22 +03:00
|
|
|
</ul>
|
2026-08-23 21:15:31 +03:00
|
|
|
</div>
|
2026-08-23 20:39:22 +03:00
|
|
|
</nav>
|
|
|
|
|
{{end}}
|
|
|
|
|
|
2026-08-23 21:15:31 +03:00
|
|
|
{{define "banner_inner"}}{{if .Message}}<div class="alert {{if .Client}}alert-warning{{else}}alert-danger{{end}} py-2 mb-0" role="alert">{{.Message}}</div>{{end}}{{end}}
|
2026-08-23 20:39:22 +03:00
|
|
|
|
|
|
|
|
{{define "error_banner"}}<div id="error-banner" hx-swap-oob="true">{{template "banner_inner" .}}</div>{{end}}
|