Changeset 837fc9c in Klonkt for src/assets/css/style.css


Ignore:
Timestamp:
06/27/2026 07:51:44 AM (2 months ago)
Author:
Robin Genis <roboburr@…>
Branches:
main
Children:
92f6976
Parents:
aa45208
Message:

feat(posts): NSFW / sensitive content

Mark a post NSFW (checkbox in the editor, available to all). On-site the cover blurs in
feed/grid and the whole post blurs behind a 'Gevoelige inhoud' banner until clicked. In the
fediverse the Note gets sensitive:true + a content-warning summary (Mastodon CW). i18n NL/EN/DE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/assets/css/style.css

    raa45208 r837fc9c  
    45394539.fedi-remote-form .fedi-remote-cancel { background: none; border: none; color: var(--ink-soft, #888); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .25rem .35rem; }
    45404540.fedi-remote-form .fedi-remote-cancel:hover { color: var(--ink, #000); }
     4541
     4542/* ── NSFW / sensitive content — blur + click to reveal ───────────────── */
     4543.nsfw-media { position: relative; }
     4544.nsfw-veil {
     4545  position: absolute; inset: 0; z-index: 4; cursor: pointer; border-radius: inherit;
     4546  display: flex; flex-direction: column; align-items: center; justify-content: center;
     4547  gap: .5rem; padding: .75rem; text-align: center;
     4548  background: color-mix(in srgb, var(--paper, #14141a) 50%, transparent);
     4549  backdrop-filter: blur(22px) saturate(.6); -webkit-backdrop-filter: blur(22px) saturate(.6);
     4550}
     4551.nsfw-media.is-shown > .nsfw-veil { display: none; }
     4552.nsfw-veil-label { font-weight: 700; font-size: .82rem; color: var(--ink, #f3f1ea); text-shadow: 0 1px 2px rgba(0,0,0,.5); }
     4553.nsfw-veil-btn {
     4554  font-size: .72rem; font-weight: 600; padding: .3rem .8rem; border-radius: 999px;
     4555  border: 1px solid color-mix(in srgb, var(--ink, #fff) 55%, transparent);
     4556  background: color-mix(in srgb, var(--paper, #000) 35%, transparent); color: var(--ink, #f3f1ea);
     4557}
     4558/* Post page: blur cover + body behind a content-warning banner until revealed */
     4559.nsfw-gate .post-cover,
     4560.nsfw-gate .post-content { filter: blur(26px); pointer-events: none; user-select: none; transition: filter .2s ease; }
     4561.nsfw-gate.is-shown .post-cover,
     4562.nsfw-gate.is-shown .post-content { filter: none; pointer-events: auto; user-select: auto; }
     4563.nsfw-banner {
     4564  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: 0 0 1.5rem;
     4565  padding: .8rem 1rem; border-radius: 12px;
     4566  border: 1px solid color-mix(in srgb, var(--accent, #e8b04b) 45%, transparent);
     4567  background: color-mix(in srgb, var(--accent, #e8b04b) 9%, transparent);
     4568}
     4569.nsfw-gate.is-shown .nsfw-banner { display: none; }
     4570.nsfw-banner-icon { font-size: 1.2rem; }
     4571.nsfw-banner-text { font-weight: 600; font-size: .92rem; color: var(--ink); }
     4572.nsfw-banner-btn {
     4573  margin-left: auto; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 600;
     4574  padding: .4rem 1rem; border-radius: 999px; border: 0;
     4575  background: var(--accent, #e8b04b); color: #1a1205;
     4576}
Note: See TracChangeset for help on using the changeset viewer.