1
0
mirror of https://git.feneas.org/feneas/fediverse.git synced 2024-12-23 09:58:05 +01:00
guida-fediverso/themes/starter/layout/_partial/article.ejs

27 lines
789 B
Plaintext
Raw Normal View History

2018-03-12 20:31:14 +01:00
<%
const date = post.date.format(config.date_format).split('-').join('.');
const tag = function(arr) {return arr.map(tag => tag.name)};
%>
<div class="post__preview">
<a class="oneliner" href="<%- post.url %>">
<svg class="f-tag <%= tag(post.tags) %>" role="img" aria-labelledby="f-snow">
<title id="f-snow">tag colour icon</title>
<use xlink:href="#icon-snowflake">
</svg>
<p class="post__title u-emphasize">
<%- post.title %>
</p>
<div class="post__content">
<%- truncate(strip_html(post.preview), {length: 150, omission: '...'}) %>
</div>
<p class="post__meta u-emphasize">
<span><%= date %></span>
<span>
<% post.tags.map(function(tag) { %>#<%= tag.name %> <% }) %>
</span>
</p>
</a>
</div>