source: Klonkt/src/views/pages/blocks.ejs@ 28bf7f0

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

style(fedi): remove the extra tab headroom + reduce wrapper top margin

Reverted the fedi-tabs top margin/mobile safe-area I'd added (the masthead already
clears the iOS notch via its own safe-area padding), and reduced the 5 fediverse page
wrappers' top margin 2rem -> 1rem. Less headroom on desktop/Android/iOS.

  • 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>
[dee7f02]29 .bl-wrap { max-width: 640px; margin: 1rem auto; padding: 0 1rem; }
[f5c3870]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.