async function createPubliUI(publi,toolTips=false,abstract=false) {
const art = $(" ").addClass("publi")
art.className = "publi"
$(" ", {
href: publi.URL,
target: "_blank"
}).html($("
").text(publi.title[0])).appendTo(art)
const authors = publi.author
const ulauthors = $("").addClass("authors-list").appendTo(art)
for (const author of authors) {
const liauth = $(" ").addClass("author-item")
const spanAuth = $(" ").text(String.raw`${author.given} ${author.family}`).appendTo(liauth)
var notifycontent = $("
").addClass("author-info")
$(" ").text(String.raw`${author.given} ${author.family}`).appendTo(notifycontent)
ulaff = $("").addClass("affiliation-list").appendTo(notifycontent)
if (author.affiliation) {
for (const a of author.affiliation) {
$(" ").text(a.name).appendTo(ulaff)
}
}
if (author["authenticated-orcid"]) {
const html = String.raw``
notifycontent.append(html)
}
if (toolTips) {
tippy(spanAuth[0], {
content: notifycontent[0],
theme: 'light',
interactive: true,
});
}
ulauthors.append(liauth)
}
journaldiv = $("
").appendTo(art)
if ("container-title-short" in publi && publi["container-title-short"].length>0) {
var title_short = $(" ").text(publi["container-title-short"][0])
journaldiv.append(title_short)
if (toolTips) {
tippy(title_short[0], {
content: publi["container-title"][0],
theme: 'light',
});
}
}
else {
$(" ").text(publi["container-title"][0]).appendTo(journaldiv)
}
var publiDate = pubUtils.bestDate(publi)
var date = pubUtils.parseDate(publiDate.dateInfo)
journaldiv.append(" ")
$(" ").text(date.getFullYear().toString()).appendTo(journaldiv)
journaldiv.append(" ")
$(" ").text(publi.volume).appendTo(journaldiv)
if (publi.issue) {
$(" ").addClass("issue").text(publi.issue).appendTo(journaldiv)
journaldiv.append(", ")
$(" ").text(publi.page).appendTo(journaldiv)
}
$(" ", {
href: publi.URL,
target: "_blank"
}).text(String.raw`DOI: ${publi.DOI}`).appendTo(art)
$("
").append(`${publiDate.type== "created" ? "First p" : "P"}ublished on `).append($(" ", {
datetime: date.toISOString().substring(0, 10)
}).text(date.toLocaleDateString("en-us", {
day: "numeric",
month: "short",
year: "numeric"
}))).appendTo(art)
if (abstract) {
var ab = $("",{id: "abstract",}).addClass("well").addClass("abstract")
var abfig =$("").addClass("picture")
abfig.appendTo(ab)
$(" ",{src:publi.PictureURL}).appendTo(abfig)
var htmltxt = await publi.getAbstractTextAsync()
abtxt=$("").html(htmltxt)
abtxt.appendTo(ab)
art.append(ab)
}
return art
}