diff --git a/public/assets/honkai3rd/nav-icons/battlesuits.png b/public/assets/honkai3rd/nav-icons/battlesuits.png new file mode 100644 index 00000000..ee544c51 Binary files /dev/null and b/public/assets/honkai3rd/nav-icons/battlesuits.png differ diff --git a/public/assets/honkai3rd/nav-icons/elfs.png b/public/assets/honkai3rd/nav-icons/elfs.png new file mode 100644 index 00000000..2227723f Binary files /dev/null and b/public/assets/honkai3rd/nav-icons/elfs.png differ diff --git a/public/assets/honkai3rd/nav-icons/stigmata.png b/public/assets/honkai3rd/nav-icons/stigmata.png new file mode 100644 index 00000000..35bae00f Binary files /dev/null and b/public/assets/honkai3rd/nav-icons/stigmata.png differ diff --git a/public/assets/honkai3rd/nav-icons/versions.png b/public/assets/honkai3rd/nav-icons/versions.png new file mode 100644 index 00000000..a6e0c1f8 Binary files /dev/null and b/public/assets/honkai3rd/nav-icons/versions.png differ diff --git a/public/assets/honkai3rd/nav-icons/weapons.png b/public/assets/honkai3rd/nav-icons/weapons.png new file mode 100644 index 00000000..186a7300 Binary files /dev/null and b/public/assets/honkai3rd/nav-icons/weapons.png differ diff --git a/public/locales/en-US/common.json b/public/locales/en-US/common.json index 681491b3..63823da6 100644 --- a/public/locales/en-US/common.json +++ b/public/locales/en-US/common.json @@ -15,6 +15,14 @@ "elfs": "ELFs", "versions": "Versions" }, + "index": { + "honkai-3rd": "Honkai 3rd", + "battlesuits": "Battlesuits", + "stigmata": "Stigmata", + "weapons": "Weapons", + "elfs": "ELFs", + "versions": "Versions" + }, "battlesuits-list": { "heading": "Battlesuits", "filter-by-features": "Filter by Features", diff --git a/src/components/organisms/Honkai3rdNavigator.tsx b/src/components/organisms/Honkai3rdNavigator.tsx index 91f95754..f2e69e87 100644 --- a/src/components/organisms/Honkai3rdNavigator.tsx +++ b/src/components/organisms/Honkai3rdNavigator.tsx @@ -1,8 +1,9 @@ /** @jsxImportSource theme-ui */ -import { NavLink, Heading, Flex } from '@theme-ui/components' +import { NavLink, Heading, Flex, Text } from '@theme-ui/components' import NextLink from 'next/link' import { useRouter } from 'next/router' import { useTranslation } from '../../lib/i18n' +import SquareImageBox from '../atoms/SquareImageBox' const Honkai3rdNavigator = () => { const router = useRouter() @@ -24,31 +25,11 @@ const Honkai3rdNavigator = () => { - - - {t('nav.versions')} - - - - - {t('nav.battlesuits')} - - - - - {t('nav.weapons')} - - - - - {t('nav.stigmata')} - - - - - {t('nav.elfs')} - - + + + + + { as={asPath} passHref > - + {locale === 'en-US' ? ( '🇺🇸' ) : ( @@ -74,3 +61,39 @@ const Honkai3rdNavigator = () => { } export default Honkai3rdNavigator + +interface NavItemProps { + target: 'versions' | 'battlesuits' | 'stigmata' | 'weapons' | 'elfs' +} + +const NavItem = ({ target }: NavItemProps) => { + const { t } = useTranslation() + return ( + + + + + {t(`nav.${target}`)} + + + + ) +} diff --git a/src/pages/honkai3rd/index.tsx b/src/pages/honkai3rd/index.tsx index 3d169327..af8389ee 100644 --- a/src/pages/honkai3rd/index.tsx +++ b/src/pages/honkai3rd/index.tsx @@ -1,25 +1,33 @@ /** @jsxImportSource theme-ui */ -import { Box, Heading, Link } from '@theme-ui/components' +import { Box, Heading, Text, Flex } from '@theme-ui/components' import Image from 'next/image' -import NextLink from 'next/link' import Breadcrumb from '../../components/organisms/Breadcrumb' import Honkai3rdNavigator from '../../components/organisms/Honkai3rdNavigator' import { NextPageContext } from 'next' import { getI18NProps } from '../../server/i18n' - -const updateNotes = [ - ['v5.3', 'https://honkaiimpact3.mihoyo.com/global/en-us/news/17390'], - ['v5.2', 'https://honkaiimpact3.mihoyo.com/global/en-us/news/16625'], -] +import { useTranslation } from '../../lib/i18n' +import PageLink from '../../components/atoms/PageLink' +import SquareImageBox from '../../components/atoms/SquareImageBox' const Honkai3rdIndexPage = () => { + const { t } = useTranslation() + return ( - - Honkai 3rd + + {t('nav.honkai-3rd')} + + + + + + + Honkai 3rd Wallpaper { layout='responsive' /> - - - - Battlesuits - - - - - Stigmata - - - - - Weapons - - - - - Updates - - {updateNotes.map(([version, href]) => { - return ( - - - {version} Update Notes - - - ) - })} - - ) @@ -74,3 +51,27 @@ export async function getStaticProps({ locale }: NextPageContext) { } export default Honkai3rdIndexPage + +interface NavItemProps { + target: 'versions' | 'battlesuits' | 'stigmata' | 'weapons' | 'elfs' +} + +const NavItem = ({ target }: NavItemProps) => { + const { t } = useTranslation() + return ( + + + + + + {t(`nav.${target}`)} + + + + + ) +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index fb565f20..ced0cbe7 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,20 +1,24 @@ /** @jsxImportSource theme-ui */ -import { Box } from '@theme-ui/components' -import Link from 'next/link' +import { Box, Text } from '@theme-ui/components' +import PageLink from '../components/atoms/PageLink' import RootNavigator from '../components/organisms/RootNavigator' const IndexPage = () => { return ( - - + + + + Honkai 3rd + + + + + Genshin (Under Construction) + + + ) }