Added thumbnails script

This commit is contained in:
Bashy 2025-09-23 19:56:13 +02:00
parent 81bc936f81
commit b1f096102b
3 changed files with 74 additions and 8 deletions

View file

@ -3,7 +3,7 @@
<% if(post.photos) { %>
<div class="cover">
<a href='<%= url_for(post.path) %>'>
<img class="gallery" src="<%- config.root %>thumbnails/small-<%- post.photos[0].replace(/^images\//, '') %>" alt="<%- post.title || "Untitled" %>">
<img class="gallery" src="<%- config.root %>thumbnails/<%- (theme.column == 2 ? 'medium' : 'small') + '-' + post.photos[0].replace(/^images\//, '') %>" alt="<%- post.title || 'Untitled' %>">
</a>
</div>
<% } %>