content-thumbnail.ejs 496 B

12345678910111213
  1. <% var thumbnail %>
  2. <% if(post.cover != undefined) thumbnail = post.cover %>
  3. <% if(post.image != undefined) thumbnail = `/images/thumbnails/blog/${post.image.feature}` %>
  4. <div class="col-3" style="margin-bottom: 30px;">
  5. <a href="<%= url_for(post.path) %>" class="thumbnail-link">
  6. <img class="img-fluid thumbnail rounded" src="<%= thumbnail %>">
  7. <% if(show_title == true || show_title == undefined) { %>
  8. <p><%= post.title %></p>
  9. <% } %>
  10. </a>
  11. </div>