- Replace ::icon:: shortcodes with explicit sized <svg><use> (events_marquee, membership_tiers, button, hours-location, divider). - Add width/height presentation attrs to every <use> SVG (recipe 4d guard). - hero: field.text -> field|get:"text"|default:field (bare-string seed fields no longer error the block to EMPTY — About orphaned-rule root cause). - reveal script: rAF kick + all() no-scroll fallback 2600ms -> 650ms across all templates so above/below-fold content never strands invisible without scroll. - article: render aside + vertical divider only when slots.aside is non-empty (kills the empty fenced right column); narrow single-column when no aside. - presets: deeper near-black backgrounds, higher-contrast foregrounds, richer brass/gold accents across all five palettes (light + dark). - divider/quote: retire busy reel-strip sunburst for clean centred gold rules. - seed: longer members-club articles; wire licensed noir stock imagery (bar-scene B&W hero, bar-shelf About, bar-interior/dark-lounge blog cards). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
24 lines
3.3 KiB
Plaintext
24 lines
3.3 KiB
Plaintext
{# video-embed override — gold-framed facade; play button in a gold-ringed medallion. Fields + facade JS mirror builtin verbatim: aspect, url, media, poster, title, caption. #}
|
|
{% with aspect=aspect|default:"16:9" %}<figure data-block-override="gotham:video-embed" class="bn-video my-8{% if class %} {{ class }}{% endif %}"><div class="reel-mat"><div class="bn-video-frame relative w-full overflow-hidden bg-muted {% if aspect == "4:3" %}aspect-[4/3]{% elif aspect == "1:1" %}aspect-square{% elif aspect == "21:9" %}aspect-[21/9]{% else %}aspect-video{% endif %}" data-bn-video data-video-url="{{ url|default:"" }}" data-video-media="{% if media %}{{ media|mediaURL }}{% endif %}"><button type="button" data-bn-video-play class="group absolute inset-0 flex h-full w-full items-center justify-center focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring" aria-label="Play video{% if title %}: {{ title }}{% endif %}">{% if poster %}{% img poster alt=title|default:"" class="absolute inset-0 h-full w-full object-cover" %}{% endif %}<span class="absolute inset-0 bg-foreground/10 transition-colors group-hover:bg-foreground/20" aria-hidden="true"></span><span class="reel-foil relative inline-flex h-16 w-16 items-center justify-center rounded-full bg-background/90 text-primary transition-transform group-hover:scale-105 motion-reduce:transform-none"><svg class="inline-block h-8 w-8" width="32" height="32" aria-hidden="true"><use href="/icons/lucide.svg#play"></use></svg></span></button></div></div>{% if caption %}<figcaption class="mt-3 text-center text-sm italic" style="color:hsl(var(--muted-foreground));font-family:var(--font-body, 'Cormorant Garamond', Georgia, serif);">{{ caption }}</figcaption>{% endif %}</figure><script>
|
|
(function(){
|
|
if(window.__bnVideoFacade)return;window.__bnVideoFacade=true;
|
|
function yt(u){var m=u.match(/(?:youtube\.com\/(?:watch\?v=|embed\/|shorts\/)|youtu\.be\/)([\w-]{6,})/);return m?m[1]:null;}
|
|
function vim(u){var m=u.match(/vimeo\.com\/(?:video\/)?(\d+)/);return m?m[1]:null;}
|
|
document.addEventListener('click',function(e){
|
|
var btn=e.target.closest('[data-bn-video-play]');if(!btn)return;
|
|
var frame=btn.closest('[data-bn-video]');if(!frame)return;
|
|
e.preventDefault();
|
|
var url=frame.getAttribute('data-video-url')||'',media=frame.getAttribute('data-video-media')||'',node;
|
|
var vstyle='position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:rgba(0,0,0,1);';
|
|
if(media){node=document.createElement('video');node.src=media;node.controls=true;node.autoplay=true;node.setAttribute('playsinline','');node.style.cssText=vstyle;}
|
|
else{var y=yt(url),v=vim(url),embed;
|
|
if(y)embed='https://www.youtube-nocookie.com/embed/'+y+'?autoplay=1&rel=0';
|
|
else if(v)embed='https://player.vimeo.com/video/'+v+'?autoplay=1';
|
|
if(embed){node=document.createElement('iframe');node.src=embed;node.allow='autoplay; fullscreen; picture-in-picture';node.setAttribute('allowfullscreen','');node.setAttribute('title',btn.getAttribute('aria-label')||'Video');node.style.cssText='position:absolute;inset:0;width:100%;height:100%;border:0;';}
|
|
else if(url){node=document.createElement('video');node.src=url;node.controls=true;node.autoplay=true;node.setAttribute('playsinline','');node.style.cssText=vstyle;}
|
|
}
|
|
if(node){btn.remove();frame.appendChild(node);}
|
|
});
|
|
})();
|
|
</script>{% endwith %}
|