feat(website): bilingual i18n (English default, Danish at /da) + SEO
Add @nuxtjs/i18n: English is the default locale (no prefix), Danish lives under /da (prefix_except_default). Both server-rendered and indexed with hreflang alternates + per-locale canonical (useLocaleHead in app.vue). First-visit browser language is auto-detected and remembered in the i18n_redirected cookie (redirectOn root). - Keep the hand-authored COPY object; useLang/useCopy now read the i18n locale; useLocalizeHref/useLangToggle added. Every internal link is localized so navigation stays in-locale. - Clear segmented EN|DA language switcher (active segment filled) replacing the ambiguous "en · da" pill. - SEO: useSeoMeta defaults are locale-aware; og:image switches per locale (English / Danish share card); favicon links; robots.txt + sitemap.xml; env-aware siteUrl/baseUrl (localhost in dev, dezky.eu in prod). - Update the cookie policy (dezky-lang -> i18n_redirected). - Gate the Traefik wss:443 HMR behind DEZKY_TRAEFIK so localhost dev/DevTools connect over plain ws (fixes the DevTools disconnect loop).
This commit is contained in:
@@ -7,11 +7,12 @@ import { useCopy } from '~/composables/useLanding'
|
||||
defineProps<{ title: string, body: string }>()
|
||||
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LandingPageHeader :label="copy.pages.comingSoonKicker" :title="title" :intro="body" />
|
||||
<LandingContainer pad="clamp(32px, 5vw, 48px) clamp(20px, 5vw, 64px) clamp(56px, 8vw, 160px)">
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo('/demo')">{{ copy.pages.ctaDemo }} →</LandingBtn>
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo(localePath('/demo'))">{{ copy.pages.ctaDemo }} →</LandingBtn>
|
||||
</LandingContainer>
|
||||
</template>
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { C } from '~/utils/landingTokens'
|
||||
import { useCopy } from '~/composables/useLanding'
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -20,7 +21,7 @@ const copy = useCopy()
|
||||
</h2>
|
||||
<div :style="{ marginTop: '28px', maxWidth: 'min(100%, 520px)', fontFamily: '\'Inter\', sans-serif', fontSize: '19px', color: 'rgba(244,243,238,0.7)' }">{{ copy.finalCta.sub }}</div>
|
||||
<div :style="{ marginTop: '40px' }">
|
||||
<button @click="navigateTo('/demo')" :style="{
|
||||
<button @click="navigateTo(localePath('/demo'))" :style="{
|
||||
background: C.signal, color: C.carbon, border: 'none',
|
||||
padding: '20px 32px', fontFamily: '\'Inter\', sans-serif',
|
||||
fontSize: '16px', fontWeight: 600, borderRadius: '4px', cursor: 'pointer',
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
// home + scroll from a sub-page.
|
||||
import { useRoute } from 'vue-router'
|
||||
import { C } from '~/utils/landingTokens'
|
||||
import { useTheme, useCopy, scrollToAnchor } from '~/composables/useLanding'
|
||||
import { useTheme, useCopy, useLocalizeHref, scrollToAnchor } from '~/composables/useLanding'
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const route = useRoute()
|
||||
const loc = useLocalizeHref()
|
||||
const localePath = useLocalePath()
|
||||
|
||||
function onLink(e: MouseEvent, href: string) {
|
||||
// In-page section link ("/#suite"): smooth-scroll in place when already on
|
||||
// the homepage. Off-page, let NuxtLink route to "/#suite" — index.vue scrolls
|
||||
// to the hash on mount.
|
||||
if (href.includes('#') && route.path === '/') {
|
||||
// the current locale's homepage. Off-page, let NuxtLink route to the
|
||||
// localized home + hash — index.vue scrolls to the hash on mount.
|
||||
if (href.includes('#') && route.path === localePath('/')) {
|
||||
e.preventDefault()
|
||||
scrollToAnchor(href.slice(href.indexOf('#')))
|
||||
}
|
||||
@@ -41,7 +43,7 @@ function onLink(e: MouseEvent, href: string) {
|
||||
<div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', color: 'rgba(10,10,10,0.45)', letterSpacing: '0.1em', textTransform: 'uppercase', marginBottom: '18px' }">{{ col[0] }}</div>
|
||||
<div :style="{ display: 'flex', flexDirection: 'column', gap: '12px' }">
|
||||
<NuxtLink
|
||||
v-for="(link, j) in col[1]" :key="j" :to="link[1]"
|
||||
v-for="(link, j) in col[1]" :key="j" :to="loc(link[1])"
|
||||
:style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '14px', color: 'rgba(10,10,10,0.78)' }"
|
||||
@click="onLink($event, link[1])"
|
||||
>{{ link[0] }}</NuxtLink>
|
||||
|
||||
@@ -8,6 +8,7 @@ import { useTheme, useCopy } from '~/composables/useLanding'
|
||||
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
|
||||
// Variant A is the production default the user landed on.
|
||||
const headline = computed(() => copy.value.hero.headlineA)
|
||||
@@ -46,7 +47,7 @@ const brush = {
|
||||
</div>
|
||||
|
||||
<div :style="{ display: 'flex', gap: '12px', marginTop: '40px', flexWrap: 'wrap' }">
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo('/demo')">{{ copy.hero.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo(localePath('/demo'))">{{ copy.hero.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="secondary" size="lg">{{ copy.hero.sub_cta }}</LandingBtn>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -4,12 +4,15 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { APP_URL } from '~/utils/landingTokens'
|
||||
import { useTheme, useCopy, useLang, toggleLang, scrollToAnchor } from '~/composables/useLanding'
|
||||
import { useTheme, useCopy, useLang, useLocalizeHref, scrollToAnchor } from '~/composables/useLanding'
|
||||
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const lang = useLang()
|
||||
const route = useRoute()
|
||||
const loc = useLocalizeHref()
|
||||
const localePath = useLocalePath()
|
||||
const switchLocalePath = useSwitchLocalePath()
|
||||
|
||||
const mobileOpen = ref(false)
|
||||
|
||||
@@ -22,15 +25,16 @@ const items = computed(() => [
|
||||
])
|
||||
|
||||
function onLogo(e: MouseEvent) {
|
||||
// On the homepage, scroll to top in place; from a sub-page let NuxtLink route home.
|
||||
if (route.path === '/') {
|
||||
// On the homepage (current locale), scroll to top in place; from a sub-page
|
||||
// let NuxtLink route home.
|
||||
if (route.path === localePath('/')) {
|
||||
e.preventDefault()
|
||||
window.scrollTo({ top: 0, behavior: 'smooth' })
|
||||
}
|
||||
}
|
||||
|
||||
function onNav(e: MouseEvent, href: string) {
|
||||
if (href.includes('#') && route.path === '/') {
|
||||
if (href.includes('#') && route.path === localePath('/')) {
|
||||
e.preventDefault()
|
||||
scrollToAnchor(href.slice(href.indexOf('#')))
|
||||
}
|
||||
@@ -41,6 +45,24 @@ function onMobileLink(e: MouseEvent, href: string) {
|
||||
onNav(e, href)
|
||||
mobileOpen.value = false
|
||||
}
|
||||
|
||||
// Segmented language switcher: pick a locale (no-op if already active) and
|
||||
// close the mobile menu. The active segment is filled so it's obvious which
|
||||
// language you're on.
|
||||
function switchTo(code: 'en' | 'da') {
|
||||
navigateTo(switchLocalePath(code))
|
||||
mobileOpen.value = false
|
||||
}
|
||||
function segStyle(code: 'en' | 'da') {
|
||||
const active = lang.value === code
|
||||
return {
|
||||
padding: '5px 9px', border: 'none', cursor: 'pointer', borderRadius: '3px',
|
||||
fontFamily: '\'JetBrains Mono\', monospace', fontSize: '11px', letterSpacing: '0.08em',
|
||||
background: active ? t.value.fg : 'transparent',
|
||||
color: active ? t.value.bg : t.value.fgMuted,
|
||||
fontWeight: active ? 700 : 500,
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -55,7 +77,7 @@ function onMobileLink(e: MouseEvent, href: string) {
|
||||
padding: `18px clamp(20px, 5vw, 64px)`,
|
||||
display: 'flex', alignItems: 'center', justifyContent: 'space-between',
|
||||
}">
|
||||
<NuxtLink to="/" :style="{ display: 'flex', alignItems: 'center', gap: '12px', cursor: 'pointer' }" @click="onLogo">
|
||||
<NuxtLink :to="loc('/')" :style="{ display: 'flex', alignItems: 'center', gap: '12px', cursor: 'pointer' }" @click="onLogo">
|
||||
<BrandNodeMark :size="32" :fg="t.fg" :accent="t.signal" />
|
||||
<div :style="{ fontFamily: '\'JetBrains Mono\', monospace', fontWeight: 600, fontSize: '16px', letterSpacing: '-0.02em', color: t.fg }">dezky</div>
|
||||
</NuxtLink>
|
||||
@@ -63,7 +85,7 @@ function onMobileLink(e: MouseEvent, href: string) {
|
||||
<!-- Desktop nav cluster — hidden on mobile via scoped CSS -->
|
||||
<nav class="nav-desktop" :style="{ display: 'flex', alignItems: 'center', gap: '36px' }">
|
||||
<NuxtLink
|
||||
v-for="(it, i) in items" :key="i" :to="it.href"
|
||||
v-for="(it, i) in items" :key="i" :to="loc(it.href)"
|
||||
:style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '14px', color: t.fgMuted, letterSpacing: '-0.005em' }"
|
||||
@click="onNav($event, it.href)"
|
||||
>{{ it.label }}</NuxtLink>
|
||||
@@ -71,17 +93,12 @@ function onMobileLink(e: MouseEvent, href: string) {
|
||||
|
||||
<!-- Desktop CTA cluster — hidden on mobile via scoped CSS -->
|
||||
<div class="nav-desktop" :style="{ display: 'flex', alignItems: 'center', gap: '14px' }">
|
||||
<button
|
||||
:style="{
|
||||
background: 'transparent', border: `1px solid ${t.border}`,
|
||||
color: t.fgMuted, fontSize: '11px', padding: '6px 10px', borderRadius: '4px',
|
||||
fontFamily: '\'JetBrains Mono\', monospace', letterSpacing: '0.06em', textTransform: 'uppercase',
|
||||
whiteSpace: 'nowrap',
|
||||
}"
|
||||
@click="toggleLang()"
|
||||
>{{ lang === 'da' ? 'da · en' : 'en · da' }}</button>
|
||||
<div :style="{ display: 'inline-flex', alignItems: 'center', gap: '2px', border: `1px solid ${t.border}`, borderRadius: '5px', padding: '2px' }">
|
||||
<button :style="segStyle('en')" @click="switchTo('en')">EN</button>
|
||||
<button :style="segStyle('da')" @click="switchTo('da')">DA</button>
|
||||
</div>
|
||||
<a :href="APP_URL" :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '14px', color: t.fgMuted }">{{ copy.nav.login }}</a>
|
||||
<LandingBtn variant="primary" @click="navigateTo('/demo')">{{ copy.nav.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="primary" @click="navigateTo(localePath('/demo'))">{{ copy.nav.cta }} →</LandingBtn>
|
||||
</div>
|
||||
|
||||
<!-- Hamburger — visible only on mobile via scoped CSS -->
|
||||
@@ -141,21 +158,16 @@ function onMobileLink(e: MouseEvent, href: string) {
|
||||
>{{ it.label }}</NuxtLink>
|
||||
|
||||
<div :style="{ display: 'flex', alignItems: 'center', gap: '14px', paddingTop: '24px', flexWrap: 'wrap' }">
|
||||
<button
|
||||
:style="{
|
||||
background: 'transparent', border: `1px solid ${t.border}`,
|
||||
color: t.fgMuted, fontSize: '11px', padding: '6px 10px', borderRadius: '4px',
|
||||
fontFamily: '\'JetBrains Mono\', monospace', letterSpacing: '0.06em', textTransform: 'uppercase',
|
||||
whiteSpace: 'nowrap',
|
||||
}"
|
||||
@click="toggleLang()"
|
||||
>{{ lang === 'da' ? 'da · en' : 'en · da' }}</button>
|
||||
<div :style="{ display: 'inline-flex', alignItems: 'center', gap: '2px', border: `1px solid ${t.border}`, borderRadius: '5px', padding: '2px' }">
|
||||
<button :style="segStyle('en')" @click="switchTo('en')">EN</button>
|
||||
<button :style="segStyle('da')" @click="switchTo('da')">DA</button>
|
||||
</div>
|
||||
<a
|
||||
:href="APP_URL"
|
||||
:style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '14px', color: t.fgMuted }"
|
||||
@click="mobileOpen = false"
|
||||
>{{ copy.nav.login }}</a>
|
||||
<LandingBtn variant="primary" @click="() => { navigateTo('/demo'); mobileOpen = false }">{{ copy.nav.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="primary" @click="() => { navigateTo(localePath('/demo')); mobileOpen = false }">{{ copy.nav.cta }} →</LandingBtn>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -8,12 +8,13 @@ defineProps<{ label: string, title: string, intro?: string }>()
|
||||
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<LandingContainer pad="clamp(56px, 8vw, 120px) clamp(20px, 5vw, 64px) 0">
|
||||
<NuxtLink
|
||||
to="/"
|
||||
:to="localePath('/')"
|
||||
:style="{ fontFamily: '\'JetBrains Mono\', monospace', fontSize: '12px', color: t.fgMuted, letterSpacing: '0.04em', display: 'inline-flex', alignItems: 'center', gap: '8px' }"
|
||||
>← {{ copy.pages.back }}</NuxtLink>
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { useTheme, useCopy } from '~/composables/useLanding'
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -17,7 +18,7 @@ const copy = useCopy()
|
||||
<p :style="{ fontFamily: '\'Inter\', sans-serif', fontSize: '20px', lineHeight: 1.5, maxWidth: '640px', color: t.fgMuted, margin: 0, textWrap: 'pretty' }">{{ copy.pricing.lede }}</p>
|
||||
</div>
|
||||
<div :style="{ marginTop: '36px', display: 'flex', alignItems: 'center', gap: '16px' }">
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo('/demo')">{{ copy.pricing.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="primary" size="lg" @click="navigateTo(localePath('/demo'))">{{ copy.pricing.cta }} →</LandingBtn>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ background: t.surface, border: `1px solid ${t.border}`, borderRadius: '6px', padding: '36px 36px' }">
|
||||
|
||||
@@ -38,7 +38,9 @@ onMounted(() => {
|
||||
const parent = frame.value?.parentElement
|
||||
if (parent && typeof ResizeObserver !== 'undefined') {
|
||||
ro = new ResizeObserver(recompute)
|
||||
ro.observe(parent)
|
||||
// Cast via unknown: a dependency pulls a second DOM lib so HTMLElement and
|
||||
// ResizeObserver's Element param resolve to non-overlapping types here.
|
||||
ro.observe(parent as unknown as Element)
|
||||
}
|
||||
})
|
||||
onBeforeUnmount(() => ro?.disconnect())
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useTheme, useCopy, useDark } from '~/composables/useLanding'
|
||||
|
||||
const t = useTheme()
|
||||
const copy = useCopy()
|
||||
const localePath = useLocalePath()
|
||||
const dark = useDark()
|
||||
|
||||
const sectionBg = computed(() => (dark.value ? '#1A1A17' : '#EFEDE3'))
|
||||
@@ -45,7 +46,7 @@ const partnerCards = computed(() =>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ marginTop: '40px' }">
|
||||
<LandingBtn variant="secondary" size="lg" @click="navigateTo('/partners')">{{ copy.whitelabel.cta }} →</LandingBtn>
|
||||
<LandingBtn variant="secondary" size="lg" @click="navigateTo(localePath('/partners'))">{{ copy.whitelabel.cta }} →</LandingBtn>
|
||||
</div>
|
||||
</div>
|
||||
<div :style="{ display: 'flex', flexDirection: 'column', gap: '16px' }">
|
||||
|
||||
Reference in New Issue
Block a user