<% var size = 4; %>
<% if(screenshots.length > 0) { %>
    <div class="row up-spacer">
        <% for (let i = 0; i < screenshots.length; i++) { %>
            <% if(screenshots.length == 4 && i == 0) { size = 12 } %>
            <% if(screenshots.length == 5 && i == 0) { size = 6 } %>
            <% if(screenshots.length == 5 && i == 1) { size = 6 } %>
            <% if(screenshots.length == 4 && i >= 1) { size = 4 } %>
            <% if(screenshots.length == 5 && i >= 2) { size = 4 } %>
            <div class="col-<%= size %>" style="margin-bottom: 20px;">
                <a href="<%= url_for(screenshots[i].url) %>" class="">
                    <img class="img-fluid thumbnail thumbnail-col<%= size %> figure-img rounded" src="<%= screenshots[i].url %>">
                </a>
            </div>
        <% } %>
    </div>
<% } %>