| 1 | <li class="tl-item">
|
|---|
| 2 | <% if (p.reblog_name) { %><div class="tl-boost-by"><svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg> <strong><%- emojiName(p.reblog_name, p.reblog_emoji_json) %></strong> <%= t('tl.boosted') %></div><% } %>
|
|---|
| 3 | <div class="tl-head">
|
|---|
| 4 | <span class="tl-avatar"><% if (p.author_icon) { %><img src="<%= avatar(p.author_icon, 96) %>" alt="" loading="lazy"><% } else { %><%= (p.author_name || '?').charAt(0).toUpperCase() %><% } %></span>
|
|---|
| 5 | <span class="tl-id">
|
|---|
| 6 | <a class="tl-author" href="<%= p.author_url || p.author_uri %>" target="_blank" rel="nofollow noopener"><%- emojiName(p.author_name, p.author_emoji_json) %></a>
|
|---|
| 7 | <span class="tl-handle"><%= p.author_handle %></span>
|
|---|
| 8 | </span>
|
|---|
| 9 | <% if (p.published || p.created_at) { %><time class="tl-time"><%= formatDateTime(p.published || p.created_at) %></time><% } %>
|
|---|
| 10 | </div>
|
|---|
| 11 |
|
|---|
| 12 | <% /* Content, quote/preview card and media: shared with Berichten and the
|
|---|
| 13 | Guardian PWA so a post looks the same wherever it turns up.
|
|---|
| 14 | suppressAudio: a Klonkt audio post carries an embed player below
|
|---|
| 15 | that already covers these tracks, so don't ALSO render the raw
|
|---|
| 16 | Audio attachments as bare players. */ %>
|
|---|
| 17 | <%- include('../partials/note-body', { nb: Object.assign({}, p, { suppressAudio: !!(p.embedHtml || p.embedUrl) }) }) %>
|
|---|
| 18 |
|
|---|
| 19 | <% if (p.embedHtml) { %><div class="tl-embed"><%- p.embedHtml %></div><% } %>
|
|---|
| 20 | <% if (p.embedUrl) { %><a class="tl-embed-open" href="<%= p.embedUrl %>" target="_blank" rel="noopener">▶ <%= t('tl.open_player') %></a><% } %>
|
|---|
| 21 |
|
|---|
| 22 | <% 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; %>
|
|---|
| 23 | <div class="tl-poll">
|
|---|
| 24 | <% if (_voteable) { %>
|
|---|
| 25 | <form method="post" action="/news/vote" class="tl-poll-form">
|
|---|
| 26 | <input type="hidden" name="note" value="<%= p.id %>">
|
|---|
| 27 | <% _pl.options.forEach(function(o){ %><label class="tl-poll-choice"><input type="<%= _pl.multiple?'checkbox':'radio' %>" name="choice" value="<%= o.name %>"><span><%= o.name %></span></label><% }); %>
|
|---|
| 28 | <button type="submit" class="btn btn-primary tl-poll-btn"><%= t('poll.vote') %></button>
|
|---|
| 29 | </form>
|
|---|
| 30 | <% } 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); %><div class="tl-poll-res<%= _mine?' is-mine':'' %>"><span class="tl-poll-fill" style="width:<%= _pct %>%"></span><span class="tl-poll-name"><%= _mine?'✓ ':'' %><%= o.name %></span><span class="tl-poll-pct"><%= _pct %>%</span></div><% }); } %>
|
|---|
| 31 | <div class="tl-poll-foot"><%= (_pl.voters!=null?_pl.voters:_tot) %> <%= t('poll.votes') %><% if(_pl.closed){ %> · <%= t('poll.closed') %><% } %></div>
|
|---|
| 32 | </div>
|
|---|
| 33 | <% } %>
|
|---|
| 34 |
|
|---|
| 35 | <% if (p.url) { %><a class="tl-orig" href="<%= p.url %>" target="_blank" rel="nofollow noopener"><%= t('tl.view_original') %></a><% } %>
|
|---|
| 36 |
|
|---|
| 37 | <% var _mv = (typeof movedTo !== 'undefined' && movedTo) ? movedTo : null; %>
|
|---|
| 38 | <%# Verhuisd: liken, boosten en reageren worden door de service toch
|
|---|
| 39 | geweigerd. Grijs ze dan ook, want een knop die niets doet laat je
|
|---|
| 40 | zoeken naar een storing die er niet is. Blokkeren blijft wel werken:
|
|---|
| 41 | dat is een veiligheidsklep, net als rapporteren. %>
|
|---|
| 42 | <div class="tl-actions<%= _mv ? ' is-moved' : '' %>">
|
|---|
| 43 | <form method="post" action="/news/like" class="tl-act-form tl-react-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" <%= _mv ? "disabled" : "" %> class="tl-act tl-act-like<%= p.liked ? ' is-on' : '' %>" title="<%= p.liked ? t('fedi.unlike_short') : t('fedi.likes') %>" aria-label="<%= p.liked ? t('fedi.unlike_short') : t('fedi.likes') %>"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 2.6l2.9 5.88 6.49.95-4.7 4.58 1.11 6.46L12 17.96l-5.8 3.06 1.1-6.46-4.69-4.58 6.49-.95z"/></svg></button></form>
|
|---|
| 44 | <form method="post" action="/news/boost" class="tl-act-form tl-react-form"><input type="hidden" name="note" value="<%= p.id %>"><input type="hidden" name="author" value="<%= p.author_uri %>"><button type="submit" <%= _mv ? "disabled" : "" %> class="tl-act tl-act-boost<%= p.boosted ? ' is-on' : '' %>" title="<%= p.boosted ? t('tl.unboost') : t('fedi.boosts') %>" aria-label="<%= p.boosted ? t('tl.unboost') : t('fedi.boosts') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg></button></form>
|
|---|
| 45 | <button type="button" <%= _mv ? "disabled" : "" %> class="tl-act tl-act-reply fedi-remote-reply-btn" data-fedi-uri="<%= p.id %>" data-fedi-ph="<%= t('fedi.remote_ph') %>" title="<%= t('fedi.remote_reply') %>" aria-label="<%= t('fedi.remote_reply') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="9 17 4 12 9 7"/><path d="M20 18v-2a4 4 0 0 0-4-4H4"/></svg></button>
|
|---|
| 46 | <form method="post" action="/blocking/add" class="tl-act-form" data-confirm="<%= t('tl.block') %>?"><input type="hidden" name="target" value="<%= p.author_uri %>"><button type="submit" class="tl-act tl-act-block" title="<%= t('tl.block') %>" aria-label="<%= t('tl.block') %>"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="4.9" y1="4.9" x2="19.1" y2="19.1"/></svg></button></form>
|
|---|
| 47 | </div>
|
|---|
| 48 | </li>
|
|---|