tapestry/layout/_partial/post_feed.ejs
2025-09-23 19:56:13 +02:00

20 lines
No EOL
974 B
Text

<!-- This is the template for the post. It is used to display the posts in the feeds. -->
<div class="post">
<% if(post.photos) { %>
<div class="cover">
<a href='<%= url_for(post.path) %>'>
<img class="gallery" src="<%- config.root %>thumbnails/<%- (theme.column == 2 ? 'medium' : 'small') + '-' + post.photos[0].replace(/^images\//, '') %>" alt="<%- post.title || 'Untitled' %>">
</a>
</div>
<% } %>
<div class="post-header">
<a href='<%= url_for(post.path) %>'><h2><%= post.title || "Untitled" %></h2>
<%- include('date', { date: post.date.toISOString() }) %></a>
<p class="post_description"><%= post.description %></p>
<div class="tags smoll">
<% post.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.slug || tag.name.replace(/\s+/g, '-')) %>">#<%= tag.name %></a>
<% }); %>
</div>
</div>
</div>