<%- include('../partials/fedi-tabs', { active: 'feed' }) %>
<%= t('tl.title') %>
<%= t('tl.lead') %>
<% if (typeof success !== 'undefined' && success) { %>
<%= success %>
<% } %>
<% if (typeof error !== 'undefined' && error) { %>
<%= error %>
<% } %>
<% if (!timeline || !timeline.length) { %>
<% } else { %>
<% timeline.forEach(function(p){ %>
-
<% if (p.author_icon) { %>
<% } else { %><%= (p.author_name || '?').charAt(0).toUpperCase() %><% } %>
<%= p.author_name %>
<%= p.author_handle %>
<% if (p.published || p.created_at) { %>
<% } %>
<%- p.content %>
<%
var media = []; try { media = JSON.parse(p.media_json || '[]'); } catch (e) { media = []; }
var imgs = media.filter(function(m){ return m && m.url && (!m.type || /^image\//.test(m.type)); });
var vids = media.filter(function(m){ return m && m.url && m.type && /^video\//.test(m.type); });
var auds = media.filter(function(m){ return m && m.url && m.type && /^audio\//.test(m.type); });
%>
<% if (imgs.length) { %>
<% } %>
<% vids.forEach(function(m){ %><% }); %>
<% auds.forEach(function(m){ %><% }); %>
<% if (p.embedHtml) { %><%- p.embedHtml %>
<% } %>
<% if (p.url) { %><%= t('tl.view_original') %><% } %>
<% if (p.boosted) { %>
<% } else { %>
<% } %>
<% }); %>
<% } %>