32 lines
No EOL
1.1 KiB
Text
32 lines
No EOL
1.1 KiB
Text
<!-- This is the template for the post. It is used to display the posts in the feeds. -->
|
|
<% if(post.photos && post.photos.length) { %>
|
|
<% classTag = "post-with-image" %>
|
|
<% } else { %>
|
|
<% classTag = "post-without-image" %>
|
|
<% } %>
|
|
|
|
<div class="post-feed border">
|
|
<a href='<%= url_for(post.path) %>'><h1><%= post.title || "Untitled" %></h1>
|
|
|
|
<div class="<%= classTag %>">
|
|
<% if(post.photos && post.photos.length) { %>
|
|
<a href='<%= url_for(post.path) %>'>
|
|
<img class="border" src="<%- config.root %><%- post.photos[0] %>" alt="<%- post.title || 'Untitled' %>">
|
|
</a>
|
|
<% } %>
|
|
<div>
|
|
|
|
<div class="date smoll">
|
|
<a href='<%= url_for(post.path) %>'><%- include('date', { date: post.date.toISOString() }) %></a>
|
|
</div>
|
|
|
|
<p class="post_description"><%= post.description %></p>
|
|
|
|
<a href='<%= url_for(post.path) %>'><p>Read More...</p></a>
|
|
|
|
<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> |