• <% if (p.reblog_name) { %>
    <%- emojiName(p.reblog_name, p.reblog_emoji_json) %> <%= t('tl.boosted') %>
    <% } %>
    <% if (p.author_icon) { %><% } else { %><%= (p.author_name || '?').charAt(0).toUpperCase() %><% } %> <%- emojiName(p.author_name, p.author_emoji_json) %> <%= p.author_handle %> <% if (p.published || p.created_at) { %><% } %>
    <% 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); }); var _nsfwVisual = !!p.nsfw && (imgs.length || vids.length || auds.length); var _nsfwText = !!p.nsfw && !(imgs.length || vids.length || auds.length); %> <% if (_nsfwText) { %>
    <%- include('../partials/nsfw-veil', { cw: p.cw }) %><%- emojiHtml(p.content, p.emoji_json) %>
    <% } else { %>
    <%- emojiHtml(p.content, p.emoji_json) %>
    <% } %> <% var _quote = noteQuote(p.quote_json); if (_quote) { %><%- include('../partials/quote-card', { q: _quote }) %><% } %> <% if (_nsfwVisual) { %>
    <% } %> <% if (imgs.length) { %>
    <% imgs.forEach(function(m){ %> <% }); %>
    <% } %> <% vids.forEach(function(m){ %><% }); %> <% /* A Klonkt audio post carries an embed player (embedHtml/embedUrl) that already covers these tracks, so don't ALSO render the raw Audio attachments as bare players here. Posts without a Klonkt embed (e.g. a plain remote audio) keep them. */ %> <% if (!p.embedHtml && !p.embedUrl) { auds.forEach(function(m){ %><% }); } %> <% if (_nsfwVisual) { %>
    <%- include('../partials/nsfw-veil', { cw: p.cw }) %>
    <% } %> <% if (p.embedHtml) { %>
    <%- p.embedHtml %>
    <% } %> <% if (p.embedUrl) { %>▶ <%= t('tl.open_player') %><% } %> <% if (p.poll) { var _pl=p.poll; var _tot=_pl.options.reduce(function(s,o){return s+(o.count||0);},0); var _voteable=!_pl.closed&&!_pl.voted; %>
    <% if (_voteable) { %>
    <% _pl.options.forEach(function(o){ %><% }); %>
    <% } else { _pl.options.forEach(function(o){ var _pct=_tot?Math.round((o.count||0)*100/_tot):0; var _mine=_pl.voted&&(Array.isArray(_pl.voted)?_pl.voted.indexOf(o.name)>=0:_pl.voted===o.name); %>
    <%= _mine?'✓ ':'' %><%= o.name %><%= _pct %>%
    <% }); } %>
    <%= (_pl.voters!=null?_pl.voters:_tot) %> <%= t('poll.votes') %><% if(_pl.closed){ %> · <%= t('poll.closed') %><% } %>
    <% } %> <% if (p.url) { %><%= t('tl.view_original') %><% } %>