mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-20 04:14:12 +01:00
migrate 404 page
This commit is contained in:
2 files changed
+58
-34
No files matched your search
@@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
import locales from "@blitzkit/i18n/locales.json";
|
||||||
|
import { DiscordLogoIcon, HomeIcon } from "@radix-ui/react-icons";
|
||||||
|
import { Button } from "../components/Button";
|
||||||
|
import { Heading } from "../components/Heading";
|
||||||
|
import { Link } from "../components/Link";
|
||||||
|
import { LinkI18n } from "../components/LinkI18n";
|
||||||
|
import { Text } from "../components/Text";
|
||||||
|
import { discordLink } from "../config/socials";
|
||||||
|
import BaseLayout from "../layouts/BaseLayout.astro";
|
||||||
|
|
||||||
|
// the 404 page is not locale-scoped, so it always renders in the default locale
|
||||||
|
const locale = locales.default;
|
||||||
|
---
|
||||||
|
|
||||||
|
<BaseLayout accent="blue" {locale}>
|
||||||
|
<div class="page">
|
||||||
|
<Heading size="3">404: page not found</Heading>
|
||||||
|
<Text lowContrast>Where would you like to go?</Text>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<LinkI18n {locale} href="/" underline="never">
|
||||||
|
<Button>
|
||||||
|
<HomeIcon />
|
||||||
|
Home
|
||||||
|
</Button>
|
||||||
|
</LinkI18n>
|
||||||
|
|
||||||
|
<Link href={discordLink} underline="never">
|
||||||
|
<Button variant="outline">
|
||||||
|
<DiscordLogoIcon />
|
||||||
|
Discord
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</BaseLayout>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.page {
|
||||||
|
min-height: 100dvh;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: var(--space-5);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: var(--space-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
margin-top: var(--space-4);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
gap: var(--space-3);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
---
|
|
||||||
import { DiscordLogoIcon, HomeIcon } from "@radix-ui/react-icons";
|
|
||||||
import { Button, Flex, Heading, Link, Text } from "@radix-ui/themes";
|
|
||||||
import { LinkI18n } from "../../components/LinkI18n";
|
|
||||||
import { PageWrapper } from "../../components/PageWrapper";
|
|
||||||
import { discordLink } from "../../config/socials";
|
|
||||||
import BaseLayout from "../../layouts/BaseLayout.astro";
|
|
||||||
|
|
||||||
export { getStaticPaths } from "./_index";
|
|
||||||
|
|
||||||
const { locale } = Astro.props;
|
|
||||||
---
|
|
||||||
|
|
||||||
<BaseLayout {locale}>
|
|
||||||
<PageWrapper align="center" justify="center" gap="0">
|
|
||||||
<Heading>404: page not found</Heading>
|
|
||||||
<Text color="gray">Where would you like to go?</Text>
|
|
||||||
|
|
||||||
<Flex mt="4" gap="2">
|
|
||||||
<LinkI18n {locale} href="/">
|
|
||||||
<Button>
|
|
||||||
<HomeIcon />
|
|
||||||
Home
|
|
||||||
</Button>
|
|
||||||
</LinkI18n>
|
|
||||||
<Link href={discordLink}>
|
|
||||||
<Button variant="outline">
|
|
||||||
<DiscordLogoIcon />
|
|
||||||
Discord
|
|
||||||
</Button>
|
|
||||||
</Link>
|
|
||||||
</Flex>
|
|
||||||
</PageWrapper>
|
|
||||||
</BaseLayout>
|
|
||||||
Reference in new issue
Block a user