fix: kein s.w.org-emoji-request + kein weissraum unter dem blocker (v1.4.3)

1) Das Warn-Emoji "⚠" im platzhalter-text loeste WordPress' wp-emoji aus, das
   die grafik von s.w.org nachlud (drittanbieter-request). Emoji aus den texten
   entfernt; das warn-dreieck wird jetzt rein per CSS gezeichnet (kein netzwerk).
   Hinweis: s.w.org ist der WP-emoji-CDN, NICHT Google.
2) Der platzhalter reservierte die hoehe des eingebetteten elements -> bei
   kuerzerem inhalt entstand weissraum darunter. Hoehen-reservierung entfernt
   (PHP min-height-style, JS minHeight, CSS min-height:180px) - der content
   blocker ist jetzt exakt so hoch wie sein eigener inhalt. Die original-masse
   bleiben als data-attribute fuer das iframe nach einwilligung erhalten.
3) Redundante, partielle de_DE-.po/.mo (mit altem emoji) entfernt - deutsche
   locales nutzen direkt die deutschen quell-strings.

+ version 1.4.3 (assets cache-busting).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
s4luorth
2026-06-08 13:23:34 +02:00
parent 176ded0228
commit 494518e98e
10 changed files with 27 additions and 144 deletions

View File

@@ -23,7 +23,6 @@
display: flex;
align-items: flex-start; /* pin content to the top */
justify-content: center;
min-height: 180px; /* fallback only; real height is set inline */
width: 100%;
background-color: var(--cb-bg);
color: var(--cb-text);
@@ -31,7 +30,7 @@
padding: 24px 8px 20px; /* min 20px top/bottom, 8px sides */
font-family: inherit;
border-radius: 4px;
overflow: auto; /* if text is taller than the embed, scroll, don't clip */
/* No reserved height: the placeholder is exactly as tall as its content. */
}
/* ── Inner content ── */
@@ -62,6 +61,18 @@
color: #f0b429; /* amber — universal caution, brand-neutral */
font-weight: 600;
}
/* Caution marker drawn in pure CSS (no emoji → no s.w.org/emoji request). */
.cb-blocker .cb-blocker__third-country::before {
content: "";
display: inline-block;
width: 0;
height: 0;
margin-right: 6px;
vertical-align: -2px;
border-left: 0.45em solid transparent;
border-right: 0.45em solid transparent;
border-bottom: 0.8em solid currentColor;
}
/* ── Privacy link ── */
.cb-blocker .cb-blocker__privacy-link {

View File

@@ -169,11 +169,10 @@
wrap.className = 'cb-blocker';
wrap.setAttribute( 'data-cb-id', svc.id );
wrap.dataset.src = src;
// Keep the dims for the iframe we create on consent, but do NOT reserve
// height — the placeholder is sized to its own content (no empty space).
if ( dims.width ) wrap.dataset.width = dims.width;
if ( dims.height ) wrap.dataset.height = dims.height;
if ( dims.height && /^\d+$/.test( String( dims.height ) ) ) {
wrap.style.minHeight = dims.height + 'px';
}
const inner = document.createElement( 'div' );
inner.className = 'cb-blocker__inner';