summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/experience/default.nix29
-rw-r--r--html/research/default.nix40
-rw-r--r--html/research/talks.nix81
-rw-r--r--html/research/writings.nix (renamed from html/publications/default.nix)20
-rw-r--r--html/sections.nix2
5 files changed, 146 insertions, 26 deletions
diff --git a/html/experience/default.nix b/html/experience/default.nix
index b7f258b..9fdc219 100644
--- a/html/experience/default.nix
+++ b/html/experience/default.nix
@@ -10,23 +10,26 @@ in {
priority = 20;
body = with html;
dl (for
- (sort.reverse.byFun (item: with item.date.start; day + 100 * month + 10000 * year)
- experience) (item:
+ (sort.reverse.byFun
+ (item: with item.date.start; day + 100 * month + 10000 * year)
+ experience)
+ (item:
with item; [
(dt [
(with institution; "${position} @ ${href url name}, ${location}")
br
- (small (lib.concatStringsSep " · "
- ([(with date; timerange start end)]
- ++ lib.optional (item ? supervisors) "supervised by ${
- lib.concatStringsSep " " (for supervisors
- (supervisor: with supervisor; href url name))
- }"
- ++ lib.optional (item ? assets) (lib.concatStringsSep " "
- (for assets (asset:
- with asset;
- href "#${type}#${id}"
- "${icon "las la-paperclip"} ${name}"))))))
+ (small (lib.concatStringsSep " · " (
+ [(with date; timerange start end)]
+ ++ lib.optional (item ? supervisors) "supervised by ${
+ lib.concatStringsSep " " (for supervisors
+ (supervisor: with supervisor; href url name))
+ }"
+ # ++ lib.optional (item ? assets) (lib.concatStringsSep " "
+ # (for assets (asset:
+ # with asset;
+ # href "#${type}#${id}"
+ # "${icon "las la-paperclip"} ${name}")))
+ )))
])
(dd description)
]));
diff --git a/html/research/default.nix b/html/research/default.nix
new file mode 100644
index 0000000..21152e2
--- /dev/null
+++ b/html/research/default.nix
@@ -0,0 +1,40 @@
+{
+ make,
+ html,
+ ...
+}: let
+ writings = make ./writings.nix {};
+ talks = make ./talks.nix {};
+in {
+ title = "Research";
+ priority = 10;
+ body = with html;
+ tabbox "research" [
+ {
+ id = "conferences";
+ checked = true;
+ title = "Conference papers";
+ content = writings.conferences;
+ }
+ {
+ id = "journals";
+ title = "Journal papers";
+ content = writings.journals;
+ }
+ {
+ id = "misc";
+ title = "Non-peer-reviewed";
+ content = writings.misc;
+ }
+ {
+ id = "reports";
+ title = "Reports";
+ content = writings.reports;
+ }
+ {
+ id = "talks";
+ title = "Talks";
+ content = talks;
+ }
+ ];
+}
diff --git a/html/research/talks.nix b/html/research/talks.nix
new file mode 100644
index 0000000..9e1fd56
--- /dev/null
+++ b/html/research/talks.nix
@@ -0,0 +1,81 @@
+{
+ html,
+ data,
+ lib,
+ ...
+}: let
+ matchFirst = regexp: str: let
+ results = builtins.match regexp str;
+ in
+ if results == null
+ then null
+ else builtins.head results;
+ join = url: name: with html; lib.optionalString (url != null) " · ${href url "${icon "las la-paperclip"} ${name}"}";
+ talks = data.publications.talks;
+in
+ with html;
+ dl (for (sort.reverse.byPath ["issued" "date-parts"] talks) (item:
+ with item; let
+ date-parts = builtins.head issued.date-parts;
+ date = {
+ year = builtins.elemAt date-parts 0;
+ month = builtins.elemAt date-parts 1;
+ day = builtins.elemAt date-parts 2;
+ };
+ extra =
+ if item ? note
+ then note
+ else "";
+ abstractURL = matchFirst ".*abstract: ([^\n ]*).*" extra;
+ slidesURL = matchFirst ".*slides: ([^\n ]*).*" extra;
+ # broken because of tabs
+ # paperURL = let
+ # paperId = matchFirst "([A-z0-9]*[0-9]{4})[a-z]" id;
+ # in
+ # if paperId == null
+ # then null
+ # else "#Writings#${paperId}";
+ in [
+ (dt [
+ ((
+ if abstractURL == null
+ then (x: x)
+ else href abstractURL
+ ) (em title))
+ ])
+ (dd [
+ (with (makeDate date); tag pretty)
+ "@ ${href url event-title}, ${publisher-place}"
+ (join slidesURL "slides")
+ # broken because of tabs
+ # (join paperURL "paper")
+ (details [
+ (summary "More")
+ (
+ dl (
+ lib.optionals (item ? abstract) [
+ (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")
+ ])
+ ]
+ )
+ )
+ ])
+ ])
+ ]))
diff --git a/html/publications/default.nix b/html/research/writings.nix
index fbcfcee..d34ea66 100644
--- a/html/publications/default.nix
+++ b/html/research/writings.nix
@@ -46,18 +46,17 @@
// lib.optionalAttrs (publication ? DOI) {
doi = "${small "DOI"}: ${href "https://doi.org/${DOI}" (code DOI)}";
};
- listPublications = collection: collectionTitle:
+ listPublications = collection:
with html;
- section {id = "Publications#${collectionTitle}";} [
- (h2 collectionTitle)
+ section [
(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})")
+ (dt {id = "Writings#${id}";}
+ "${href {target = "_blank";} url (em title)} (${year})")
(dd [
(concatStringsSuffix ". "
(attrValsOpt ["authors" "note" "published" "isbn" "issn" "doi"]
@@ -88,11 +87,8 @@
])))
];
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")
- ];
+ conferences = listPublications data.publications.conferences;
+ journals = listPublications data.publications.journals;
+ misc = listPublications data.publications.misc;
+ reports = listPublications data.publications.reports;
}
diff --git a/html/sections.nix b/html/sections.nix
index 3c4065f..78719f8 100644
--- a/html/sections.nix
+++ b/html/sections.nix
@@ -17,6 +17,6 @@ in
./education
./experience
# ./languages
- ./publications
+ ./research
./software
]