|
1 | 1 | <script lang="ts"> |
2 | | - import { browser } from '$app/environment'; |
| 2 | + import { browser, building } from '$app/environment'; |
| 3 | + import { page } from '$app/state'; |
| 4 | + import { |
| 5 | + DEFAULT_HERO_CTA, |
| 6 | + DEFAULT_HERO_SUBTITLE, |
| 7 | + DEFAULT_HERO_TITLE |
| 8 | + } from '$lib/statsig/constants'; |
| 9 | + import { resolveHeroQueryOverrides } from '$lib/statsig/hero-query-overrides'; |
| 10 | + import type { HeroLayoutVariant } from '$lib/statsig/hero-layout'; |
| 11 | + import type { PageData } from './$types'; |
3 | 12 | import Bento from './(components)/bento/bento.svelte'; |
4 | 13 | import CaseStudies from './(components)/case-studies.svelte'; |
5 | 14 | import Features from './(components)/features.svelte'; |
|
14 | 23 | import { FooterNav, MainFooter } from '$lib/components'; |
15 | 24 | import LogoList from './(components)/logo-list.svelte'; |
16 | 25 | import Ai from './(components)/ai.svelte'; |
| 26 | +
|
| 27 | + /** Same baseline + query resolution as `hero.svelte`; tab title prefixes the brand. */ |
| 28 | + type MarketingHeroPageData = PageData & { |
| 29 | + statsigBootstrap?: string | null; |
| 30 | + statsigStableUserId?: string | null; |
| 31 | + statsigUserAgent?: string | null; |
| 32 | + }; |
| 33 | +
|
| 34 | + const data = $derived(page.data as MarketingHeroPageData); |
| 35 | +
|
| 36 | + const heroPageTitle = $derived( |
| 37 | + resolveHeroQueryOverrides(building ? new URLSearchParams() : page.url.searchParams, { |
| 38 | + heroLayout: (data.heroLayout ?? 0) as HeroLayoutVariant, |
| 39 | + heroSubtitle: data.heroSubtitle ?? DEFAULT_HERO_SUBTITLE, |
| 40 | + heroTitle: data.heroTitle ?? DEFAULT_HERO_TITLE, |
| 41 | + heroCta: data.heroCta ?? DEFAULT_HERO_CTA |
| 42 | + }).heroTitle |
| 43 | + ); |
| 44 | +
|
| 45 | + const homepageDocumentTitle = $derived(`Appwrite - ${heroPageTitle}`); |
17 | 46 | </script> |
18 | 47 |
|
19 | 48 | <Head |
20 | | - title="Appwrite - Build like a team of hundreds" |
| 49 | + title={homepageDocumentTitle} |
21 | 50 | description="Build like a team of hundreds with Appwrite's all-in-one, open-source infrastructure. Launch in minutes, use any framework, and scale affordably with Auth, Database, Storage, Functions, Realtime, Messaging, and Sites for static sites, SSR, and CSR frontends." |
22 | 51 | /> |
23 | 52 |
|
|
0 commit comments