From 79b7e4ecc081c0efbda4e96c496eed33a0f272d3 Mon Sep 17 00:00:00 2001 From: sakrecoer Date: Mon, 30 Jun 2025 02:23:05 +0200 Subject: [PATCH] data in, styling out --- .../layouts/partials/body/gancio.html | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/themes/basspistol2025/layouts/partials/body/gancio.html b/themes/basspistol2025/layouts/partials/body/gancio.html index 09e2977..cb63dda 100644 --- a/themes/basspistol2025/layouts/partials/body/gancio.html +++ b/themes/basspistol2025/layouts/partials/body/gancio.html @@ -91,6 +91,10 @@ line-height: 0.35em; } } + #gancioEvents.svelte-1ap5437 { + font-family: inherit !important; + } + } @@ -109,5 +113,38 @@ + + {{ $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" }}
+ {{ .title }}
+ @{{ .place.name }}
+ {{ .place.address }}
+ {{ range .tags }} + #{{ . }} + + {{ end }}
+ {{ range .media }} + + {{ end }} +

+ {{ end }} +
{{ debug.Dump $data }}
+ {{ end }} + +