feat: add i18n docs link

This commit is contained in:
JiPai
2024-09-05 20:54:15 +08:00
parent 27b83e471e
commit 94587c3472
5 changed files with 22 additions and 10 deletions

View File

@@ -5,6 +5,7 @@ import { useTranslations } from 'next-intl'
export function CallToAction() { export function CallToAction() {
const t = useTranslations('HomePage') const t = useTranslations('HomePage')
const linkT = useTranslations('Link')
return ( return (
<section <section
id="get-started-today" id="get-started-today"
@@ -46,7 +47,7 @@ export function CallToAction() {
{/* @ts-expect-error */} {/* @ts-expect-error */}
<Button className="mt-10 rounded-full" asChild> <Button className="mt-10 rounded-full" asChild>
<Link <Link
href="https://docs.dokploy.com/get-started/installation" href={linkT('docs.install')}
aria-label="Dokploy on GitHub" aria-label="Dokploy on GitHub"
target="_blank" target="_blank"
className="flex flex-row items-center gap-2" className="flex flex-row items-center gap-2"

View File

@@ -7,6 +7,8 @@ import { useTranslations } from 'next-intl'
export function Footer() { export function Footer() {
const t = useTranslations('HomePage') const t = useTranslations('HomePage')
const linkT = useTranslations('Link')
return ( return (
<footer className="bg-black"> <footer className="bg-black">
<Container> <Container>
@@ -26,10 +28,7 @@ export function Footer() {
<NavLink href="/#faqs"> <NavLink href="/#faqs">
{t('navigation.faqs')} {t('navigation.faqs')}
</NavLink> </NavLink>
<NavLink <NavLink href={linkT('docs.intro')} target="_blank">
href="https://docs.dokploy.com/get-started/introduction"
target="_blank"
>
{t('navigation.docs')} {t('navigation.docs')}
</NavLink> </NavLink>
</div> </div>

View File

@@ -69,6 +69,7 @@ function MobileNavIcon({ open }: { open: boolean }) {
function MobileNavigation() { function MobileNavigation() {
const t = useTranslations('HomePage') const t = useTranslations('HomePage')
const linkT = useTranslations('Link')
return ( return (
<Popover> <Popover>
<Popover.Button <Popover.Button
@@ -111,7 +112,7 @@ function MobileNavigation() {
{t('navigation.faqs')} {t('navigation.faqs')}
</MobileNavLink> </MobileNavLink>
<MobileNavLink <MobileNavLink
href="https://docs.dokploy.com/get-started/introduction" href={linkT('docs.intro')}
target="_blank" target="_blank"
> >
{t('navigation.docs')} {t('navigation.docs')}
@@ -125,6 +126,8 @@ function MobileNavigation() {
export function Header() { export function Header() {
const t = useTranslations('HomePage') const t = useTranslations('HomePage')
const linkT = useTranslations('Link')
return ( return (
<header className="bg-background py-10"> <header className="bg-background py-10">
<Container> <Container>
@@ -141,10 +144,7 @@ export function Header() {
<NavLink href="/#faqs"> <NavLink href="/#faqs">
{t('navigation.faqs')} {t('navigation.faqs')}
</NavLink> </NavLink>
<NavLink <NavLink href={linkT('docs.intro')} target="_blank">
href="https://docs.dokploy.com/get-started/introduction"
target="_blank"
>
{t('navigation.docs')} {t('navigation.docs')}
</NavLink> </NavLink>
</div> </div>

View File

@@ -83,5 +83,11 @@
"title": "Oops! Looks like you're lost.", "title": "Oops! Looks like you're lost.",
"des": "Let's get you back", "des": "Let's get you back",
"action": "home" "action": "home"
},
"Link": {
"docs": {
"intro": "https://docs.dokploy.com/get-started/introduction",
"install": "https://docs.dokploy.com/en/docs/core/get-started/introduction"
}
} }
} }

View File

@@ -83,5 +83,11 @@
"title": "糟糕!看起来你迷路了。", "title": "糟糕!看起来你迷路了。",
"des": "让我们送你", "des": "让我们送你",
"action": "回家" "action": "回家"
},
"Link": {
"docs": {
"intro": "https://docs.dokploy.com/cn/docs/core/get-started/introduction",
"install": "https://docs.dokploy.com/cn/docs/core/get-started/introduction"
}
} }
} }