mirror of
https://codeberg.org/fediverse/fediparty.git
synced 2024-11-29 11:41:28 +00:00
27 lines
789 B
Plaintext
27 lines
789 B
Plaintext
|
|
||
|
<%
|
||
|
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>
|