camper/web/templates/public/layout.gohtml

94 lines
3.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/app.PublicPage*/ -}}
<!doctype html>
<html lang="{{ currentLocale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ template "title" . }} — {{( gettext "Campsite Montagut" )}}</title>
<link rel="preload" href="/static/fonts/MabryPro-Regular.woff2" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="/static/fonts/MabryPro-Bold.woff2" as="font" type="font/woff2" crossorigin>
<link rel="stylesheet" media="screen" href="/static/public.css">
{{ range .LocalizedAlternates -}}
<link rel="alternate" hreflang="{{ .Lang }}" href="{{ .HRef }}"/>
{{ end }}
{{- block "head" . }}{{ end }}
</head>
<body>
<a href="#content">{{( gettext "Skip to main content" )}}</a>
<header>
<h1><a href="/{{ currentLocale }}/"><span class="logo">◭</span><span class="name">{{( gettext "Campsite Montagut" )}}</span></a></h1>
<input type="checkbox" id="menuShowHide">
<label for="menuShowHide"></label>
<nav>
<ul>
<li><a href="/{{ currentLocale }}/">{{( pgettext "Home" "title" )}}</a></li>
{{ with .Menu -}}
{{ if .CampsiteTypes -}}
<li class="has-submenu">
<button type="button">{{( gettext "Singular Lodges" )}}</button>
<ul>
{{ range .CampsiteTypes -}}
<li><a href="{{ .HRef }}">{{ .Label }}</a></li>
{{ end }}
</ul>
</li>
{{- end }}
{{- end }}
{{ if .LocalizedAlternates -}}
<li class="has-submenu">{{ range .LocalizedAlternates -}}
{{ if eq .Lang currentLocale }}{{ template "alternateAnchor" . }}{{ end }}
{{- end }}
<ul>
{{ range .LocalizedAlternates }}{{ if ne .Lang currentLocale -}}
<li>{{ template "alternateAnchor" . }}</li>
{{ end }}{{ end }}
</ul>
</li>
{{- end }}
</ul>
</nav>
</header>
<main id="content">
{{- template "content" . }}
</main>
<footer>© {{( gettext "Campsite Montagut" )}} | 19842023</footer>
</body>
</html>
{{ define "alternateAnchor" -}}
<a rel="alternate" href="{{ .HRef }}" hreflang="{{ .Lang }}" lang="{{ .Lang }}">{{ .Endonym }}</a>
{{- end }}
{{ define "carouselStyle" -}}
<link rel="stylesheet" media="screen" href="/static/slick@1.8.1.css">
{{- end }}
{{ define "carouselInit" -}}
<script src="/static/jquery@3.7.1.min.js"></script>
<script src="/static/slick@1.8.1.min.js"></script>
<script>
jQuery(function () {
jQuery('.carousel').slick({
slidesToShow: 2,
slidesToScroll: 1,
infinite: false,
arrows: true,
prevArrow: '<button type="button" class="slick-prev">←</button>',
nextArrow: '<button type="button" class="slick-next">→</button>',
responsive: [
{
breakpoint: 768,
settings: {
slidesToShow: 1,
}
},
]
});
});
</script>
{{- end }}