guida-fediverso/themes/starter/layout/_partial/featured.ejs

33 lines
838 B
Plaintext
Raw Normal View History

2018-03-12 20:31:14 +01:00
<%
2018-06-20 21:53:47 +02:00
const date = post.created;
let avatarPath ="";
if (page.avatar) {
avatarPath = page.avatar;
} else {
avatarPath = "default-avatar.png";
}
2018-03-12 20:31:14 +01:00
%>
<section class="">
<div class="section-title">
<h4><%- __('featured') %></h4>
</div>
2018-03-20 18:51:15 +01:00
<a href="<%- post.url %>" class="post__preview featured">
<img src="/<%- post.path %><%- post.banner%>" alt="featured post image">
<img class="post__avatar" src="/img/authors/<%= avatarPath %>" alt="author">
2018-03-12 20:31:14 +01:00
<div class="post__content">
<p class="post__title u-emphasize u-center">
2018-03-12 20:31:14 +01:00
<%- post.title %>
</p>
<p class="post__text"><%- post.preview %></p>
<p class="post__meta u-emphasize">
<%= date %>
<span>by <% post.authors.map(function(author) { %><%= author %> <% }) %></span>
2018-03-12 20:31:14 +01:00
</p>
</div>
2018-03-20 18:51:15 +01:00
</a>
2018-03-12 20:31:14 +01:00
</section>