Changeset 837fc9c in Klonkt for src/views/shell.ejs


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/views/shell.ejs

    raa45208 r837fc9c  
    198198
    199199<!-- v9 stylesheet (full palette system) -->
    200 <link rel="stylesheet" href="/assets/css/style.css?v=55">
     200<link rel="stylesheet" href="/assets/css/style.css?v=56">
    201201<script>
    202202/* iOS safe-area, built by hand. env(safe-area-inset-top) resolves to 0 on this iOS in
     
    725725</script>
    726726
     727<!-- NSFW / sensitive content: click a veil/reveal to un-blur. Capture-phase so the
     728     click reveals instead of following the card link or firing htmx navigation. -->
     729<script>
     730(function () {
     731  if (window.__nsfwWired) return; window.__nsfwWired = true;
     732  document.addEventListener('click', function (e) {
     733    var hit = e.target.closest && e.target.closest('.nsfw-veil, .nsfw-reveal');
     734    if (!hit) return;
     735    e.preventDefault(); e.stopPropagation();
     736    var box = hit.closest('.nsfw-media, .nsfw-gate');
     737    if (box) box.classList.add('is-shown');
     738  }, true);
     739})();
     740</script>
     741
    727742<!-- Per-site custom footer HTML -->
    728743<% if (safeSite.custom_foot_html) { %>
Note: See TracChangeset for help on using the changeset viewer.