camper/web/templates/public/amenity.gohtml

53 lines
1.5 KiB
Plaintext
Raw Normal View History

<!--
SPDX-FileCopyrightText: 2023 jordi fita mas <jordi@tandem.blog>
SPDX-License-Identifier: AGPL-3.0-only
-->
{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/amenity.publicPage*/ -}}
{{ .Name }}
{{- end }}
{{ define "head" -}}
{{ template "carouselStyle" }}
{{- end }}
{{ define "content" -}}
{{- /*gotype: dev.tandem.ws/tandem/camper/pkg/amenity.publicPage*/ -}}
<h2>{{ template "title" . }}</h2>
{{ with .Carousel -}}
<div class="campsite carousel">
{{ range . -}}
{{ if .Caption -}}
<figure>
<img src="{{ .Media }}" alt=""/>
<figcaption>{{ .Caption }}</figcaption>
</figure>
{{- else -}}
<img src="{{ .Media }}" alt=""/>
{{- end }}
{{- end }}
</div>
{{- end }}
<div class="campsite_info">
{{ range .Info -}}
<div>{{ . | raw }}</div>
{{- end }}
{{ with .Features -}}
<article class="campsite_features">
<h3 class="sr-only">{{( pgettext "Features" "title" )}}</h3>
<ul>
{{ range . -}}
<li class="icon_{{ .Icon }}">{{ .Name }}</li>
{{- end }}
</ul>
</article>
{{- end }}
</div>
{{ if .Carousel }}
{{ template "carouselInit" 3 }}
{{- end }}
{{- end }}