source: Klonkt/src/views/pages/following.ejs@ eefd302

main
Last change on this file since eefd302 was eefd302, checked in by Robin Genis <roboburr@…>, 2 months ago

feat(fedi): rename feed Newspaper -> News (/newspaper -> /news)

EN label + route shortened to 'News' / '/news' (+ sub-routes, links, form actions,
render path, view newspaper.ejs->news.ejs, RESERVED_SLUGS, pageTitle). NL 'Krant' and
DE 'Zeitung' unchanged.

  • Property mode set to 100644
File size: 5.1 KB
Line 
1<div class="tl-wrap">
2 <%- include('../partials/fedi-tabs', { active: 'following' }) %>
3 <h1 class="tl-title"><%= t('tl.tab_following') %></h1>
4 <% if (typeof success !== 'undefined' && success) { %><div class="alert alert-success"><%= success %></div><% } %>
5 <% if (typeof error !== 'undefined' && error) { %><div class="alert alert-error"><%= error %></div><% } %>
6
7 <div class="tl-explain">
8 <p><span class="tl-explain-tag">✨ <%= t('tl.autoboost') %></span> — <%= t('tl.autoboost_hint') %></p>
9 </div>
10
11 <form method="post" action="/news/follow" class="tl-follow">
12 <input type="text" name="handle" placeholder="@naam@server.social of site.com" autocomplete="off" spellcheck="false" required>
13 <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button>
14 <label class="tl-follow-ab" title="<%= t('tl.autoboost_hint') %>"><input type="checkbox" name="auto_boost" value="1"> ✨ <%= t('tl.autoboost_follow') %></label>
15 </form>
16
17 <% if (following && following.length) { %>
18 <h2 class="tl-sub"><%= t('tl.following') %> (<%= following.length %>)</h2>
19 <ul class="tl-foll-list">
20 <% following.forEach(function(f){ %>
21 <li class="tl-foll">
22 <span class="tl-foll-av"><% if (f.icon) { %><img src="<%= f.icon %>" alt=""><% } else { %><%= (f.name || '?').charAt(0).toUpperCase() %><% } %></span>
23 <span class="tl-foll-meta">
24 <a href="<%= f.url || f.actor_uri %>" target="_blank" rel="nofollow noopener"><%= f.name || f.handle %></a>
25 <span class="tl-foll-handle"><%= f.handle %></span>
26 <% if (f.status === 'pending') { %><span class="tl-pending"><%= t('tl.pending') %></span><% } %>
27 </span>
28 <form method="post" action="/news/autoboost" class="tl-foll-ab" title="<%= t('tl.autoboost_hint') %>">
29 <input type="hidden" name="actor_uri" value="<%= f.actor_uri %>">
30 <label><input type="checkbox" name="auto_boost" value="1" <%= f.auto_boost ? 'checked' : '' %> onchange="this.form.submit()"> ✨ <%= t('tl.autoboost') %></label>
31 </form>
32 <form method="post" action="/news/unfollow"><input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"><button type="submit" class="tl-unfollow"><%= t('tl.unfollow') %></button></form>
33 </li>
34 <% }); %>
35 </ul>
36 <% } else { %>
37 <p class="tl-empty"><%= t('tl.empty_following') %></p>
38 <% } %>
39</div>
40
41<style>
42 .tl-wrap { max-width: 640px; margin: 1rem auto; padding: 0 1rem; }
43 .tl-title { margin: 0 0 .25rem; }
44 .tl-lead { color: var(--ink-soft, #888); margin: 0 0 1.25rem; }
45 .tl-explain { margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: 12px;
46 background: color-mix(in srgb, var(--accent, #888) 8%, transparent);
47 border: 1px solid color-mix(in srgb, var(--accent, #888) 22%, transparent); }
48 .tl-explain p { margin: .3rem 0; font-size: .85rem; color: var(--ink-soft, #888); line-height: 1.5; }
49 .tl-explain-tag { font-weight: 600; color: var(--ink, inherit); white-space: nowrap; }
50 .tl-sub { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
51 .tl-follow { display: flex; gap: .5rem; margin: 0 0 1rem; flex-wrap: wrap; align-items: center; }
52 .tl-follow input[type="text"] { flex: 1; min-width: 200px; height: 2.4rem; padding: 0 .9rem; border-radius: 999px; font: inherit;
53 border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent); background: color-mix(in srgb, var(--ink, #000) 4%, transparent); color: var(--ink, #000); }
54 .tl-follow-ab { font-size: .85rem; color: var(--ink-soft, #888); display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
55 .tl-foll-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
56 .tl-foll { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 12px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); }
57 .tl-foll-av { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; background: color-mix(in srgb, var(--accent, #888) 20%, transparent); color: var(--accent, #555); }
58 .tl-foll-av img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
59 .tl-foll-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
60 .tl-foll-meta a { color: var(--ink, inherit); text-decoration: none; font-weight: 600; }
61 .tl-foll-meta a:hover { text-decoration: underline; }
62 .tl-foll-handle { color: var(--ink-soft, #888); font-size: .82rem; }
63 .tl-pending { font-size: .72rem; color: var(--ink-soft, #999); }
64 .tl-foll-ab { margin: 0; font-size: .8rem; color: var(--ink-soft, #888); cursor: pointer; }
65 .tl-foll-ab label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; }
66 .tl-unfollow { background: none; border: 1px solid color-mix(in srgb, var(--ink, #000) 18%, transparent); border-radius: 8px; padding: .25rem .6rem; font-size: .8rem; color: var(--ink-soft, #888); cursor: pointer; }
67 .tl-unfollow:hover { color: var(--ink, #000); }
68 .tl-empty { color: var(--ink-soft, #888); }
69</style>
Note: See TracBrowser for help on using the repository browser.