<%- include('./partials/head', { title: 'Models' }) %>
<% if (brand.brand_logo_path) { %> <%= brand.brand_name %> <% } else { %>
<% } %>
<%= brand.brand_name %> <% if (brand.brand_tagline) { %> <%= brand.brand_tagline %> <% } %>
<% const hasModels = categorised.length > 0 || uncategorized.length > 0 %> <% if (!hasModels) { %>

No models are available yet.

<% } else { %> <% // Reusable model card macro (EJS doesn't have macros, so we use a loop target) function modelCard(model) { /* rendered inline below */ } %> <% categorised.forEach(({ category, models }) => { %>

<%= category.name %>

<%= models.length %> model<%= models.length !== 1 ? 's' : '' %>
<% if (category.description) { %>

<%= category.description %>

<% } %>
<% models.forEach(model => { %> <%- include('./partials/modelCard', { model }) %> <% }) %>
<% }) %> <% if (uncategorized.length > 0) { %>
<% if (categorised.length > 0) { %>

Other

<% } %>
<% uncategorized.forEach(model => { %> <%- include('./partials/modelCard', { model }) %> <% }) %>
<% } %> <% } %>