birdsounds.media/layouts/_default/event.html
a 9aa43df629 First commit
The basic parts of the layouts/theme should work. I have only populated 2 albums so far.
2024-05-17 21:14:05 -05:00

125 lines
3 KiB
HTML

{{ define "main" }}
{{ if not hugo.IsProduction }}
<aside class="development-info">
<p>template: event.html</p>
{{debug.Dump .}}
</aside>
{{ end }}
<main class="event-page">
<div class="info">
<header class="section event-header">
<div class="container">
<h1 class="event-title">{{ .Title }}</h1>
{{ with .Params.location }}
<h2 class="event-subtitle">Venue</h2>
<p class="event-location">
{{ partial "svg/mdi.map-marker.html" . }}
{{ if .url }}
<a href="{{ .url }}">
<span>
{{ .name }}
</span>
</a>
{{ else }} {{/* no url */}}
<span>
{{ .name }}
</span>
{{ end }} {{/* url check */}}
</p>
<p class="event-locality">
{{ partial "svg/mdi.map.html" . }}
<span>
{{ .locality }}, {{ index . "country-name" }}
</span>
</p>
{{ end }} {{/* with location */}}
{{ if and .Params.location .Date }}
{{ with .Date }}
<p class="event-date">
{{ partial "svg/mdi.calendar-time.html" . }}
<span>
<time datetime="{{ .Format " 2006-01-02T15:04:05-0700" }}">{{ .Format "2006-01-02 3:04 PM" }}</time>
</span>
</p>
{{ end }} {{/* with date */}}
{{ end }} {{/* event check */}}
{{ with .Params.openers }}
<h2 class="event-subtitle">Openers</h2>
<ul class="event-openers">
{{ range . }}
<li>
{{ partial "svg/mdi.artist.html" . }}
{{ if .url }}
<a href="{{ .url }}">
<span>
{{ .name }}
</span>
</a>
{{ else }} {{/* no url */}}
<span>
{{ .name }}
</span>
{{ end }} {{/* url */}}
</li>
{{ end }} {{/* range */}}
</ul>
{{ end }} {{/* with openers */}}
{{ with .Params.headliners }}
<h2 class="event-subtitle">Headliners</h2>
<ul class="event-headliners">
{{ range . }}
<li>
{{ partial "svg/mdi.artist.html" . }}
{{ partial "svg/mdi.star.html" . }}
{{ if .url }}
<a href="{{ .url }}">
<span>
{{ .name }}
</span>
</a>
{{ else }} {{/* no url */}}
<span>
{{ .name }}
</span>
{{ end }} {{/* url */}}
</li>
{{ end }} {{/* range */}}
</ul>
{{ end }} {{/* with headliners */}}
</div>
</header>
{{ with .Content }}
<section class="section">
<div class="container">
<h2 class="event-subtitle">Notes</h2>
<div class="event-content">
{{ . }}
</div>
</div>
</section>
{{ end }}
{{ with .Params.tags }}
<section class="section">
<div class="container">
<h2 class="event-subtitle">Tagged with</h2>
<ul class="event-tags">
{{ range . }}
<li>
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">
#{{.}}
</a>
</li>
{{ end }} {{/* range */}}
</ul>
</div>
</section>
{{ end }} {{/* with tags */}}
</div>
<section class="section photos">
<div class="container">
<h2 class="event-subtitle">Photos ({{ .Pages.Len }})</h2>
{{ partial "photos-grid.html" .Pages.Reverse }}
</div>
</section>
</main>
{{ end }}