diff --git a/docs/javascripts/cookbooks-card.js b/docs/javascripts/cookbooks-card.js index dd36eacb..d2447324 100644 --- a/docs/javascripts/cookbooks-card.js +++ b/docs/javascripts/cookbooks-card.js @@ -1,7 +1,7 @@ document.addEventListener("DOMContentLoaded", function () { - async function setCard(el, url, name, desc, labels, version, theme, authors) { + async function setCard(el, url, name, labels, version, theme, authors) { const colorList = [ "#22c55e", "#14b8a6", @@ -28,34 +28,32 @@ document.addEventListener("DOMContentLoaded", function () { return await response.json(); })); - let authorHTML = ''; - authorDataArray.forEach((authorData, index) => { - const marginLeft = index === 0 ? '0' : '-15px'; - authorHTML += ` -
+ let authorAvatarsHTML = authorDataArray.map((authorData, index) => { + const marginLeft = index === 0 ? '0' : '-10px'; + const zIndex = 100 - index; + return ` + `; - }); - - document.querySelectorAll('.author-container').forEach((container) => { - const tooltip = container.querySelector('.tooltip'); - container.addEventListener('mouseover', () => { - tooltip.style.visibility = 'visible'; - tooltip.style.opacity = '1'; - }); - container.addEventListener('mouseout', () => { - tooltip.style.visibility = 'hidden'; - tooltip.style.opacity = '0'; - }); - }); + }).join(''); + let authorNamesHTML = authorDataArray.map( + authorData => `` + ).join(', '); + let authorsHTML = ` + + `; el.innerText = ` @@ -66,12 +64,7 @@ document.addEventListener("DOMContentLoaded", function () { ${name} -