From 6ec194523441734c0b37ecdabc27fcef7649107f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sun, 6 Oct 2019 20:43:31 +0200 Subject: [PATCH] Use ul for affiliation --- content/papers.html | 10 +++++++--- static/css/paper.css | 14 ++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/content/papers.html b/content/papers.html index e1754e39..a9d7dfb7 100644 --- a/content/papers.html +++ b/content/papers.html @@ -33,6 +33,7 @@ draft: false ulauths.className="authors-list" for(const author of authors){ const liauth=document.createElement("li") + liauth.className="author-item" const spanAuth=document.createElement("span") spanAuth.innerText=String.raw`${author.given} ${author.family}` liauth.appendChild(spanAuth) @@ -43,10 +44,13 @@ draft: false } var notifycontent=document.createElement("div") notifycontent.className="author-info" + const ulaff=document.createElement("ul") + ulaff.className="affiliation-list" + notifycontent.appendChild(ulaff) for(const a of author.affiliation){ - var div=document.createElement("div") - div.innerText=a.name - notifycontent.appendChild(div) + const liaff=document.createElement("li") + liaff.innerText=a.name + ulaff.appendChild(liaff) } if(author["authenticated-orcid"]){ const html=$.parseHTML(String.raw`
ORCID logo ${author.ORCID}
`) diff --git a/static/css/paper.css b/static/css/paper.css index cba0e729..785780a1 100644 --- a/static/css/paper.css +++ b/static/css/paper.css @@ -9,21 +9,21 @@ border: 0 } -.paper ul.authors-list li{ +.paper ul.authors-list li.author-item{ display: inline } -.paper ul.authors-list li:after +.paper ul.authors-list li.author-item:after { content: ", " } -.paper ul.authors-list li:nth-last-child(2):after +.paper ul.authors-list li.author-item:nth-last-child(2):after { content: " and " } -.paper ul.authors-list li:last-child:after +.paper ul.authors-list li.author-item:last-child:after { content: "" } @@ -40,4 +40,10 @@ } .author-info { font-size: 18x +} +.author-info ul.affiliation-list{ + list-style: none; + margin: 0; + padding: 0; + border: 0 } \ No newline at end of file