Preschool / daycare identity: crayon borders, sticker badges, confetti, and a dependency-free bouncing-mascot + confetti-canvas hero showpiece (hero/landing only, lazy-init, prefers-reduced-motion honored, static no-JS fallback). - All 49 mandatory builtin overrides (OVERRIDE-CONTRACT §1), field-correct against the frozen cms builtins, re-skinned to the crayon design system. Legacy button (label/link/style) and card (text/media) field reads reconciled. - 7 page templates: default, full-width, landing, article, blog-index, contact, auth — standard header/main/footer slots, dotted-paper chrome, dual-mode. - Blocks reworked: mascot_hero/big_cta/gallery_of_art/numbers_counter/ storybook_quote/footer converted to builtin overrides; 4 persona blocks kept/ added — alphabet_strip (array-shaped, gotcha-safe), schedule, art_wall, story_time. - 5 presets, all mode "both", bright-classroom light + quiet-time navy dark. - Bundled OFL woff2 (Baloo 2 700, Quicksand 400/700) in assets/fonts + LICENSES; all font-family via var(--font-*); RECOMMENDED_FONTS/ICONS updated; required_icon_packs declared. - Themed email-safe wrapper; master pages (site + auth); seed demo site (home/about/blog+3 posts/contact form+row_inserted email workflow/login), preschool voice. Known platform limit (OVERRIDE-CONTRACT §11): auth-form/auth-status/ password-reset-form/page-suggestions overrides are authored correct-to-model but do not dispatch (compiled BlockFuncs). page-suggestions also omits the dynamic suggestion list (no FTS in codeless). Verified: `make` (ninja plugin build) exit 0; check-safety exit 0. Visual quality UNVERIFIED until Wave B. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
4.1 KiB
Plaintext
50 lines
4.1 KiB
Plaintext
{# countdown kindergarten override: neon HUD digit boxes, heading. Timer script + data attributes preserved byte-for-byte. #}
|
|
<section class="relative overflow-hidden py-16 md:py-24 bg-background text-foreground{% if class %} {{ class }}{% endif %}">
|
|
<div class="relative z-10 mx-auto max-w-4xl px-4 text-center">
|
|
{% if heading %}<h2 class="kg-display text-3xl font-semibold tracking-tight md:text-4xl">{{ heading }}</h2>{% endif %}
|
|
{% if intro %}<p class="mx-auto mt-4 max-w-2xl text-lg text-muted-foreground">{{ intro }}</p>{% endif %}
|
|
<div class="mt-10" data-countdown>
|
|
<div class="flex items-start justify-center gap-3 sm:gap-6" data-countdown-timer data-target="{{ target }}" role="timer" aria-label="Time remaining">
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] rounded-2xl border border-primary/50 bg-card px-3 py-4 text-card-foreground kg-crayon-shadow{% endif %}"><span class="kg-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="days">--</span><span class="kg-mono mt-1 text-xs font-medium text-muted-foreground">{{ labelDays|default:"Days" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] rounded-2xl border border-primary/50 bg-card px-3 py-4 text-card-foreground kg-crayon-shadow{% endif %}"><span class="kg-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="hours">--</span><span class="kg-mono mt-1 text-xs font-medium text-muted-foreground">{{ labelHours|default:"Hours" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] rounded-2xl border border-primary/50 bg-card px-3 py-4 text-card-foreground kg-crayon-shadow{% endif %}"><span class="kg-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="minutes">--</span><span class="kg-mono mt-1 text-xs font-medium text-muted-foreground">{{ labelMinutes|default:"Minutes" }}</span></div>
|
|
<div class="flex flex-col items-center {% if variant == "boxes" %}min-w-[4.5rem] rounded-2xl border border-primary/50 bg-card px-3 py-4 text-card-foreground kg-crayon-shadow{% endif %}"><span class="kg-mono text-4xl font-bold tabular-nums sm:text-5xl text-primary" data-unit="seconds">--</span><span class="kg-mono mt-1 text-xs font-medium text-muted-foreground">{{ labelSeconds|default:"Seconds" }}</span></div>
|
|
</div>
|
|
<div class="mt-8 hidden" data-countdown-expired>
|
|
<p class="kg-display text-xl font-medium">{{ expiredMessage|default:"This has started." }}</p>
|
|
{% if expiredUrl and expiredLabel %}<a href="{{ expiredUrl }}" class="kg-mono kg-pop mt-4 inline-flex items-center gap-2 rounded-2xl bg-primary px-5 py-3 font-semibold text-primary-foreground transition-opacity hover:opacity-90">{{ expiredLabel }}<svg class="h-4 w-4" aria-hidden="true"><use href="/icons/lucide.svg#arrow-right"></use></svg></a>{% endif %}
|
|
</div>
|
|
</div>
|
|
<noscript><p class="mt-6 text-muted-foreground">Counting down to <time datetime="{{ target }}">{{ target }}</time>.</p></noscript>
|
|
</div>
|
|
</section>
|
|
<script>
|
|
(function(){
|
|
var timers = document.querySelectorAll('[data-countdown-timer]');
|
|
timers.forEach(function(el){
|
|
var target = new Date(el.getAttribute('data-target')).getTime();
|
|
if (isNaN(target)) return;
|
|
var wrap = el.closest('[data-countdown]');
|
|
var expired = wrap ? wrap.querySelector('[data-countdown-expired]') : null;
|
|
function pad(n){ return (n < 10 ? '0' : '') + n; }
|
|
function set(unit, value){ var node = el.querySelector('[data-unit="' + unit + '"]'); if (node) node.textContent = value; }
|
|
var interval;
|
|
function tick(){
|
|
var diff = target - Date.now();
|
|
if (diff <= 0){
|
|
el.style.display = 'none';
|
|
if (expired) expired.classList.remove('hidden');
|
|
if (interval) clearInterval(interval);
|
|
return;
|
|
}
|
|
set('days', Math.floor(diff / 86400000));
|
|
set('hours', pad(Math.floor(diff % 86400000 / 3600000)));
|
|
set('minutes', pad(Math.floor(diff % 3600000 / 60000)));
|
|
set('seconds', pad(Math.floor(diff % 60000 / 1000)));
|
|
}
|
|
tick();
|
|
interval = setInterval(tick, 1000);
|
|
});
|
|
})();
|
|
</script>
|