MCPcopy Create free account
hub / github.com/crisxuan/bestJavaer / renderLatestFeaturedCards

Function renderLatestFeaturedCards

assets/article-cards.js:720–745  ·  view source on GitHub ↗
(list, articles)

Source from the content-addressed store, hash-verified

718 }
719
720 function renderLatestFeaturedCards(list, articles) {
721 var key = articles.map(function (article) {
722 return article.date + ':' + article.markdownPath;
723 }).join('|');
724
725 if (list.getAttribute('data-home-latest-key') === key) {
726 return;
727 }
728
729 list.setAttribute('data-home-latest-key', key);
730 list.textContent = '';
731
732 articles.forEach(function (article) {
733 var item = document.createElement('li');
734
735 list.appendChild(item);
736 renderFeaturedCard({
737 date: article.date,
738 href: article.href,
739 item: item,
740 markdownPath: article.markdownPath,
741 summary: article.summary,
742 title: article.title
743 });
744 });
745 }
746
747 function renderFeaturedCard(article) {
748 var item = article.item;

Callers 1

renderFeaturedCardsFunction · 0.85

Calls 1

renderFeaturedCardFunction · 0.85

Tested by

no test coverage detected