<% } %>
<% var getColumnClasses = function(columnNumber) {
var classNames = 'col-12';
if (columnNumber >= 2) classNames += ' md:col-6';
if (columnNumber >= 3) classNames += ' lg:col-4';
if (columnNumber >= 4) classNames += ' xl:col-3';
return classNames;
} %>
<% (categories.length > 1 ? categories : sections).slice(0, 4).forEach(function(block, index) {
var firstArticleUrl = null;
if (block.sections && block.sections.length) {
var firstSection = block.sections[0]; // Get first section in category
if (firstSection.articles && firstSection.articles.length) {
firstArticleUrl = firstSection.articles[0].html_url; // Get first article
}
}
%>