basspistol2025/themes/basspistol2025/layouts/partials/body/gancio.html
2025-07-03 14:04:26 +02:00

145 lines
2.9 KiB
HTML

<style>
#gancio {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
a {
flex: 1 1 300px;
text-decoration: none;
}
article {
margin:2px;
flex: 1 1 300px;
}
h2 {
font-size: 12em;
/* text-transform: uppercase;*/
line-height: 1em;
flex: 1 1 100%;
}
p {
flex: 1 1 100%;
font-size: .6em;
line-height: 1.75em;
max-width: 33vw;
strong {
font-size: 1.25em;
}
}
date {
font-size: .5em;
}
figure {
padding: 20px;
margin: auto;
height: 75vh;
display: flex;
flex-wrap: wrap;
align-content: start;
border-style: double;
border-color: purple;
border-width: 10px;
img {
width: 100%;
object-fit: cover;
height: 250px;
}
figcaption {
margin-top: 20px;
font-size: 0.9em;
h4 {
font-family: Sigoil,Space-Grotesk,arial,helvetica,sans-serif;
text-transform: uppercase;
}
p {
flex: 1 1 100%;
max-width: 33vw;
}
}
}
@media screen and (max-width: 1024px) {
h2 {
font-size: 8em;
}
p {
font-size: .9em;
max-width: unset !important;
strong {
font-size: 1.5em;
}
}
figcaption {
font-size: .9em;
p { font-size: .9em;}
date {
font-size: .7em;
}
}
}
}
</style>
<section id="gancio">
<article class="section-headers">
<h2>Agenda</h2>
<p><strong>Outernational events</strong> <br />
Through the power of federation, we aggregate event data from the deep-web to keep you in the loop of what's happening below the radars.
<br /><br />
Want your event featured here? <a href="https://do.basspistol.org/add" target="_blank" style="text-decoration: underline;">Head over to this page</a>. No account required.</p>
<a class="button" href="https://do.basspistol.org/">Full agenda 🗓️</a>
</article>
{{ $data := dict }}
{{ $url := "https://do.basspistol.org/api/events" }}
{{ with try (resources.GetRemote $url) }}
{{ with .Err }}
{{ errorf "%s" . }}
{{ else with .Value }}
{{ $data = .Content | transform.Unmarshal }}
{{ else }}
{{ errorf "Unable to get remote resource %q" $url }}
{{ end }}
{{ end }}
{{ with $data }}
{{ range . | first 7 }}
<a href="https://do.basspistol.org/event/{{ .slug }}">
<article>
<figure>
{{ range .media }}<img src="https://do.basspistol.org/media/thumb/{{ .url }}" />{{ end }}
<figcaption>
<date>{{ .start_datetime | int | dateFormat "2006-01-02 15:04 CET" }}</date>
<h4>{{ .title }}</h4>
<p><b>Organizer:</b> {{ .place.name }}</p>
<p>{{ .place.address }}</p>
<!-- <p>{{ range .tags }}#{{ . }} {{ end }}</p>-->
</figcaption>
</figure>
</article>
</a>
{{ end }}
<!-- <pre>{{ debug.Dump $data }}</pre>-->
{{ end }}
<article class="section-footers"></article>
</section>