Content Rewrite

This commit is contained in:
2026-05-07 21:47:42 +12:00
parent 0d86f450ec
commit a90dfb7c66
47 changed files with 1352 additions and 527 deletions
+1 -1
View File
@@ -48,7 +48,7 @@
background:
radial-gradient(circle at 20% 15%, #2a3e2a 0%, transparent 55%),
radial-gradient(circle at 80% 85%, #1a261a 0%, transparent 55%),
var(--green);
var(--gw-green);
color: #fff;
overflow: hidden;
padding: 48px 24px;
+5
View File
@@ -5,6 +5,7 @@
import { initClickTracking, trackPageView } from '$lib/analytics';
import MobileBookBar from '$lib/components/MobileBookBar.svelte';
import RouteSkeleton from '$lib/components/RouteSkeleton.svelte';
import { isMobileCtaButtonEnabled } from '$lib/feature-flags';
import '$lib/styles/variables.css';
import '$lib/styles/base.css';
import '$lib/styles/layout.css';
@@ -14,6 +15,8 @@
import '$lib/styles/sections.css';
import '$lib/styles/responsive.css';
const mobileCtaButtonEnabled = isMobileCtaButtonEnabled();
onMount(() => initClickTracking());
function shouldShowSkeleton() {
@@ -61,6 +64,8 @@
});
</script>
<svelte:body class:mobile-cta-enabled={mobileCtaButtonEnabled} />
<div class="layout-shell">
<div class:layout-content-loading={showRouteSkeleton} class="layout-content" aria-hidden={showRouteSkeleton}>
<slot />
+3 -1
View File
@@ -1,7 +1,9 @@
import { getHomepageContent } from '$lib/server/content';
import { isHomepageHowItWorksEnabled } from '$lib/server/feature-flags';
export async function load() {
return {
content: await getHomepageContent()
content: await getHomepageContent(),
howItWorksEnabled: isHomepageHowItWorksEnabled()
};
}
+3 -1
View File
@@ -140,7 +140,9 @@
<HeroSection hero={data.content.hero} reviewCta={data.content.intro.reviewCta} />
<PromiseSection promise={data.content.promise} />
<ServicesSection services={data.content.services} />
<HowItWorksSection content={data.content.howItWorks} />
{#if data.howItWorksEnabled}
<HowItWorksSection content={data.content.howItWorks} />
{/if}
<TestimonialsSection testimonials={data.content.testimonials} />
<ValuesSection values={data.content.values} />
<BookingSection booking={data.content.booking} />
+6 -6
View File
@@ -101,9 +101,9 @@
{
'@context': 'https://schema.org',
'@type': 'Service',
name: packWalksContent.hero.title,
name: 'Goodwalk Pack Walks',
description: data.page.description,
serviceType: 'Pack Walks',
serviceType: 'Pack walks for small and medium dogs',
provider: {
'@type': 'LocalBusiness',
name: 'Goodwalk',
@@ -124,9 +124,9 @@
{
'@context': 'https://schema.org',
'@type': 'Service',
name: dogWalkingContent.hero.title,
name: 'Goodwalk 1:1 Dog Walks',
description: data.page.description,
serviceType: '1:1 Dog Walking',
serviceType: 'One-on-one dog walking',
provider: {
'@type': 'LocalBusiness',
name: 'Goodwalk',
@@ -147,9 +147,9 @@
{
'@context': 'https://schema.org',
'@type': 'Service',
name: puppyVisitsContent.hero.title,
name: 'Goodwalk Puppy Visits',
description: data.page.description,
serviceType: 'Puppy Visits',
serviceType: 'In-home puppy visits',
provider: {
'@type': 'LocalBusiness',
name: 'Goodwalk',
+20 -3
View File
@@ -1,22 +1,39 @@
import { describe, expect, it, vi } from 'vitest';
import { homepageContent } from '$lib/content/homepage';
const { getHomepageContent } = vi.hoisted(() => ({
getHomepageContent: vi.fn()
const { getHomepageContent, isHomepageHowItWorksEnabled } = vi.hoisted(() => ({
getHomepageContent: vi.fn(),
isHomepageHowItWorksEnabled: vi.fn()
}));
vi.mock('$lib/server/content', () => ({
getHomepageContent
}));
vi.mock('$lib/server/feature-flags', () => ({
isHomepageHowItWorksEnabled
}));
import { load } from './+page.server';
describe('home page server load', () => {
it('returns homepage content', async () => {
getHomepageContent.mockResolvedValue(homepageContent);
isHomepageHowItWorksEnabled.mockReturnValue(false);
await expect(load()).resolves.toEqual({
content: homepageContent
content: homepageContent,
howItWorksEnabled: false
});
});
it('returns the how it works flag when enabled', async () => {
getHomepageContent.mockResolvedValue(homepageContent);
isHomepageHowItWorksEnabled.mockReturnValue(true);
await expect(load()).resolves.toEqual({
content: homepageContent,
howItWorksEnabled: true
});
});
});