diff options
| author | Valentin <valentin@fricklerhandwerk.de> | 2025-12-22 19:08:49 +0100 |
|---|---|---|
| committer | Valentin <valentin@fricklerhandwerk.de> | 2025-12-22 19:08:55 +0100 |
| commit | a44365cdbdc1444416b279d5df7a396bdadd1093 (patch) | |
| tree | 40aef7209cbe23fb2d6119a36daaf3ca67258636 /www/index.nix | |
| parent | e2f0ca2c8c56600ae148c307b59b280abc1ff8b0 (diff) | |
Bestehende Termine in strukturierte Daten umgewandelt
Diffstat (limited to 'www/index.nix')
| -rw-r--r-- | www/index.nix | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/www/index.nix b/www/index.nix index b1b74dd..e60325f 100644 --- a/www/index.nix +++ b/www/index.nix @@ -23,11 +23,33 @@ <link rel="shortcut icon" type="image/x-icon" href="/img/Kraniche-dreh-klein.gif"> <script async src="redirects.js"></script> ''; + "@past-events@" = + with lib; + let + as-list = mapAttrsToList (name: value: { + start = value.date.start + value.time.start; + value = toString value; + }) config.events; + sorted = sortOn (event: event.start) as-list; + in + '' + <dl> + ${concatMapStringsSep "\n" (event: event.value) sorted} + </dl> + ''; }; replace = file: with lib; replaceStrings (attrNames replacements) (attrValues replacements) file; in { title = "Stadtteilbeirat Heimfeld"; + events = + with lib; + listToAttrs ( + map (file: { + name = removeSuffix ".nix" (toString (baseNameOf file)); + value = import file; + }) (fileset.toList ./termine) + ); files = with lib; listToAttrs ( |
