(list, articles)
| 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; |
no test coverage detected