domaino/packages/shared/src/blocks/HeroBlock.svelte
agent 91f6705899 Site design → Style: fonts, corners, text size, shadows, page width
A new Style card in Site design (a `style` global) chooses the heading and
body fonts from 15 bundled ones, corners (sharp/soft/round), text size,
shadow strength and page width, with a live sample. The choices become
--site-* CSS variables that the @theme radius, shadow, container and font
tokens scale, so blocks keep using rounded-xl, shadow-sm, max-w-6xl and
follow the setting. Buttons and chips use rounded-button; the defaults
are the site's current look.

Fonts are @fontsource-variable packages (replacing the static DM Sans and
Playfair ones): still served by the site, and a browser downloads only
the fonts a page uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
2026-10-26 19:00:37 +00:00

33 lines
1.2 KiB
Svelte

<script lang="ts">
import { page } from '$app/state';
import { shopLinks } from '$shared/types';
let { data } = $props<{
data: {
heading?: string;
subheading?: string;
buttonLabel?: string;
buttonUrl?: string;
};
}>();
</script>
<section class="relative flex min-h-[80vh] items-center justify-center overflow-hidden px-6 py-20 md:min-h-[90vh]">
<div class="relative z-10 mx-auto max-w-4xl text-center">
<h1 class="animate-fade-in text-5xl leading-tight text-fg-heading md:text-7xl lg:text-8xl">
{data.heading || 'Holistic and Experiential Learning about Happiness'}
</h1>
{#if data.subheading}
<p class="animate-fade-in mx-auto mt-6 max-w-2xl text-lg leading-relaxed text-fg-subheading/70 md:text-xl" style="animation-delay: 0.15s;">
{data.subheading}
</p>
{/if}
{#if data.buttonLabel}
<div class="animate-fade-in mt-10" style="animation-delay: 0.3s;">
<a class="btn rounded-button border-0 bg-sage px-10 py-3 text-lg text-primary-content shadow-lg transition hover:bg-sage-dark hover:shadow-xl" href={data.buttonUrl || shopLinks(page.data.header).booking}>
{data.buttonLabel}
</a>
</div>
{/if}
</div>
</section>