<%- 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) { %>

<%= t('tl.empty') %>

<% } else { %>
    <% timeline.forEach(function(p){ %>
  1. <% 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) { %>
    <% imgs.forEach(function(m){ %> <% }); %>
    <% } %> <% vids.forEach(function(m){ %><% }); %> <% auds.forEach(function(m){ %><% }); %> <% if (p.embedHtml) { %>
    <%- p.embedHtml %>
    <% } %> <% if (p.url) { %><%= t('tl.view_original') %><% } %>
    <% if (p.liked) { %>
    <% } else { %>
    <% } %> <% if (p.boosted) { %>
    <% } else { %>
    <% } %>
  2. <% }); %>
<% } %>