Zum Hauptinhalt gehen
<% var newArticles = articles.filter(function(article) {
return article['label_names'].some(function(label) {
return labels.includes(label);
});
});
newArticles.sort(function(a, b) {
return b.created_at.localeCompare(a.created_at);
});
%>
<% if (newArticles.length) { %>
<% if (heading) { %>
neue
<%= heading %>
<% } %>
<% newArticles.slice(0, 5).forEach(function(article, index) { %>
-
<% }); %>
<% } %>