From 1caf35480ecc8fbd6c1e900de019d21616103990 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 3 May 2026 13:40:34 +0100 Subject: Update homepage --- webserver.js | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'webserver.js') diff --git a/webserver.js b/webserver.js index 98a9640..b0d5578 100755 --- a/webserver.js +++ b/webserver.js @@ -106,23 +106,35 @@ function padLeft(s, len, fill) { function buildPublicationsHTML(info) { let res = ""; for (const obj of info.pubs) { - if (res.length != 0) res += "\n\t\t\t"; + if (res.length != 0) res += "\n\t\t"; const seen = new Map(); - res += "
  • "; + res += ""; - res += obj.year; + res += "" + obj.year; seen.set("year", true); if ("month" in obj) res += "-" + padLeft(obj.month + "", 2, "0") seen.set("month", true); - res += " "; + if ("conference" in obj) { + const idx = obj.conference.lastIndexOf(" "); + if (idx != -1 && !isNaN(+obj.conference.slice(idx+1))) + res += "
    (" + obj.conference.slice(0, idx) + ")"; + else res += "
    (" + obj.conference + ")"; + } + if ("journal" in obj) res += "
    (" + obj.journal + ")"; + if ("preprint" in obj) res += "
    (preprint)"; + if ("thesis" in obj) { res += "
    (thesis)"; seen.set("thesis", true); } + res += ""; + + res += ""; res += obj.authors.map(key => key in info.authors ? info.authors[key] : key).join(", "); seen.set("authors", true); + res += ".
    "; - res += ": “" + obj.title + "”."; + res += "“" + obj.title + "
    "; seen.set("title", true); if ("conference" in obj) res += " At " + obj.conference + "."; @@ -141,7 +153,7 @@ function buildPublicationsHTML(info) { seen.set("note", true); if ("links" in obj && obj.links.length > 0) { - res += " ["; + res += "
    ["; const anchors = []; for (const link of obj.links) { let name, url; @@ -177,7 +189,7 @@ function buildPublicationsHTML(info) { } seen.set("links", true); - res += "
  • "; + res += ""; for (const key in obj) { if (!seen.has(key)) { -- cgit v1.3