aboutsummaryrefslogtreecommitdiff
path: root/www/index.nix
diff options
context:
space:
mode:
Diffstat (limited to 'www/index.nix')
-rw-r--r--www/index.nix22
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 (