Loading static/js/cards.mjs +18 −0 Changes for static/js/cards.mjs: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,3 +26,21 @@ export function createCard(title, supplemental) { return cardEl } /** * Set the HTML title attribute (which controls the text that appears on mouseover) of the card * and if the title bar should appear clickable. * * @param {HTMLElement} cardEl The .card element * @param {String} text The text for the hover title * @param {Boolean} clickable If the title bar should appear clickable */ export function setCardHoverTitle(cardEl, text, clickable) { const titleEl = cardEl.querySelector(".title") titleEl.setAttribute("title", text) if(clickable) { titleEl.classList.add("clickable") } else { titleEl.classList.remove("clickable") } } Loading
static/js/cards.mjs +18 −0 Changes for static/js/cards.mjs: 18 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -26,3 +26,21 @@ export function createCard(title, supplemental) { return cardEl } /** * Set the HTML title attribute (which controls the text that appears on mouseover) of the card * and if the title bar should appear clickable. * * @param {HTMLElement} cardEl The .card element * @param {String} text The text for the hover title * @param {Boolean} clickable If the title bar should appear clickable */ export function setCardHoverTitle(cardEl, text, clickable) { const titleEl = cardEl.querySelector(".title") titleEl.setAttribute("title", text) if(clickable) { titleEl.classList.add("clickable") } else { titleEl.classList.remove("clickable") } }