- Article title no longer rendered twice: seed article pages drop the duplicate level-1 heading block; the article template's page <h1> is the sole title. - Home dead gap resolved: landing sections divided by a hard 4px rule. The CMS wraps each block in its own <div data-block-id>, so the divider adjacency now targets the block wrappers ([data-block-id]+[data-block-id] .bru-section), not the (non-sibling) sections; landing section padding reduced 4rem->3rem. - SVG geometry guard completed: explicit width/height on every <use> icon SVG, including the 5 testimonial star ratings the earlier regex missed (the ">=" in their class conditional). - Seed quality: HARDSET site title hardset; article expanded to ~9 hard-edged paragraphs to kill the below-article void. - Fresh 2880x1800 light+dark captures for home/about/article; preview = home-light. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
22 lines
1.8 KiB
Plaintext
22 lines
1.8 KiB
Plaintext
{# brutalist announcement-bar override — bold bordered strip, dismissable. Fields: message, variant, linkText, linkUrl, dismissable. #}
|
|
{% set annstyle = "background:hsl(var(--accent));color:hsl(var(--accent-foreground))" %}
|
|
{% if variant == "alert" %}{% set annstyle = "background:hsl(var(--destructive));color:hsl(var(--destructive-foreground))" %}{% elif variant == "info" %}{% set annstyle = "background:hsl(var(--foreground));color:hsl(var(--background))" %}{% endif %}
|
|
<div data-bn-announcement data-bn-annkey="{{ variant|default:"promo" }}:{{ message|slugify }}" class="bn-announcement w-full {{ class }}" style="{{ annstyle }};border-bottom:3px solid hsl(var(--border))">
|
|
<div class="bru-wrap py-2 relative flex items-center justify-center gap-2">
|
|
<p class="bru-meta" style="color:inherit;letter-spacing:0.08em">{{ message }}{% if linkText and linkUrl %} <a href="{{ linkUrl }}" class="underline underline-offset-2 hover:opacity-80">{{ linkText }}</a>{% endif %}</p>
|
|
{% if dismissable %}<button type="button" data-bn-ann-dismiss aria-label="Dismiss announcement" class="absolute right-3 top-1/2 -translate-y-1/2 inline-flex items-center justify-center p-1"><svg width="16" height="16" class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#x"></use></svg></button>{% endif %}
|
|
</div>
|
|
</div>
|
|
{% if dismissable %}<script>
|
|
(function(){
|
|
var bars=document.querySelectorAll('[data-bn-announcement]:not([data-bn-ann-wired])');
|
|
bars.forEach(function(bar){
|
|
bar.setAttribute('data-bn-ann-wired','1');
|
|
var key='bnann:'+bar.getAttribute('data-bn-annkey');
|
|
try{if(localStorage.getItem(key)==='1'){bar.style.display='none';return;}}catch(e){}
|
|
var btn=bar.querySelector('[data-bn-ann-dismiss]');
|
|
if(btn)btn.addEventListener('click',function(){bar.style.display='none';try{localStorage.setItem(key,'1');}catch(e){}});
|
|
});
|
|
})();
|
|
</script>{% endif %}
|