data in, styling out

This commit is contained in:
sakrecoer 2025-06-30 02:23:05 +02:00
parent 6fa097fb97
commit 79b7e4ecc0

View file

@ -91,6 +91,10 @@
line-height: 0.35em;
}
}
#gancioEvents.svelte-1ap5437 {
font-family: inherit !important;
}
}
</style>
@ -109,5 +113,38 @@
<gancio-events baseurl="https://do.basspistol.org" collection="Music" show_recurrent="true" maxlength=7 sidebar="false" theme="dark"></gancio-events>
</div>
{{ $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 }}
{{ .start_datetime | int | dateFormat "2006-01-02 15:04 CET" }}<br />
{{ .title }}<br />
@{{ .place.name }}<br />
{{ .place.address }}<br />
{{ range .tags }}
#{{ . }}
{{ end }}<br />
{{ range .media }}
<img src="https://do.basspistol.org/media/thumb/{{ .url }}" />
{{ end }}
<br /><br />
{{ end }}
<pre>{{ debug.Dump $data }}</pre>
{{ end }}
<article class="section-footers"></article>
</section>