tapestry/layout/_partial/post_feed.ejs
2026-03-27 10:33:43 +01:00

22 lines
No EOL
1,009 B
Text

<!-- This is the template for the post. It is used to display the posts in the feeds. -->
<div class="post post-feed">
<% if(post.photos && post.photos.length) { %>
<div class="cover">
<a href='<%= url_for(post.path) %>'>
<img class="gallery" src="<%- config.root %>thumbnails/<%- 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>
<div class="date smoll">
<%- include('date', { date: post.date.toISOString() }) %></a>
</div>
<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>