source: Klonkt/src/views/pages/volgend.ejs@ 297c77d

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

refactor(fedi): English URL paths + equal-width tabs + back-to-site in top nav

  • Renamed all fediverse routes to English: /tijdlijn->/timeline, /volgend->/following, /meldingen->/notifications, /blokkeren->/blocking (+ all sub-routes, form actions, redirects, links, RESERVED_SLUGS). UI labels stay i18n.
  • fedi-tabs: all 5 tabs share the content width equally (flex:1) and always fit (ellipsis) instead of varying widths.
  • Moved 'back to site' from a big in-content button into the top nav (like admin pages), via on-special; removed the in-content button. Archive link hidden on fedi pages too.
  • Property mode set to 100644
File size: 5.1 KB
RevLine 
[46f3dd6]1<div class="tl-wrap">
[9e5438e]2 <%- include('../partials/fedi-tabs', { active: 'following' }) %>
[46f3dd6]3 <h1 class="tl-title"><%= t('tl.title') %></h1>
4 <p class="tl-lead"><%= t('tl.lead') %></p>
5 <% if (typeof success !== 'undefined' && success) { %><div class="alert alert-success"><%= success %></div><% } %>
6 <% if (typeof error !== 'undefined' && error) { %><div class="alert alert-error"><%= error %></div><% } %>
7
[98ceadd]8 <div class="tl-explain">
9 <p><span class="tl-explain-tag">✨ <%= t('tl.autoboost') %></span> — <%= t('tl.autoboost_hint') %></p>
10 </div>
11
[297c77d]12 <form method="post" action="/timeline/follow" class="tl-follow">
[98688c6]13 <input type="text" name="handle" placeholder="@naam@server.social of site.com" autocomplete="off" spellcheck="false" required>
[46f3dd6]14 <button type="submit" class="btn btn-primary"><%= t('tl.follow_btn') %></button>
[484adf8]15 <label class="tl-follow-ab" title="<%= t('tl.autoboost_hint') %>"><input type="checkbox" name="auto_boost" value="1"> ✨ <%= t('tl.autoboost_follow') %></label>
[46f3dd6]16 </form>
17
18 <% if (following && following.length) { %>
19 <h2 class="tl-sub"><%= t('tl.following') %> (<%= following.length %>)</h2>
20 <ul class="tl-foll-list">
21 <% following.forEach(function(f){ %>
22 <li class="tl-foll">
23 <span class="tl-foll-av"><% if (f.icon) { %><img src="<%= f.icon %>" alt=""><% } else { %><%= (f.name || '?').charAt(0).toUpperCase() %><% } %></span>
24 <span class="tl-foll-meta">
25 <a href="<%= f.url || f.actor_uri %>" target="_blank" rel="nofollow noopener"><%= f.name || f.handle %></a>
26 <span class="tl-foll-handle"><%= f.handle %></span>
27 <% if (f.status === 'pending') { %><span class="tl-pending"><%= t('tl.pending') %></span><% } %>
28 </span>
[297c77d]29 <form method="post" action="/timeline/autoboost" class="tl-foll-ab" title="<%= t('tl.autoboost_hint') %>">
[46f3dd6]30 <input type="hidden" name="actor_uri" value="<%= f.actor_uri %>">
[484adf8]31 <label><input type="checkbox" name="auto_boost" value="1" <%= f.auto_boost ? 'checked' : '' %> onchange="this.form.submit()"> ✨ <%= t('tl.autoboost') %></label>
[46f3dd6]32 </form>
[297c77d]33 <form method="post" action="/timeline/unfollow"><input type="hidden" name="actor_uri" value="<%= f.actor_uri %>"><button type="submit" class="tl-unfollow"><%= t('tl.unfollow') %></button></form>
[46f3dd6]34 </li>
35 <% }); %>
36 </ul>
37 <% } else { %>
38 <p class="tl-empty"><%= t('tl.empty_following') %></p>
39 <% } %>
40</div>
41
42<style>
43 .tl-wrap { max-width: 640px; margin: 2rem auto; padding: 0 1rem; }
44 .tl-title { margin: 0 0 .25rem; }
45 .tl-lead { color: var(--ink-soft, #888); margin: 0 0 1.25rem; }
[98ceadd]46 .tl-explain { margin: 0 0 1.25rem; padding: .85rem 1rem; border-radius: 12px;
47 background: color-mix(in srgb, var(--accent, #888) 8%, transparent);
48 border: 1px solid color-mix(in srgb, var(--accent, #888) 22%, transparent); }
49 .tl-explain p { margin: .3rem 0; font-size: .85rem; color: var(--ink-soft, #888); line-height: 1.5; }
50 .tl-explain-tag { font-weight: 600; color: var(--ink, inherit); white-space: nowrap; }
[46f3dd6]51 .tl-sub { font-size: 1.1rem; margin: 1.5rem 0 .75rem; }
52 .tl-follow { display: flex; gap: .5rem; margin: 0 0 1rem; flex-wrap: wrap; align-items: center; }
[5783c67]53 .tl-follow input[type="text"] { flex: 1; min-width: 200px; height: 2.4rem; padding: 0 .9rem; border-radius: 999px; font: inherit;
[46f3dd6]54 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); }
55 .tl-follow-ab { font-size: .85rem; color: var(--ink-soft, #888); display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
56 .tl-foll-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
57 .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); }
58 .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); }
59 .tl-foll-av img { width: 100%; height: 100%; object-fit: cover; }
60 .tl-foll-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
61 .tl-foll-meta a { color: var(--ink, inherit); text-decoration: none; font-weight: 600; }
62 .tl-foll-meta a:hover { text-decoration: underline; }
63 .tl-foll-handle { color: var(--ink-soft, #888); font-size: .82rem; }
64 .tl-pending { font-size: .72rem; color: var(--ink-soft, #999); }
65 .tl-foll-ab { margin: 0; font-size: .8rem; color: var(--ink-soft, #888); cursor: pointer; }
66 .tl-foll-ab label { display: inline-flex; align-items: center; gap: .25rem; cursor: pointer; }
67 .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; }
68 .tl-unfollow:hover { color: var(--ink, #000); }
69 .tl-empty { color: var(--ink-soft, #888); }
70</style>
Note: See TracBrowser for help on using the repository browser.