diff options
| author | Quentin Aristote <quentin@aristote.fr> | 2022-12-17 18:40:45 +0100 |
|---|---|---|
| committer | Quentin Aristote <quentin@aristote.fr> | 2022-12-17 18:40:45 +0100 |
| commit | 334d3318b16d765dc10a537be841240986aeea04 (patch) | |
| tree | 321e08dd6c377ca368afb7fe8a8dae9e28d97da6 /html/software | |
| parent | dd75348ee1684d4839f086cacfc002e9bc27ddb1 (diff) | |
add software section
Diffstat (limited to 'html/software')
| -rw-r--r-- | html/software/default.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/html/software/default.nix b/html/software/default.nix new file mode 100644 index 0000000..d0ed803 --- /dev/null +++ b/html/software/default.nix @@ -0,0 +1,28 @@ +{ html, data, lib, ... }: + +let + software = data.software; + format = softwarePiece: + with html; + with softwarePiece; + { + inherit id title abstract; + url = URL; + } // (let + authorsOther = lib.remove data.basics.name + (builtins.map (author: "${author.given} ${author.family}") author); + in lib.optionalAttrs (authorsOther != [ ]) { + authors = "With ${lib.concatStringsSep ", " authorsOther}"; + }); +in { + title = "Software"; + priority = 15; + body = with html; + dl (for (sort.byPath [ "title" ] software) (softwarePiece: + let formatted = format softwarePiece; + in with formatted; + lines [ + (dt { id = "Software#${id}"; } (href { target = "_blank"; } url title)) + (dd abstract) + ])); +} |
