Files
DoGaMa-serv/internal/web/templates/components.html
T
codex 39a33556d6
CI / validate (pull_request) Successful in 26m0s
chore(code): improve source readability
2026-08-15 23:09:59 +02:00

60 lines
1.9 KiB
HTML

{{define "sidebar"}}
<link rel="stylesheet" href="/static/mobile-fixes.css">
<header class="mobile-header">
<a href="/">
<img src="/static/dogama.png" alt="DoGaMa">
</a>
<button class="menu-button" type="button" aria-controls="app-navigation" aria-expanded="false">
Menu
</button>
</header>
<aside class="sidebar" id="app-navigation">
<a class="brand brand-image" href="/">
<img src="/static/dogama.png" alt="DoGaMa">
</a>
<nav aria-label="{{.Msg "nav.primary"}}">
<a class="nav-dashboard {{if eq .ActivePage "dashboard"}}active{{end}}" href="/">
{{.Msg "nav.dashboard"}}
</a>
<a class="nav-catalog {{if eq .ActivePage "catalog"}}active{{end}}" href="/catalog">
{{.Msg "nav.catalog"}}
</a>
{{if .IsAdmin}}
<a class="nav-audit {{if eq .ActivePage "audit"}}active{{end}}" href="/audit">
{{.Msg "nav.audit"}}
</a>
<a class="nav-administration {{if eq .ActivePage "administration"}}active{{end}}" href="/administration">
Administration
</a>
{{end}}
<a class="nav-account {{if eq .ActivePage "account"}}active{{end}}" href="/account">
⚙
{{.Msg "nav.settings"}}
</a>
</nav>
<div class="account">
<p class="sr-only">{{.Msg "account.signed_in"}} <strong>{{.User.Username}}</strong>.</p>
<div class="account-card">
<span class="avatar">
DG
</span>
<span>
<strong>
{{.User.Username}}
</strong>
<small>
{{.User.Role}}
</small>
</span>
</div>
<form method="post" action="/logout">
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
<button class="signout-button" type="submit">
↪
{{.Msg "logout.submit"}}
</button>
</form>
</div>
</aside>
{{end}}