camper/web/templates/admin/layout.gohtml

123 lines
4.8 KiB
Plaintext

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
<!doctype html>
<html lang="{{ currentLocale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-header" content="{ {{ CSRFHeader }} }">
<title>{{ template "title" . }} — Camper</title>
<link rel="stylesheet" media="screen" href="/static/camper.css?v={{ camperVersion }}">
<link rel="stylesheet" media="screen" href="/static/icons.css?v={{ camperVersion }}">
<script src="/static/sortable@1.15.1.min.js"></script>
<script src="/static/alpinejs@3.13.3.min.js" defer></script>
<script src="/static/htmx@1.9.3.min.js"></script>
<script type="module" src="/static/camper.js?v={{ camperVersion }}"></script>
{{ block "head" . }}{{ end }}
</head>
<body>
<a href="#content">{{( gettext "Skip to main content" )}}</a>
<header>
<h1>camper _ws</h1>
{{ if isLoggedIn -}}
<nav>
<details>
<summary>
<img src="/me/avatar" alt="{{( gettext "Avatar" )}}" width="70" height="70">
<span>{{( pgettext "User Menu" "title" )}}</span>
</summary>
<ul>
<li>
<a href="/me">{{( pgettext "Profile" "title" )}}</a>
</li>
{{ if isAdmin -}}
<li>
<a href="/admin/company">{{( pgettext "Company Settings" "title" )}}</a>
</li>
<li>
<a href="/admin/payments">{{( pgettext "Payments" "title" )}}</a>
</li>
<li>
<a href="/admin/campsites/types">{{( pgettext "Campsite Types" "title" )}}</a>
</li>
<li>
<a href="/admin/campsites">{{( pgettext "Campsites" "title" )}}</a>
</li>
<li>
<a href="/admin/amenities">{{( pgettext "Amenities" "title" )}}</a>
</li>
<li>
<a href="/admin/seasons">{{( pgettext "Seasons" "title" )}}</a>
</li>
<li>
<a href="/admin/media">{{( pgettext "Media" "title" )}}</a>
</li>
<li>
<a href="/admin/home">{{( pgettext "Home Page" "title" )}}</a>
</li>
<li>
<a href="/admin/services">{{( pgettext "Services Page" "title" )}}</a>
</li>
<li>
<a href="/admin/location">{{( pgettext "Location" "title" )}}</a>
</li>
<li>
<a href="/admin/surroundings">{{( pgettext "Surroundings" "title" )}}</a>
</li>
<li>
<a href="/admin/legal">{{( pgettext "Legal Texts" "title" )}}</a>
</li>
<li>
<a href="/admin/users">{{( pgettext "Users" "title" )}}</a>
</li>
{{- end }}
<li class="icon_logout">
<button data-hx-delete="/me/session" data-hx-headers='{ {{ CSRFHeader }} }'
>{{( pgettext "Logout" "action" )}}</button>
</li>
</ul>
</details>
</nav>
{{- end }}
</header>
{{ if isLoggedIn -}}
<nav>
<ul>
<li>
<a href="/admin/">{{( pgettext "Dashboard" "title" )}}</a>
</li>
<li>
<a href="/admin/bookings">{{( pgettext "Bookings" "title" )}}</a>
</li>
<li>
<a href="/admin/customers">{{( pgettext "Customers" "title" )}}</a>
</li>
<li>
<a href="/admin/invoices">{{( pgettext "Invoices" "title" )}}</a>
</li>
<li>
<a href="/admin/campsites">{{( pgettext "Campsites" "title" )}}</a>
</li>
</ul>
</nav>
{{- end }}
{{ block "breadcrumb-nav" . -}}
{{ $label := (gettext "Breadcrumb")}}
<nav aria-label="{{ $label }}" class="breadcrumb">
<ol>
{{- template "breadcrumb" . }}
<li><a aria-current="page" href="">{{ template "title" . }}</a></li>
</ol>
</nav>
{{- end }}
<main id="content">
{{- template "content" . }}
</main>
<footer>
<p><small>{{printf (gettext "Camper Version: %s") camperVersion }}</small></p>
</footer>
</body>
</html>