81 lines
2.7 KiB
Plaintext
81 lines
2.7 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">
|
|
<title>{{ template "title" . }} — Camper</title>
|
|
<link rel="stylesheet" media="screen" href="/static/camper.css">
|
|
<script type="module" src="/static/camper.js"></script>
|
|
<script src="/static/htmx@1.9.3.min.js"></script>
|
|
{{ block "head" . }}{{ end }}
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<a href="#main">{{( gettext "Skip to main content" )}}</a>
|
|
<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 class="icon_profile">
|
|
<a href="/me">{{( pgettext "Profile" "title" )}}</a>
|
|
</li>
|
|
{{ if isAdmin -}}
|
|
<li class="icon_company">
|
|
<a href="/admin/company">{{( pgettext "Company Settings" "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>
|
|
</ul>
|
|
</nav>
|
|
{{- end }}
|
|
<main id="main">
|
|
{{- template "content" . }}
|
|
</main>
|
|
</body>
|
|
</html>
|
|
|
|
{{ define "settings-tabs" -}}
|
|
<nav>
|
|
<ul>
|
|
<li>
|
|
<a {{ if ne . "taxDetails" }}href="/admin/company"{{ end }}>{{( pgettext "Tax Details" "title" )}}</a>
|
|
</li>
|
|
<li>
|
|
<a {{ if ne . "campsiteTypes" }}href="/admin/campsites/types"{{ end }}>{{( pgettext "Campsite Types" "title" )}}</a>
|
|
</li>
|
|
<li>
|
|
<a {{ if ne . "campsites"}}href="/admin/campsites"{{ end }}>{{( pgettext "Campsites" "title" )}}</a>
|
|
</li>
|
|
<li>
|
|
<a {{ if ne . "seasons"}}href="/admin/seasons"{{ end }}>{{( pgettext "Seasons" "title" )}}</a>
|
|
</li>
|
|
<li>
|
|
<a {{ if ne . "home"}}href="/admin/home"{{ end }}>{{( pgettext "Home Page" "title" )}}</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
{{- end }}
|