tapestry-code/layout/post.ejs
2026-03-27 16:47:50 +01:00

27 lines
No EOL
1,016 B
Text

<!-- This is the template for the post -->
<div class="pp post border">
<div class="post-header">
<h1><%= page.title || "Untitled" %></h1>
<% if(page.photos && page.photos.length) { %>
<div>
<img class="border" src="<%- config.root %><%- page.photos[0] %>" alt="<%- page.title || "Untitled" %>">
</div>
<% } %>
<p><%= page.description %></p>
<div class="date smoll">
<a href='<%= url_for(page.path) %>'><%- include('_partial/date', { date: page.date.toISOString() }) %></a>
</div>
</div>
<div class="post-content">
<%- page.content %>
</div>
<div class="post-footer">
<div class="tags smoll">
<% if (page.tags) { %>
<% page.tags.data.forEach(function(tag) { %>
<a href="<%= url_for('/tags/' + tag.name) %>">#<%= tag.name %></a>
<% }); %>
<% } else {console.log(page)} %>
</div>
</div>
</div>