%
// The separator between items in the top line of the header (date, journal)
const sep = ` | `
// The year
const pubHTML = year_of_publishing ? `${sep}` : '';
// The volume and page
let volumeHTML = volume ? ` Vol. ${volume}. ` : '';
let pageHTML = page ? ` pp. ${page}.` : '';
// The journal / publisher
const journalHTML = journal ? `${journal}${volumeHTML}${pageHTML}${sep}` : '';
// The ID attribute for the title
const dataID = pid ? ` data-id="${pid}"` : '';
// Title
let titleHTML = title || '';
if (title) {
titleHTML = `
${title}
`;
}
// Series ID and PID
let seriesIdHTML = seriesId || '';
if (seriesId) {
const idSep = pid ? ', version: ' : '';
if (seriesId_url) {
seriesIdHTML = `${seriesId}${idSep}`;
} else {
seriesIdHTML = `${seriesId}${idSep}`;
}
}
let pidHTML = pid || source_id || '';
if (pid) {
if (pid_url) {
pidHTML = `${pid}`;
} else {
pidHTML = `${pid}`;
}
}
const idHTML = seriesIdHTML || pidHTML ? `${seriesIdHTML}${pidHTML}` : '';
// --- Elements for the expandable list of authors ---
// Group of authors that will always be shown
const authorsGrp1HTML = authorsGrp1 ? `${authorsGrp1}` : '';
// Group of authors that will be hidden by default
const authorsGrp2HTML = authorsGrp2 ? `${authorsGrp2}` : '';
// The last author, which will always be shown
const lastAuthorHTML = lastAuthor ? `${lastAuthor}` : '';
// The ellipsis between the first group and the last author, when the second group is hidden
const ellipsisHTML = authorsGrp2 ? `...` : '';
// The button to expand the list of authors
const expandTag = authorsGrp2 ? ` ` : '';
// --- Elements for the expandable list of authors, combined ---
const originHTML = authorsGrp1HTML || authorsGrp2HTML ? `