From 1036c49e9e3c3ff311a713cccf0054c8c16a9857 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sat, 30 Sep 2023 21:25:03 +0200 Subject: format --- html/software/default.nix | 39 +++++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 16 deletions(-) (limited to 'html/software/default.nix') diff --git a/html/software/default.nix b/html/software/default.nix index 49f4627..9d42345 100644 --- a/html/software/default.nix +++ b/html/software/default.nix @@ -1,27 +1,34 @@ -{ html, data, lib, ... }: - -let +{ + 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}"; - }); + { + 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; [ - (dt { id = "Software#${id}"; } (href { target = "_blank"; } url title)) + dl (for (sort.byPath ["title"] software) (softwarePiece: let + formatted = format softwarePiece; + in + with formatted; [ + (dt {id = "Software#${id}";} (href {target = "_blank";} url title)) (dd abstract) ])); } -- cgit v1.2.3