feat(website): footer sub-pages + shared page layout
Wire every footer link to a real route. Adds a shared `page` layout (Nav +
content + Footer), reusable PageHeader/ComingSoon components, six content pages
(about, contact, brand, roadmap, changelog, migration), and a dynamic [slug]
catch-all for the not-yet-built pages — unknown slugs 404, legal slugs get a
distinct "contact us" body.
Footer links repointed from dead "#" to real paths; section anchors ("/#suite")
smooth-scroll on the homepage and route home + scroll from a sub-page; logo
links home. Page copy (da + en) added under COPY.pages.
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<script setup lang="ts">
|
||||
// Catch-all for the footer's not-yet-built pages. Each known slug renders a
|
||||
// shared "coming soon" body with its localized title; legal slugs get the
|
||||
// legal-specific body. Unknown slugs 404 (explicit pages like /about win over
|
||||
// this dynamic route in Nuxt's resolver).
|
||||
import { computed } from 'vue'
|
||||
import { useRoute, useCopy } from '#imports'
|
||||
|
||||
definePageMeta({ layout: 'page' })
|
||||
|
||||
// Known stub slugs and whether they're legal pages. Keys must match the
|
||||
// `pages.stubs` keys in landingCopy.ts.
|
||||
const STUBS: Record<string, { legal: boolean }> = {
|
||||
customers: { legal: false },
|
||||
careers: { legal: false },
|
||||
press: { legal: false },
|
||||
status: { legal: false },
|
||||
docs: { legal: false },
|
||||
blog: { legal: false },
|
||||
privacy: { legal: true },
|
||||
dpa: { legal: true },
|
||||
terms: { legal: true },
|
||||
sla: { legal: true },
|
||||
cookies: { legal: true },
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
const copy = useCopy()
|
||||
|
||||
const slug = computed(() => String(route.params.slug))
|
||||
|
||||
const stub = computed(() => STUBS[slug.value])
|
||||
if (!stub.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
|
||||
}
|
||||
|
||||
type StubKey = keyof typeof copy.value.pages.stubs
|
||||
const title = computed(() => copy.value.pages.stubs[slug.value as StubKey])
|
||||
const body = computed(() => (stub.value!.legal ? copy.value.pages.legalBody : copy.value.pages.comingSoonBody))
|
||||
|
||||
useHead({ title: () => `${title.value} · dezky` })
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LandingComingSoon :title="title" :body="body" />
|
||||
</template>
|
||||
Reference in New Issue
Block a user