summaryrefslogtreecommitdiff
path: root/html/publications/default.nix
diff options
context:
space:
mode:
authoraristote <quentin.aristote@irif.fr>2025-07-27 17:47:32 +0200
committeraristote <quentin.aristote@irif.fr>2025-07-27 17:47:32 +0200
commit8622e40e675c72b9402625189517f99891a046c9 (patch)
treee1384995b609e7154f38725a29183f2f442d2c75 /html/publications/default.nix
parent90b687b24ca7f64bd4087144a40c6a2f6e3c14a9 (diff)
add talks to publications, rename to research, split into tabbox
Diffstat (limited to 'html/publications/default.nix')
-rw-r--r--html/publications/default.nix98
1 files changed, 0 insertions, 98 deletions
diff --git a/html/publications/default.nix b/html/publications/default.nix
deleted file mode 100644
index fbcfcee..0000000
--- a/html/publications/default.nix
+++ /dev/null
@@ -1,98 +0,0 @@
-{
- html,
- data,
- lib,
- ...
-}: let
- attrValsOpt = attrs: attrSet:
- lib.attrVals (builtins.filter (attr: lib.hasAttr attr attrSet) attrs)
- attrSet;
- concatStringsPrefix = prefix: strings:
- lib.concatStrings (builtins.map (string: prefix + string) strings);
- concatStringsSuffix = suffix: strings:
- lib.concatStrings (builtins.map (string: string + suffix) strings);
- format = publication:
- with html;
- with publication;
- {
- inherit id title url year abstract cite;
- }
- // (let
- authorsOther =
- lib.remove "${data.basics.name.first} ${data.basics.name.last}"
- (builtins.map (author: "${author.given} ${author.family}") author);
- in
- lib.optionalAttrs (authorsOther != []) {
- authors = "With ${lib.concatStringsSep ", " authorsOther}";
- })
- // lib.optionalAttrs (publication ? note) {
- note = publication.note;
- }
- // lib.optionalAttrs (publication ? container-title) {
- published =
- "In ${em container-title}"
- + concatStringsPrefix ", "
- (attrValsOpt ["volume" "issue" "publisher"] publication);
- }
- // lib.optionalAttrs (publication ? event-title) {
- published = "At ${em event-title}";
- }
- // lib.optionalAttrs (publication ? ISBN) {
- isbn = "${small "ISBN"}: ${ISBN}";
- }
- // lib.optionalAttrs (publication ? ISSN) {
- issn = "${small "ISSN"}: ${ISSN}";
- }
- // lib.optionalAttrs (publication ? DOI) {
- doi = "${small "DOI"}: ${href "https://doi.org/${DOI}" (code DOI)}";
- };
- listPublications = collection: collectionTitle:
- with html;
- section {id = "Publications#${collectionTitle}";} [
- (h2 collectionTitle)
- (dl (for (sort.reverse.byPath ["issued" "date-parts"] collection)
- (publication: let
- formatted = format publication;
- in
- with formatted;
- lines [
- (dt {id = "Publications#${id}";}
- "${href {target = "_blank";} url title} (${year})")
- (dd [
- (concatStringsSuffix ". "
- (attrValsOpt ["authors" "note" "published" "isbn" "issn" "doi"]
- formatted))
- (details [
- (summary "More")
- (dl [
- (dt "Abstract.")
- (dd (blockquote abstract))
- (dt "Cite.")
- (let
- citeWith = title: type:
- details [
- (summary title)
- (pre (code (
- lib.readFile "${data.publications.files}/${type}/${id}"
- )))
- ];
- in
- dd [
- (citeWith "BibLaTeX" "biblatex")
- (citeWith "BibTeX" "bibtex")
- (citeWith "CSL JSON" "csljson")
- ])
- ])
- ])
- ])
- ])))
- ];
-in {
- title = "Publications";
- priority = 10;
- body = with html;
- lines [
- (listPublications data.publications.selected "Selected works")
- (listPublications (with data.publications; lib.subtractLists selected all) "Other works")
- ];
-}