source: Klonkt/src/views/pages/blocks.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: 2.6 KB
RevLine 
[f5c3870]1<div class="bl-wrap">
[9e5438e]2 <%- include('../partials/fedi-tabs', { active: 'blokkeren' }) %>
[f5c3870]3 <h1 class="bl-title"><%= t('blk.title') %></h1>
4 <p class="bl-lead"><%= t('blk.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
[297c77d]8 <form method="post" action="/blocking/add" class="bl-form">
[f5c3870]9 <input type="text" name="target" placeholder="@naam@server.social • server.social" autocomplete="off" spellcheck="false" required>
10 <button type="submit" class="btn btn-primary"><%= t('blk.block_btn') %></button>
11 </form>
12
13 <% if (!blocks || !blocks.length) { %>
14 <p class="bl-empty"><%= t('blk.empty') %></p>
15 <% } else { %>
16 <ul class="bl-list">
17 <% blocks.forEach(function(b){ %>
18 <li class="bl-item">
19 <span class="bl-kind"><%= b.kind === 'domain' ? '🌐' : '👤' %></span>
20 <span class="bl-label"><%= b.label || b.target %></span>
[297c77d]21 <form method="post" action="/blocking/remove"><input type="hidden" name="target" value="<%= b.target %>"><button type="submit" class="bl-unblock"><%= t('blk.unblock') %></button></form>
[f5c3870]22 </li>
23 <% }); %>
24 </ul>
25 <% } %>
26</div>
27
28<style>
29 .bl-wrap { max-width: 560px; margin: 2rem auto; padding: 0 1rem; }
30 .bl-title { margin: 0 0 .25rem; }
31 .bl-lead { color: var(--ink-soft, #888); margin: 0 0 1.25rem; }
32 .bl-form { display: flex; gap: .5rem; margin: 0 0 1.25rem; flex-wrap: wrap; }
33 .bl-form input { flex: 1; min-width: 220px; height: 2.4rem; padding: 0 .9rem; border-radius: 999px; font: inherit;
34 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); }
35 .bl-empty { color: var(--ink-soft, #888); }
36 .bl-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
37 .bl-item { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 12px; background: color-mix(in srgb, var(--ink, #000) 4%, transparent); border: 1px solid color-mix(in srgb, var(--ink, #000) 8%, transparent); }
38 .bl-kind { font-size: 1.05rem; }
39 .bl-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
40 .bl-unblock { 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; }
41 .bl-unblock:hover { color: var(--ink, #000); }
42</style>
Note: See TracBrowser for help on using the repository browser.