Feat plugin tweets medias (#164)

This commit is contained in:
Simon Lecoq
2021-03-02 02:28:58 +01:00
committed by GitHub
parent 46ef6a1532
commit 3b5f9153c4
5 changed files with 94 additions and 8 deletions

View File

@@ -25,9 +25,23 @@
</div>
<% if (plugins.tweets.profile) { %>
<% if (plugins.tweets.list.length) { %>
<% for (const {text, createdAt } of plugins.tweets.list) { %>
<% for (const {text, createdAt, attachments} of plugins.tweets.list) { %>
<div class="tweet">
<%- text %>
<% if (attachments) { %>
<div class="attachments">
<% for (const {image, title, description, website} of attachments) { %>
<div style="background-image: url('<%= image %>');">
<% if (title) { %>
<div class="infos">
<div class="title"><%= title %></div>
<div class="description"><%= description %></div>
</div>
<% } %>
</div>
<% } %>
</div>
<% } %>
<div class="date"><%= createdAt %></div>
</div>
<% } %>