removed not used blocks

This commit is contained in:
Jakub Dorfman 2026-05-20 13:57:07 +02:00
parent fe5d77443d
commit 1b3ef17800
17 changed files with 3 additions and 615 deletions

View file

@ -1,25 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type Article = { title: string; url: string };
let { data } = $props<{
data: { heading?: string; items?: Article[] };
}>();
let items = $derived(data.items?.length ? data.items : []);
</script>
<section class="mx-auto max-w-4xl px-6 py-16 md:py-20">
{#if data.heading}
<h2 use:scrollReveal class="reveal mb-10 text-center text-4xl md:text-5xl">{data.heading}</h2>
{/if}
<div use:scrollReveal class="reveal space-y-4">
{#each items as item}
<a class="group block rounded-[1.5rem] bg-white/70 p-6 shadow-sm ring-1 ring-charcoal/5 transition hover:-translate-y-0.5 hover:shadow-md" href={item.url} target="_blank" rel="noreferrer">
<div class="flex items-center justify-between gap-4">
<span class="text-lg leading-relaxed text-fg-body/80 transition group-hover:text-sage-dark">{item.title}</span>
<span class="shrink-0 text-xl text-sage/50 transition group-hover:text-sage-dark">→</span>
</div>
</a>
{/each}
</div>
</section>

View file

@ -2,21 +2,9 @@
import type { ContentBlock, BlockBackground, BlockForeground } from '$lib/types';
import BackgroundWrapper from './BackgroundWrapper.svelte';
import TextBlock from './TextBlock.svelte';
import ImageBlock from './ImageBlock.svelte';
import ImageTextBlock from './ImageTextBlock.svelte';
import TimelineBlock from './TimelineBlock.svelte';
import TestimonialsBlock from './TestimonialsBlock.svelte';
import ServicesBlock from './ServicesBlock.svelte';
import CtaBlock from './CtaBlock.svelte';
import SpacerBlock from './SpacerBlock.svelte';
import HorizontalCardsBlock from './HorizontalCardsBlock.svelte';
import HeroBlock from './HeroBlock.svelte';
import ColumnsBlock from './ColumnsBlock.svelte';
import PricingTableBlock from './PricingTableBlock.svelte';
import NewsletterBlock from './NewsletterBlock.svelte';
import ArticlesListBlock from './ArticlesListBlock.svelte';
import ProfileCardBlock from './ProfileCardBlock.svelte';
import FeaturesListBlock from './FeaturesListBlock.svelte';
let { blocks = [] } = $props<{ blocks: ContentBlock[] }>();
@ -33,36 +21,12 @@
<BackgroundWrapper background={getBg(block)} foreground={getFg(block)}>
{#if block.type === 'text'}
<TextBlock data={block.data} />
{:else if block.type === 'image'}
<ImageBlock data={block.data} />
{:else if block.type === 'image_text'}
<ImageTextBlock data={block.data} />
{:else if block.type === 'timeline'}
<TimelineBlock data={block.data} />
{:else if block.type === 'testimonials'}
<TestimonialsBlock data={block.data} />
{:else if block.type === 'services'}
<ServicesBlock data={block.data} />
{:else if block.type === 'cta'}
<CtaBlock data={block.data} />
{:else if block.type === 'spacer'}
<SpacerBlock data={block.data} />
{:else if block.type === 'horizontal_cards'}
<HorizontalCardsBlock data={block.data} />
{:else if block.type === 'hero'}
<HeroBlock data={block.data} />
{:else if block.type === 'columns'}
<ColumnsBlock data={block.data} />
{:else if block.type === 'pricing_table'}
<PricingTableBlock data={block.data} />
{:else if block.type === 'newsletter'}
<NewsletterBlock data={block.data} />
{:else if block.type === 'articles_list'}
<ArticlesListBlock data={block.data} />
{:else if block.type === 'profile_card'}
<ProfileCardBlock data={block.data} />
{:else if block.type === 'features_list'}
<FeaturesListBlock data={block.data} />
{/if}
</BackgroundWrapper>
{/each}

View file

@ -1,26 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type Column = { title: string; content: string; icon?: string };
let { data } = $props<{
data: { heading?: string; items?: Column[] };
}>();
let items = $derived(data.items?.length ? data.items : []);
</script>
<section class="mx-auto max-w-6xl px-6 py-16 md:py-20">
{#if data.heading}
<h2 use:scrollReveal class="reveal mb-14 text-center text-4xl md:text-5xl">{data.heading}</h2>
{/if}
<div class="grid gap-8 md:grid-cols-3">
{#each items as item, i}
<article use:scrollReveal={i * 0.1} class="reveal rounded-[2rem] bg-white/70 p-8 shadow-sm ring-1 ring-charcoal/5">
{#if item.icon}
<span class="mb-4 block text-4xl">{item.icon}</span>
{/if}
<h3 class="mb-4 text-2xl">{item.title}</h3>
<div class="prose-wellness text-fg-body/70">{@html item.content}</div>
</article>
{/each}
</div>
</section>

View file

@ -1,17 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
let { data } = $props<{
data: { heading?: string; subtext?: string; buttonLabel?: string; buttonUrl?: string };
}>();
</script>
<section use:scrollReveal class="reveal px-6 py-16 md:py-20">
<div class="mx-auto max-w-5xl rounded-[2.5rem] bg-sage px-8 py-14 text-center text-white shadow-lg md:px-16">
<h2 class="text-4xl text-white md:text-5xl">{data.heading || 'Ready to feel restored?'}</h2>
<p class="mx-auto mt-5 max-w-2xl text-lg leading-8 text-white/85">{data.subtext || 'Book a massage session designed around your body, pace, and needs.'}</p>
{#if data.buttonLabel}
<a class="btn mt-8 rounded-full border-0 bg-white px-8 text-sage-dark hover:bg-warm" href={data.buttonUrl || '/book'}>{data.buttonLabel}</a>
{/if}
</div>
</section>

View file

@ -1,30 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type Category = { title: string; items: string[] };
let { data } = $props<{
data: { heading?: string; categories?: Category[] };
}>();
let categories = $derived(data.categories?.length ? data.categories : []);
</script>
<section class="mx-auto max-w-6xl px-6 py-16 md:py-20">
{#if data.heading}
<h2 use:scrollReveal class="reveal mb-12 text-center text-4xl md:text-5xl">{data.heading}</h2>
{/if}
<div class="grid gap-8 md:grid-cols-3">
{#each categories as cat, i}
<article use:scrollReveal={i * 0.1} class="reveal rounded-[2rem] bg-white/70 p-8 shadow-sm ring-1 ring-charcoal/5">
<h3 class="mb-6 text-center text-2xl">{cat.title}</h3>
<ul class="space-y-4">
{#each cat.items as item}
<li class="flex items-start gap-3 text-fg-body/75">
<span class="mt-1 grid h-6 w-6 shrink-0 place-items-center rounded-full bg-sage/15 text-sm text-sage-dark">✓</span>
<span class="leading-relaxed">{item}</span>
</li>
{/each}
</ul>
</article>
{/each}
</div>
</section>

View file

@ -1,29 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type Card = { title: string; description: string; url?: string; link?: string };
let { data } = $props<{ data: { items?: Card[] } }>();
let items = $derived(data.items?.length ? data.items : [
{ title: 'Mindful touch', description: 'Create calm content cards for studio highlights.' }
]);
</script>
<section class="mx-auto max-w-6xl px-6 py-16">
<div class="mb-8">
<p class="mb-2 text-sm font-semibold uppercase tracking-[0.25em] text-sage-dark">Explore</p>
<h2 class="text-4xl md:text-5xl" use:scrollReveal>Studio highlights</h2>
</div>
<div class="flex gap-5 overflow-x-auto pb-4 md:grid md:grid-cols-3 md:overflow-visible">
{#each items as item, i}
<a use:scrollReveal={i * 0.1} class="reveal min-w-[18rem] overflow-hidden rounded-[2rem] bg-white/75 shadow-sm ring-1 ring-charcoal/5 transition hover:-translate-y-1 hover:shadow-md md:min-w-0" href={item.link || '#'}>
{#if item.url}
<img class="aspect-[4/3] w-full object-cover" src={item.url} alt="" />
{/if}
<div class="p-6">
<h3 class="text-2xl">{item.title}</h3>
<p class="mt-3 leading-7 text-fg-body/70">{item.description}</p>
</div>
</a>
{/each}
</div>
</section>

View file

@ -1,18 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
let { data } = $props<{ data: { url?: string; alt?: string; caption?: string } }>();
</script>
<section use:scrollReveal class="reveal mx-auto max-w-5xl px-6 py-10">
<figure class="overflow-hidden rounded-[2rem] bg-white/70 shadow-sm ring-1 ring-charcoal/5">
{#if data.url}
<img class="aspect-[16/10] w-full object-cover" src={data.url} alt={data.alt || ''} />
{:else}
<div class="grid aspect-[16/10] place-items-center bg-sage/10 text-sage-dark">Image coming soon</div>
{/if}
{#if data.caption}
<figcaption class="px-6 py-4 text-center text-sm text-fg-body/60">{data.caption}</figcaption>
{/if}
</figure>
</section>

View file

@ -1,23 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
let { data } = $props<{
data: {
heading?: string;
subtext?: string;
buttonLabel?: string;
placeholder?: string;
};
}>();
</script>
<section class="bg-sage/10 px-6 py-16 md:py-20">
<div use:scrollReveal class="reveal mx-auto max-w-2xl text-center">
<h2 class="text-3xl md:text-4xl">{data.heading || 'Want to stay connected?'}</h2>
<p class="mx-auto mt-5 max-w-xl leading-relaxed text-fg-body/70">{data.subtext || 'Sign up to receive updates.'}</p>
<form class="mx-auto mt-8 flex max-w-md gap-3" onsubmit={(e) => e.preventDefault()}>
<input class="input input-bordered flex-1 rounded-full bg-white px-6" type="email" placeholder={data.placeholder || 'Your email address'} required />
<button class="btn rounded-full border-0 bg-sage px-8 text-white hover:bg-sage-dark" type="submit">{data.buttonLabel || 'Subscribe'}</button>
</form>
</div>
</section>

View file

@ -1,33 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type PriceRow = { duration: string; price: string };
let { data } = $props<{
data: { heading?: string; items?: PriceRow[] };
}>();
let items = $derived(data.items?.length ? data.items : []);
</script>
<section class="mx-auto max-w-3xl px-6 py-16 md:py-20">
{#if data.heading}
<h2 use:scrollReveal class="reveal mb-10 text-center text-4xl md:text-5xl">{data.heading}</h2>
{/if}
<div use:scrollReveal class="reveal overflow-hidden rounded-[2rem] bg-white/75 shadow-sm ring-1 ring-charcoal/5">
<table class="w-full text-left">
<thead>
<tr class="border-b border-charcoal/10 bg-sage/5">
<th class="px-8 py-5 text-lg font-semibold text-fg-heading">Duration</th>
<th class="px-8 py-5 text-lg font-semibold text-fg-heading">Price</th>
</tr>
</thead>
<tbody>
{#each items as item}
<tr class="border-b border-charcoal/5 transition hover:bg-warm/50">
<td class="px-8 py-4 text-fg-body/80">{item.duration}</td>
<td class="px-8 py-4 font-semibold text-terracotta">{item.price}</td>
</tr>
{/each}
</tbody>
</table>
</div>
</section>

View file

@ -1,57 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
let { data } = $props<{
data: {
name?: string;
tagline?: string;
image?: string;
description?: string;
education?: string[];
contact?: string;
profileUrl?: string;
};
}>();
</script>
<section class="mx-auto max-w-4xl px-6 py-16 md:py-20">
<div use:scrollReveal class="reveal grid items-start gap-10 md:grid-cols-[1fr_2fr]">
<div class="overflow-hidden rounded-[2rem] bg-sage/10 shadow-sm">
{#if data.image}
<img class="aspect-[3/4] w-full object-cover" src={data.image} alt={data.name || ''} />
{:else}
<div class="grid aspect-[3/4] place-items-center text-sage-dark">Photo</div>
{/if}
</div>
<div>
{#if data.name}
<h2 class="text-4xl md:text-5xl">{data.name}</h2>
{/if}
{#if data.tagline}
<p class="mt-2 text-lg font-medium text-sage-dark">{data.tagline}</p>
{/if}
{#if data.description}
<div class="prose-wellness mt-6 text-lg text-fg-body/80">{@html data.description}</div>
{/if}
{#if data.education?.length}
<div class="mt-8">
<h3 class="mb-3 text-xl font-semibold">Education</h3>
<ul class="space-y-2">
{#each data.education as edu}
<li class="flex items-start gap-3 text-fg-body/70">
<span class="mt-1.5 h-2 w-2 shrink-0 rounded-full bg-sage"></span>
{edu}
</li>
{/each}
</ul>
</div>
{/if}
{#if data.contact}
<p class="mt-6 text-fg-body/70">Contact: <a class="font-semibold text-sage-dark hover:text-terracotta" href={`tel:${data.contact}`}>{data.contact}</a></p>
{/if}
{#if data.profileUrl}
<a class="btn mt-6 rounded-full border-0 bg-sage text-white hover:bg-sage-dark" href={data.profileUrl} target="_blank" rel="noreferrer">View full profile</a>
{/if}
</div>
</div>
</section>

View file

@ -1,28 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
type Service = { title: string; description: string; duration: string; price: string };
let { data } = $props<{ data: { items?: Service[] } }>();
let items = $derived(data.items?.length ? data.items : [
{ title: 'Restorative Massage', description: 'A personalized session to ease tension and support deep rest.', duration: '60 min', price: '£70' }
]);
</script>
<section class="mx-auto max-w-6xl px-6 py-16 md:py-20">
<div class="mb-10 text-center">
<p class="mb-2 text-sm font-semibold uppercase tracking-[0.25em] text-sage-dark">Treatments</p>
<h2 class="text-4xl md:text-5xl" use:scrollReveal>Services</h2>
</div>
<div class="grid gap-6 md:grid-cols-2">
{#each items as item, i}
<article use:scrollReveal={i * 0.1} class="reveal group rounded-[2rem] bg-white/75 p-7 shadow-sm ring-1 ring-charcoal/5 transition hover:-translate-y-1 hover:shadow-md">
<div class="flex items-start justify-between gap-4">
<h3 class="text-2xl">{item.title}</h3>
<span class="rounded-full bg-sage/10 px-4 py-2 text-sm font-semibold text-sage-dark">{item.duration}</span>
</div>
<p class="mt-4 leading-7 text-fg-body/70">{item.description}</p>
<p class="mt-6 text-xl font-bold text-terracotta">{item.price}</p>
</article>
{/each}
</div>
</section>

View file

@ -1,6 +0,0 @@
<script lang="ts">
let { data } = $props<{ data: { size?: 'sm' | 'md' | 'lg' } }>();
let height = $derived(data.size === 'lg' ? 'h-24 md:h-36' : data.size === 'sm' ? 'h-8 md:h-12' : 'h-14 md:h-20');
</script>
<div class={height} aria-hidden="true"></div>

View file

@ -1,55 +0,0 @@
<script lang="ts">
import { scrollReveal } from '$lib/scrollReveal';
import { onMount } from 'svelte';
type Testimonial = { name: string; text: string; rating: number };
let { data } = $props<{ data: { items?: Testimonial[] } }>();
let items = $derived(data.items?.length ? data.items : [
{ name: 'Client', text: 'A calming, thoughtful massage experience.', rating: 5 }
]);
let index = $state(0);
let paused = $state(false);
let interval: ReturnType<typeof setInterval> | undefined;
function next() {
index = (index + 1) % items.length;
}
function prev() {
index = (index - 1 + items.length) % items.length;
}
onMount(() => {
interval = setInterval(() => {
if (!paused && items.length > 1) next();
}, 4000);
return () => interval && clearInterval(interval);
});
</script>
<section use:scrollReveal class="reveal bg-white/45 py-16 md:py-20" onmouseenter={() => (paused = true)} onmouseleave={() => (paused = false)} role="region" aria-label="Testimonials carousel">
<div class="mx-auto max-w-5xl px-6">
<div class="mb-10 flex flex-col justify-between gap-4 md:flex-row md:items-end">
<div>
<p class="mb-2 text-sm font-semibold uppercase tracking-[0.25em] text-sage-dark">Kind words</p>
<h2 class="text-4xl md:text-5xl">Client experiences</h2>
</div>
<div class="flex gap-3">
<button class="btn btn-circle bg-white text-charcoal hover:bg-sage hover:text-white" onclick={prev} aria-label="Previous testimonial">‹</button>
<button class="btn btn-circle bg-white text-charcoal hover:bg-sage hover:text-white" onclick={next} aria-label="Next testimonial">›</button>
</div>
</div>
<div class="carousel w-full overflow-hidden rounded-[2rem] bg-warm shadow-sm ring-1 ring-charcoal/5">
{#each items as item, i}
<div class="carousel-item w-full transition-transform duration-500" style={`transform: translateX(-${index * 100}%);`}>
<article class="w-full p-8 md:p-12">
<div class="mb-5 text-xl text-terracotta" aria-label={`${item.rating} stars`}>{'★'.repeat(Math.max(1, Math.min(5, item.rating || 5)))}</div>
<p class="text-2xl leading-relaxed text-fg-body/80 md:text-3xl">“{item.text}”</p>
<p class="mt-6 font-semibold text-sage-dark">— {item.name}</p>
</article>
</div>
{/each}
</div>
</div>
</section>