diff --git a/public/locales/en-US/common.json b/public/locales/en-US/common.json
index 81a275b6..a1ca070b 100644
--- a/public/locales/en-US/common.json
+++ b/public/locales/en-US/common.json
@@ -6,6 +6,8 @@
"battlesuits": "Battlesuits",
"weapons": "Weapons",
"stigmata": "Stigmata",
+ "stigmata-set": "Stigmata (Set)",
+ "stigmata-single": "Stigmata (Single)",
"elfs": "ELFs",
"elysian-realm": "Elysian Realm",
"wip": "WIP",
@@ -44,8 +46,15 @@
},
"stigmata-list": {
"description": "Stigmata list of Honkai 3rd",
- "stigmata": "Stigmata",
- "set-list": "Set List"
+ "stigmata-single": "Stigmata (Single)",
+ "set-list": "Set List",
+ "show-set-list": "Show Stigmata Set List"
+ },
+ "stigmata-set-list": {
+ "description": "Stigmata Set list of Honkai 3rd",
+ "stigmata-set": "Stigmata (Set)",
+ "set-list": "Set List",
+ "show-signle-list": "Show Single Stigmata List"
},
"stigmata-show": {
"stigmata": "Stigmata",
diff --git a/public/locales/ko-KR/common.json b/public/locales/ko-KR/common.json
index c503ba87..e3d37833 100644
--- a/public/locales/ko-KR/common.json
+++ b/public/locales/ko-KR/common.json
@@ -7,6 +7,8 @@
"versions": "업데이트",
"weapons": "무기",
"stigmata": "성흔",
+ "stigmata-set": "성흔 (세트)",
+ "stigmata-single": "성흔 (단일)",
"elfs": "인형",
"wip": "작업중",
"media": "미디어",
@@ -34,8 +36,15 @@
},
"stigmata-list": {
"description": "붕괴 3rd 성흔 목록",
- "stigmata": "성흔",
- "set-list": "세트 일람"
+ "stigmata-single": "성흔 (단일)",
+ "set-list": "세트 일람",
+ "show-set-list": "단일 성흔 목록"
+ },
+ "stigmata-set-list": {
+ "description": "붕괴 3rd 성흔 세트 목록",
+ "stigmata-set": "성흔 (세트)",
+ "set-list": "세트 일람",
+ "show-signle-list": "단일 성흔 목록"
},
"stigmata-show": {
"stigmata": "성흔",
diff --git a/src/components/organisms/Honkai3rdNavigator.tsx b/src/components/organisms/Honkai3rdNavigator.tsx
index e8ff6620..7685163a 100644
--- a/src/components/organisms/Honkai3rdNavigator.tsx
+++ b/src/components/organisms/Honkai3rdNavigator.tsx
@@ -1,16 +1,7 @@
/** @jsxImportSource theme-ui */
import { mdiClose, mdiMenuSwap } from '@mdi/js'
import Icon from '@mdi/react'
-import {
- NavLink,
- Heading,
- Text,
- Box,
- Flex,
- IconButton,
- Switch,
- Label,
-} from '@theme-ui/components'
+import { NavLink, Heading, Text, Box, Flex, IconButton, Switch, Label } from '@theme-ui/components'
import NextLink from 'next/link'
import { useRouter } from 'next/router'
import { useColorMode } from 'theme-ui'
@@ -30,7 +21,7 @@ const Honkai3rdNavigator = ({ close }: Honkai3rdNavigatorProps) => {
return (
{
top: 0,
height: 50,
ml: -2,
- mt: -2,
+ mt: -2
}}
>
-
+
Abyss Lab
-
+
{t('common.honkai-3rd')}
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
{
display: 'flex',
alignItems: 'center',
px: 2,
- mb: 2,
+ mb: 2
}}
>
{locale === 'en-US' ? '🇺🇸 English(US)' : '🇰🇷 한국어'}
-
+
@@ -93,23 +78,23 @@ const Honkai3rdNavigator = ({ close }: Honkai3rdNavigatorProps) => {
display: 'flex',
alignItems: 'center',
justifyContent: 'left',
- mb: 2,
+ mb: 2
}}
>
{
+ onChange={event => {
setColorMode(event.target.checked ? 'dark' : 'default')
}}
sx={{
width: 50,
'input ~ &': {
- backgroundColor: 'muted',
+ backgroundColor: 'muted'
},
'input:checked ~ &': {
- backgroundColor: 'primary',
- },
+ backgroundColor: 'primary'
+ }
}}
/>
@@ -122,28 +107,22 @@ const Honkai3rdNavigator = ({ close }: Honkai3rdNavigatorProps) => {
export default Honkai3rdNavigator
+type NavItemTarget = 'battlesuits' | 'stigmata' | 'weapons' | 'elfs' | 'elysian-realm' | 'media'
interface NavItemProps {
- target:
- | 'versions'
- | 'battlesuits'
- | 'stigmata'
- | 'weapons'
- | 'elfs'
- | 'elysian-realm'
- | 'media'
+ target: NavItemTarget
}
const NavItem = ({ target }: NavItemProps) => {
const { t } = useTranslation()
return (
-
+
@@ -151,7 +130,7 @@ const NavItem = ({ target }: NavItemProps) => {
sx={{
overflow: 'hidden',
textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
+ whiteSpace: 'nowrap'
}}
>
{t(`common.${target}`)}
@@ -171,3 +150,17 @@ function getIconByTarget(target: string) {
return `${assetsBucketBaseUrl}/honkai3rd/nav-icons/${target}.png`
}
}
+
+function getHref(target: NavItemTarget) {
+ switch (target) {
+ case 'battlesuits':
+ case 'weapons':
+ case 'elfs':
+ return `/honkai3rd/v2/${target}`
+ case 'stigmata':
+ return '/honkai3rd/v2/stigmata-sets'
+ case 'elysian-realm':
+ return '/honkai3rd/v2/er'
+ }
+ return `/honkai3rd/${target}`
+}
diff --git a/src/components/v2/BattlesuitCatalogItemCard.tsx b/src/components/v2/BattlesuitCatalogItemCard.tsx
index 0f6025c2..ff675025 100644
--- a/src/components/v2/BattlesuitCatalogItemCard.tsx
+++ b/src/components/v2/BattlesuitCatalogItemCard.tsx
@@ -11,12 +11,7 @@ const BattlesuitCatalogItemCard = ({ battlesuit, label = false }: BattlesuitCata
return (
diff --git a/src/components/v2/StigmaIcon.tsx b/src/components/v2/StigmaIcon.tsx
index c0b17baf..145032a4 100644
--- a/src/components/v2/StigmaIcon.tsx
+++ b/src/components/v2/StigmaIcon.tsx
@@ -11,12 +11,12 @@ const starSize = 16
const StigmaIcon = ({ icon: fileName, rarity }: StigmaIconProps) => {
return (
-
+
{
+ const { t } = useTranslation()
return (
-
- {battlesuit.fullName}
+
+ {
+ return getTagTypeLabel(tag)
+ })
+ .join(', ')}`}
+ canonicalHref={`/honkai3rd/battlesuits/${battlesuit.id}`}
+ />
+
+ {battlesuit.fullName}
-
+
-
-
-
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
- {getCharacterTypeLabel(battlesuit.character)}
-
+
+ {getCharacterTypeLabel(battlesuit.character)}
+
-
-
- {getAttributeLabel(battlesuit.attributeType)}
-
+
+
+ {getAttributeLabel(battlesuit.attributeType)}
+
-
- {getWeaponTypeLabel(battlesuit.weapon)}
+
+ {getWeaponTypeLabel(battlesuit.weapon)}
+
-
-
- {battlesuit.tags.map(tag => {
- return (
-
-
- {getTagTypeLabel(tag)}
-
- )
- })}
-
-
-
- Skills
- {battlesuit.skills.sort(sortBattlesuitSkill).map(skill => {
- return (
-
-
-
-
-
- {skill.name}
-
- {skill.tags.length > 0 && (
-
- {skill.tags.map((tag, index) => {
- return
- })}
-
- )}
-
-
- {getSkillTypeLabel(skill.skillType)}
-
-
- {formatSkillInfo(skill)}
-
-
- {skill.subSkills.map(subSkill => {
+
+ {battlesuit.tags.map(tag => {
return (
-
-
-
-
-
- {subSkill.name}
-
-
- {subSkill.unlockStar.localeCompare(battlesuit.initialStar) > 0 && (
-
-
-
- )}
-
- {subSkill.tags.length > 0 && (
-
- {subSkill.tags.map((tag, index) => {
- return
- })}
-
- )}
-
-
-
-
- {formatSubSkillInfo(subSkill)}
-
-
+
+
+ {getTagTypeLabel(tag)}
+
)
})}
-
- )
- })}
- {/* {JSON.stringify(battlesuit, null, 2)} */}
-
+
+
+
+ Skills
+ {battlesuit.skills.sort(sortBattlesuitSkill).map(skill => {
+ return (
+
+
+
+
+
+ {skill.name}
+
+ {skill.tags.length > 0 && (
+
+ {skill.tags.map((tag, index) => {
+ return
+ })}
+
+ )}
+
+
+ {getSkillTypeLabel(skill.skillType)}
+
+
+ {formatSkillInfo(skill)}
+
+
+ {skill.subSkills.map(subSkill => {
+ return (
+
+
+
+
+
+ {subSkill.name}
+
+
+ {subSkill.unlockStar.localeCompare(battlesuit.initialStar) > 0 && (
+
+
+
+ )}
+
+ {subSkill.tags.length > 0 && (
+
+ {subSkill.tags.map((tag, index) => {
+ return
+ })}
+
+ )}
+
+
+
+
+ {formatSubSkillInfo(subSkill)}
+
+
+ )
+ })}
+
+ )
+ })}
+ {/* {JSON.stringify(battlesuit, null, 2)} */}
+
+
)
}
@@ -150,7 +168,7 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
const battlesuit = loadBattlesuitData(params.battlesuitId)
return {
- props: { battlesuit }
+ props: { battlesuit, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/battlesuits/index.tsx b/src/pages/honkai3rd/v2/battlesuits/index.tsx
index fe9bf970..42f4cbf7 100644
--- a/src/pages/honkai3rd/v2/battlesuits/index.tsx
+++ b/src/pages/honkai3rd/v2/battlesuits/index.tsx
@@ -5,27 +5,49 @@ import { Flex, Link } from 'theme-ui'
import { loadBattlesuitCatalog } from '../../../../lib/v2/server/loadData'
import { BattlesuitCatalogItem } from '../../../../lib/v2/data/types'
import BattlesuitCatalogItemCard from '../../../../components/v2/BattlesuitCatalogItemCard'
+import Head from '../../../../components/atoms/Head'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import { useTranslation } from 'next-i18next'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
+import { getI18NProps } from '../../../../server/i18n'
interface BattlesuitListPageProps {
battlesuitCatalog: BattlesuitCatalogItem[]
}
const BattlesuitListPage = ({ battlesuitCatalog }: BattlesuitListPageProps) => {
+ const { t } = useTranslation()
return (
-
- Battlesuits
-
- {battlesuitCatalog.map(battlesuit => {
- return (
-
-
-
-
-
- )
- })}
-
-
+
+
+
+
+ {t('battlesuits-list.heading')}
+
+ {battlesuitCatalog.map(battlesuit => {
+ return (
+
+
+
+
+
+ )
+ })}
+
+
+
)
}
@@ -35,6 +57,6 @@ export async function getStaticProps({ locale }: NextPageContext) {
const battlesuitCatalog = loadBattlesuitCatalog()
return {
- props: { battlesuitCatalog }
+ props: { battlesuitCatalog, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/er/battlesuits/[battlesuitId].tsx b/src/pages/honkai3rd/v2/er/battlesuits/[battlesuitId].tsx
index 3d76cc50..78f2a8e8 100644
--- a/src/pages/honkai3rd/v2/er/battlesuits/[battlesuitId].tsx
+++ b/src/pages/honkai3rd/v2/er/battlesuits/[battlesuitId].tsx
@@ -1,10 +1,16 @@
import { NextPageContext } from 'next'
-import { Box, Card, Flex, Heading, Image } from 'theme-ui'
+import { Box, Card, Flex, Heading, Image, Link } from 'theme-ui'
import AvatarFigureImage from '../../../../../components/v2/AvatarFigureImage'
import { loadBattlesuitData, loadErBattlesuit, loadErBattlesuitCatalog } from '../../../../../lib/v2/server/loadData'
import { Battlesuit, ErBattlesuit, ErSignet } from '../../../../../lib/v2/data/types'
import { Fragment, useMemo } from 'react'
import { assetsBucketBaseUrl } from '../../../../../lib/consts'
+import BattlesuitCatalogItemCard from '../../../../../components/v2/BattlesuitCatalogItemCard'
+import Honkai3rdLayout from '../../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import Breadcrumb from '../../../../../components/organisms/Breadcrumb'
+import { getI18NProps } from '../../../../../server/i18n'
interface BattlesuitShowPageProps {
battlesuit: Battlesuit
@@ -12,6 +18,8 @@ interface BattlesuitShowPageProps {
}
const BattlesuitShowPage = ({ battlesuit, erBattlesuit }: BattlesuitShowPageProps) => {
+ const { t } = useTranslation()
+
const signetSets = useMemo(() => {
const signetSetMap = erBattlesuit.signets
.slice()
@@ -36,57 +44,89 @@ const BattlesuitShowPage = ({ battlesuit, erBattlesuit }: BattlesuitShowPageProp
}, [erBattlesuit.signets])
return (
-
- {battlesuit.fullName}
+
+
-
+
+
- ER Adjustments
+ {battlesuit.fullName}
-
- {erBattlesuit.abilities.map(ability => {
+
+
+
+
+
+
+
+
+ ER Adjustments
+
+
+ {erBattlesuit.abilities.map(ability => {
+ return (
+
+
+
+ {ability.name}
+
+
+
+ {ability.desc}
+
+
+ )
+ })}
+
+
+ Exclusive Signets
+
+ {signetSets.map((set, index) => {
return (
-
-
-
- {ability.name}
-
-
- {ability.desc}
-
+
+ {set.map(signet => {
+ return (
+
+
+
+
+ {signet.name}
+
+
+
+ {signet.desc}
+
+
+ )
+ })}
+
)
})}
-
-
- Exclusive Signets
-
- {signetSets.map((set, index) => {
- return (
-
- {set.map(signet => {
- return (
-
-
-
-
- {signet.name}
-
-
-
- {signet.desc}
-
-
- )
- })}
-
- )
- })}
-
+
+
)
}
@@ -97,7 +137,7 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
const erBattlesuit = loadErBattlesuit(params.battlesuitId)
return {
- props: { battlesuit, erBattlesuit }
+ props: { battlesuit, erBattlesuit, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/er/index.tsx b/src/pages/honkai3rd/v2/er/index.tsx
index 070504dd..fac6aed2 100644
--- a/src/pages/honkai3rd/v2/er/index.tsx
+++ b/src/pages/honkai3rd/v2/er/index.tsx
@@ -15,6 +15,11 @@ import SquareImage from '../../../../components/v2/SquareImage'
import { signetGroups } from '../../../../lib/v2/data/er'
import BattlesuitSmallIcon from '../../../../components/v2/BattlesuitSmallIcon'
import MaterialIcon from '../../../../components/v2/MaterialIcon'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../components/atoms/Head'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
+import { useTranslation } from 'next-i18next'
+import { getI18NProps } from '../../../../server/i18n'
interface ErPageProps {
erBattlesuitCatalog: ErBattlesuitCatalogItem[]
@@ -24,6 +29,8 @@ interface ErPageProps {
}
const ErPage = ({ erBattlesuitCatalog, battlesuitCatalog, erSupports, erSigils }: ErPageProps) => {
+ const { t } = useTranslation()
+
const battlesuitCatalogMap = useMemo(() => {
return battlesuitCatalog.reduce((map, item) => {
map.set(item.id, item)
@@ -32,77 +39,97 @@ const ErPage = ({ erBattlesuitCatalog, battlesuitCatalog, erSupports, erSigils }
}, [battlesuitCatalog])
return (
-
- Elysian Realm
- Signets
-
- {signetGroups.map(signetGroup => {
- return (
-
-
-
-
- {signetGroup.name}
-
-
-
- )
- })}
-
+
+
- Battlesuits
-
- {erBattlesuitCatalog.map(erBattlesuit => {
- const battlesuit = battlesuitCatalogMap.get(erBattlesuit.battlesuit)!
- return (
-
-
-
+
+
+ Elysian Realm
+
+ Signets
+
+ {signetGroups.map(signetGroup => {
+ return (
+
+
+
+
+ {signetGroup.name}
+
+
-
- )
- })}
-
+ )
+ })}
+
- Supports
+ Battlesuits
+
+ {erBattlesuitCatalog.map(erBattlesuit => {
+ const battlesuit = battlesuitCatalogMap.get(erBattlesuit.battlesuit)!
+ return (
+
+
+
+
+
+ )
+ })}
+
-
- {erSupports.map(support => {
- const battlesuit = battlesuitCatalogMap.get(support)!
- return (
-
-
-
-
-
- {battlesuit.fullName}
+ Supports
+
+
+ {erSupports.map(support => {
+ const battlesuit = battlesuitCatalogMap.get(support)!
+ return (
+
+
+
+
+
+ {battlesuit.fullName}
+
-
- {/* */}
-
-
- )
- })}
-
+ {/* */}
+
+
+ )
+ })}
+
- Sigils
+ Sigils
-
- {erSigils.map(sigil => {
- return (
-
-
-
-
-
- )
- })}
-
-
+
+ {erSigils.map(sigil => {
+ return (
+
+
+
+
+
+ )
+ })}
+
+
+
)
}
@@ -123,6 +150,6 @@ export async function getStaticProps({ locale }: NextPageContext) {
})
return {
- props: { erBattlesuitCatalog, battlesuitCatalog, erSupports, erSigils }
+ props: { erBattlesuitCatalog, battlesuitCatalog, erSupports, erSigils, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/er/sigils.tsx b/src/pages/honkai3rd/v2/er/sigils.tsx
index 766dfe9f..6360db63 100644
--- a/src/pages/honkai3rd/v2/er/sigils.tsx
+++ b/src/pages/honkai3rd/v2/er/sigils.tsx
@@ -1,44 +1,75 @@
import { NextPageContext } from 'next'
+import { useTranslation } from 'next-i18next'
import { Box, Card, Flex, Heading } from 'theme-ui'
+import Head from '../../../../components/atoms/Head'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
import MaterialIcon from '../../../../components/v2/MaterialIcon'
import { ErSigil } from '../../../../lib/v2/data/types'
import { loadErSigils } from '../../../../lib/v2/server/loadData'
+import { getI18NProps } from '../../../../server/i18n'
interface SigilsPageProps {
erSigils: ErSigil[]
}
const SigilsPage = ({ erSigils }: SigilsPageProps) => {
- return (
-
- ER Sigils
+ const { t } = useTranslation()
-
- {erSigils.map(sigil => {
- return (
-
-
-
-
-
-
- {sigil.name}
-
- {sigil.desc}
-
-
- )
- })}
-
-
+ return (
+
+
+
+
+
+
+ ER Sigils
+
+
+ {erSigils.map(sigil => {
+ return (
+
+
+
+
+
+
+ {sigil.name}
+
+ {sigil.desc}
+
+
+ )
+ })}
+
+
+
)
}
@@ -48,6 +79,6 @@ export async function getStaticProps({ locale }: NextPageContext) {
const erSigils = loadErSigils()
return {
- props: { erSigils }
+ props: { erSigils, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/er/signets/[groupId].tsx b/src/pages/honkai3rd/v2/er/signets/[groupId].tsx
index f3207d40..df509832 100644
--- a/src/pages/honkai3rd/v2/er/signets/[groupId].tsx
+++ b/src/pages/honkai3rd/v2/er/signets/[groupId].tsx
@@ -7,6 +7,11 @@ import { assetsBucketBaseUrl } from '../../../../../lib/consts'
import { signetGroups } from '../../../../../lib/v2/data/er'
import SquareImage from '../../../../../components/v2/SquareImage'
import { getErSignetTypeLabel } from '../../../../../lib/v2/data/text'
+import Honkai3rdLayout from '../../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import Breadcrumb from '../../../../../components/organisms/Breadcrumb'
+import { getI18NProps } from '../../../../../server/i18n'
interface BattlesuitShowPageProps {
group: ErSignetGroup
@@ -14,6 +19,8 @@ interface BattlesuitShowPageProps {
}
const BattlesuitShowPage = ({ signets, group }: BattlesuitShowPageProps) => {
+ const { t } = useTranslation()
+
const signetSets = useMemo(() => {
const signetSetMap = signets.reduce
+
)
}
@@ -58,6 +88,6 @@ export async function getStaticProps({ locale }: NextPageContext) {
const erSupports = loadErSupports()
return {
- props: { battlesuitCatalog, erSupports }
+ props: { battlesuitCatalog, erSupports, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/stigmata-sets/[stigmataSetId].tsx b/src/pages/honkai3rd/v2/stigmata-sets/[stigmataSetId].tsx
index 77ab7860..151dbd82 100644
--- a/src/pages/honkai3rd/v2/stigmata-sets/[stigmataSetId].tsx
+++ b/src/pages/honkai3rd/v2/stigmata-sets/[stigmataSetId].tsx
@@ -7,6 +7,11 @@ import { RootStigma, StigmataSet } from '../../../../lib/v2/data/types'
import { Fragment } from 'react'
import StigmaIcon from '../../../../components/v2/StigmaIcon'
import StigmaFigureImage from '../../../../components/v2/StigmaFigureImage'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import { getI18NProps } from '../../../../server/i18n'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
interface StigmataSetShowPage {
stigmataSet: StigmataSet
@@ -14,137 +19,167 @@ interface StigmataSetShowPage {
}
const StigmataSetShowPage = ({ stigmataSet, stigmata }: StigmataSetShowPage) => {
+ const { t } = useTranslation()
+ const rarity = stigmata[0].stigmata[0].maxRarity
return (
-
- {stigmataSet.name}
-
- {stigmata.map(rootStigma => {
- const stigma = rootStigma.stigmata[rootStigma.stigmata.length - 1]
- return (
- <>
-
-
-
-
-
-
-
- {stigma.name}
-
-
+
+
-
-
- HP : {Math.floor(stigma.hpBase + stigma.hpAdd * (stigma.maxLv - 1))} / ATK :{' '}
- {Math.floor(stigma.attackBase + stigma.attackAdd * (stigma.maxLv - 1))} / DEF :{' '}
- {Math.floor(stigma.defenceBase + stigma.defenceAdd * (stigma.maxLv - 1))} / CRT :{' '}
- {Math.floor(stigma.criticalBase + stigma.criticalAdd * (stigma.maxLv - 1))} (at Max Lv{' '}
- {stigma.maxLv})
-
-
- {stigma.skills.map(skill => {
- return (
-
-
-
+
+
+ {stigmataSet.name}
+
+ {stigmata.map(rootStigma => {
+ const stigma = rootStigma.stigmata[rootStigma.stigmata.length - 1]
+ return (
+ <>
+
+
+
+
+
+
+
+ {stigma.name}
+
+
+
+
+
+ HP : {Math.floor(stigma.hpBase + stigma.hpAdd * (stigma.maxLv - 1))} / ATK :{' '}
+ {Math.floor(stigma.attackBase + stigma.attackAdd * (stigma.maxLv - 1))} / DEF :{' '}
+ {Math.floor(stigma.defenceBase + stigma.defenceAdd * (stigma.maxLv - 1))} / CRT :{' '}
+ {Math.floor(stigma.criticalBase + stigma.criticalAdd * (stigma.maxLv - 1))} (at Max Lv{' '}
+ {stigma.maxLv})
+
+
+ {stigma.skills.map(skill => {
+ return (
+
+
+
+ {skill.name}
+
+
+
- {skill.name}
-
-
-
-
- {formatSubSkillInfo({
- info: skill.info,
- maxLv: stigma.maxLv,
- paramBase1: skill.param1,
- paramBase2: skill.param2,
- paramBase3: skill.param3,
- paramAdd1: skill.param1Add,
- paramAdd2: skill.param2Add,
- paramAdd3: skill.param3Add
- })}
-
-
-
- )
- })}
-
-
- >
- )
- })}
-
+
+ {formatSubSkillInfo({
+ info: skill.info,
+ maxLv: stigma.maxLv,
+ paramBase1: skill.param1,
+ paramBase2: skill.param2,
+ paramBase3: skill.param3,
+ paramAdd1: skill.param1Add,
+ paramAdd2: skill.param2Add,
+ paramAdd3: skill.param3Add
+ })}
+
+
+
+ )
+ })}
+
+
+ >
+ )
+ })}
+
-
- {stigmataSet.skills.map((skill, index) => {
- return (
-
-
-
+ {stigmataSet.skills.map((skill, index) => {
+ return (
+
+
+
+ {skill.name} {index + 2}세트
+
+
+
- {skill.name} {index + 2}세트
-
-
-
-
- {formatSubSkillInfo({
- info: skill.info,
- maxLv: 1,
- paramBase1: skill.param1,
- paramBase2: skill.param2,
- paramBase3: skill.param3,
- paramAdd1: skill.param1Add,
- paramAdd2: skill.param2Add,
- paramAdd3: skill.param3Add
- })}
-
-
-
- )
- })}
-
+
+ {formatSubSkillInfo({
+ info: skill.info,
+ maxLv: 1,
+ paramBase1: skill.param1,
+ paramBase2: skill.param2,
+ paramBase3: skill.param3,
+ paramAdd1: skill.param1Add,
+ paramAdd2: skill.param2Add,
+ paramAdd3: skill.param3Add
+ })}
+
+
+
+ )
+ })}
+
- Images
-
- {stigmata.map(rootStigma => {
- const stigma = rootStigma.stigmata[rootStigma.stigmata.length - 1]
- return
- })}
+ Images
+
+ {stigmata.map(rootStigma => {
+ const stigma = rootStigma.stigmata[rootStigma.stigmata.length - 1]
+ return
+ })}
+
+
+ {/* {JSON.stringify(stigmataSet, null, 2)} */}
-
- {/* {JSON.stringify(stigmataSet, null, 2)} */}
-
+
)
}
@@ -159,7 +194,8 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
return {
props: {
stigmataSet,
- stigmata
+ stigmata,
+ ...(await getI18NProps(locale))
}
}
}
diff --git a/src/pages/honkai3rd/v2/stigmata-sets/index.tsx b/src/pages/honkai3rd/v2/stigmata-sets/index.tsx
index a9dab410..c7f8d5b0 100644
--- a/src/pages/honkai3rd/v2/stigmata-sets/index.tsx
+++ b/src/pages/honkai3rd/v2/stigmata-sets/index.tsx
@@ -1,69 +1,93 @@
/** @jsxImportSource theme-ui */
-import { Box, Card } from '@theme-ui/components'
+import { Box, Card, Heading } from '@theme-ui/components'
import { NextPageContext } from 'next'
import { Flex, Link } from 'theme-ui'
import { StigmataSetCatalogItem } from '../../../../lib/v2/data/types'
import { loadStigmataSetCatalog } from '../../../../lib/v2/server/loadData'
import StigmaIcon from '../../../../components/v2/StigmaIcon'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import { getI18NProps } from '../../../../server/i18n'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
interface StigmataSetListPageProps {
stigmataSetCatalog: StigmataSetCatalogItem[]
}
const StigmataSetListPage = ({ stigmataSetCatalog }: StigmataSetListPageProps) => {
+ const { t } = useTranslation()
return (
-
- Stigmata (Set)
-
- {stigmataSetCatalog
- .sort((a, b) => {
- const aId = getId(a.id)
- const bId = getId(b.id)
- return bId - aId
+
+
+
+
+ {t('stigmata-set-list.stigmata-set')}
- function getId(id: string): number {
- if (id === '1290') {
- return 129.5
+
+ {t('stigmata-set-list.show-signle-list')}
+
+
+
+ {stigmataSetCatalog
+ .sort((a, b) => {
+ const aId = getId(a.id)
+ const bId = getId(b.id)
+ return bId - aId
+
+ function getId(id: string): number {
+ if (id === '1290') {
+ return 129.5
+ }
+ if (id === '132') {
+ return 0.2
+ }
+ if (id === '120') {
+ return 0.1
+ }
+ return parseInt(id)
}
- if (id === '132') {
- return 0.2
- }
- if (id === '120') {
- return 0.1
- }
- return parseInt(id)
- }
- })
- .map(stigmataSet => {
- return (
-
-
-
-
- {stigmataSet.stigmataList.map(stigma => {
- return
- })}
-
-
- {stigmataSet.name}
-
- {/* {stigma.id} */}
-
-
-
- )
- })}
-
-
+ })
+ .map(stigmataSet => {
+ return (
+
+
+
+
+ {stigmataSet.stigmataList.map(stigma => {
+ return
+ })}
+
+
+ {stigmataSet.name}
+
+ {/* {stigma.id} */}
+
+
+
+ )
+ })}
+
+
+
)
}
@@ -73,6 +97,6 @@ export async function getStaticProps({ locale }: NextPageContext) {
const stigmataSetCatalog = loadStigmataSetCatalog()
return {
- props: { stigmataSetCatalog }
+ props: { stigmataSetCatalog, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/stigmata/[stigmaId].tsx b/src/pages/honkai3rd/v2/stigmata/[stigmaId].tsx
index 83cf088a..07a7e1b1 100644
--- a/src/pages/honkai3rd/v2/stigmata/[stigmaId].tsx
+++ b/src/pages/honkai3rd/v2/stigmata/[stigmaId].tsx
@@ -9,6 +9,11 @@ import { getStigmaTypeLabel } from '../../../../lib/v2/data/text'
import StigmaTypeIcon from '../../../../components/v2/StigmaTypeIcon'
import StigmaIcon from '../../../../components/v2/StigmaIcon'
import StigmaFigureImage from '../../../../components/v2/StigmaFigureImage'
+import { getI18NProps } from '../../../../server/i18n'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
interface StigmaShowPageProps {
rootStigma: RootStigma
@@ -16,109 +21,135 @@ interface StigmaShowPageProps {
}
const StigmaShowPage = ({ rootStigma, stigmataSetCatalogItem }: StigmaShowPageProps) => {
+ const { t } = useTranslation()
+
const stigma = rootStigma.stigmata[rootStigma.stigmata.length - 1]
+
+ const atk = Math.floor(stigma.attackBase + stigma.attackAdd * (stigma.maxLv - 1))
+ const hp = Math.floor(stigma.hpBase + stigma.hpAdd * (stigma.maxLv - 1))
+ const def = Math.floor(stigma.defenceBase + stigma.defenceAdd * (stigma.maxLv - 1))
+ const crt = Math.floor(stigma.criticalBase + stigma.criticalAdd * (stigma.maxLv - 1))
+
return (
-
- {stigma.name}
+
+
+
+
-
-
-
-
-
-
+ {stigma.name}
-
-
-
-
-
- {replaceNewLine(stigma.description)}
-
-
- {getStigmaTypeLabel(stigma.type)}
-
-
- HP : {Math.floor(stigma.hpBase + stigma.hpAdd * (stigma.maxLv - 1))} / ATK :{' '}
- {Math.floor(stigma.attackBase + stigma.attackAdd * (stigma.maxLv - 1))} / DEF :{' '}
- {Math.floor(stigma.defenceBase + stigma.defenceAdd * (stigma.maxLv - 1))} / CRT :{' '}
- {Math.floor(stigma.criticalBase + stigma.criticalAdd * (stigma.maxLv - 1))} (at Max Lv {stigma.maxLv})
+
+
+
+
+
-
- Skills
-
- {stigma.skills.map(skill => {
- return (
-
-
-
- {skill.name}
-
-
-
-
- {formatSubSkillInfo({
- info: skill.info,
- maxLv: stigma.maxLv,
- paramBase1: skill.param1,
- paramBase2: skill.param2,
- paramBase3: skill.param3,
- paramAdd1: skill.param1Add,
- paramAdd2: skill.param2Add,
- paramAdd3: skill.param3Add
- })}
-
-
-
- )
- })}
-
+
+
+
- {stigmataSetCatalogItem != null && (
- <>
- Set
-
-
-
-
- {stigmataSetCatalogItem.stigmataList.map(stigma => {
- return
- })}
-
+
+ {replaceNewLine(stigma.description)}
+
+
+ {getStigmaTypeLabel(stigma.type)}
+
+
+ HP : {hp} / ATK : {atk} / DEF : {def} / CRT : {crt} (at Max Lv {stigma.maxLv})
+
+
+
+ Skills
+
+ {stigma.skills.map(skill => {
+ return (
+
+
+
+ {skill.name}
+
+
- {stigmataSetCatalogItem.name}
+
+ {formatSubSkillInfo({
+ info: skill.info,
+ maxLv: stigma.maxLv,
+ paramBase1: skill.param1,
+ paramBase2: skill.param2,
+ paramBase3: skill.param3,
+ paramAdd1: skill.param1Add,
+ paramAdd2: skill.param2Add,
+ paramAdd3: skill.param3Add
+ })}
+
- {/* {stigma.id} */}
-
-
-
- >
- )}
- {/* {JSON.stringify(weapon, null, 2)} */}
-
+
+ )
+ })}
+
+
+ {stigmataSetCatalogItem != null && (
+ <>
+ Set
+
+
+
+
+ {stigmataSetCatalogItem.stigmataList.map(stigma => {
+ return
+ })}
+
+
+ {stigmataSetCatalogItem.name}
+
+ {/* {stigma.id} */}
+
+
+
+ >
+ )}
+ {/* {JSON.stringify(weapon, null, 2)} */}
+
+
)
}
@@ -148,7 +179,7 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
}
return {
- props: { rootStigma, stigmataSetCatalogItem }
+ props: { rootStigma, stigmataSetCatalogItem, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/stigmata/index.tsx b/src/pages/honkai3rd/v2/stigmata/index.tsx
index 44b0603a..3ae1f349 100644
--- a/src/pages/honkai3rd/v2/stigmata/index.tsx
+++ b/src/pages/honkai3rd/v2/stigmata/index.tsx
@@ -1,11 +1,13 @@
/** @jsxImportSource theme-ui */
-import { Box, Card } from '@theme-ui/components'
+import { Box, Card, Heading } from '@theme-ui/components'
import { NextPageContext } from 'next'
import { Flex, Link } from 'theme-ui'
import { StigmataCatalogItem } from '../../../../lib/v2/data/types'
import { loadStigmataCatalog } from '../../../../lib/v2/server/loadData'
import StigmaIcon from '../../../../components/v2/StigmaIcon'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import { getI18NProps } from '../../../../server/i18n'
interface StigmataListPageProps {
stigmataCatalog: StigmataCatalogItem[]
@@ -13,40 +15,43 @@ interface StigmataListPageProps {
const StigmataListPage = ({ stigmataCatalog }: StigmataListPageProps) => {
return (
-
- Stigmata (Single)
-
- {stigmataCatalog
- .filter(filterStigmata)
- .sort(sortStigmata)
- .map(stigma => {
- return (
-
-
-
-
-
-
-
- {stigma.name}
-
- {/* {stigma.id} */}
-
-
-
- )
- })}
-
-
+
+
+ Stigmata (Single)
+
+
+ {stigmataCatalog
+ .filter(filterStigmata)
+ .sort(sortStigmata)
+ .map(stigma => {
+ return (
+
+
+
+
+
+
+
+ {stigma.name}
+
+ {/* {stigma.id} */}
+
+
+
+ )
+ })}
+
+
+
)
}
@@ -56,7 +61,7 @@ export async function getStaticProps({ locale }: NextPageContext) {
const stigmataCatalog = loadStigmataCatalog()
return {
- props: { stigmataCatalog }
+ props: { stigmataCatalog, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/weapons/[weaponId].tsx b/src/pages/honkai3rd/v2/weapons/[weaponId].tsx
index a6721620..b9683a1e 100644
--- a/src/pages/honkai3rd/v2/weapons/[weaponId].tsx
+++ b/src/pages/honkai3rd/v2/weapons/[weaponId].tsx
@@ -8,77 +8,104 @@ import { Fragment } from 'react'
import { getWeaponTypeLabel } from '../../../../lib/v2/data/text'
import WeaponTypeIcon from '../../../../components/v2/WeaponTypeIcon'
import WeaponIcon from '../../../../components/v2/WeaponIcon'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import Head from '../../../../components/atoms/Head'
+import { useTranslation } from 'next-i18next'
+import { getI18NProps } from '../../../../server/i18n'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
interface WeaponShowPageProps {
rootWeapon: RootWeaponData
}
const WeaponShowPage = ({ rootWeapon }: WeaponShowPageProps) => {
+ const { t } = useTranslation()
const weapon = rootWeapon.weapons[rootWeapon.weapons.length - 1]
+
+ const weaponTypeLabel = getWeaponTypeLabel(weapon.type)
+ const atk = Math.floor(weapon.attackBase + weapon.attackAdd * (weapon.maxLv - 1))
+ const crt = Math.floor(weapon.criticalBase + weapon.criticalAdd * (weapon.maxLv - 1))
+
return (
-
- {weapon.name}
+
+
+
+
-
-
-
+ {weapon.name}
-
- {replaceNewLine(weapon.description)}
-
-
- {getWeaponTypeLabel(weapon.type)}
-
-
- ATK : {Math.floor(weapon.attackBase + weapon.attackAdd * (weapon.maxLv - 1))} / CRT :{' '}
- {Math.floor(weapon.criticalBase + weapon.criticalAdd * (weapon.maxLv - 1))} (at Max Lv {weapon.maxLv})
+
+
-
- Skills
-
- {weapon.skills.map(skill => {
- return (
-
-
-
+ {replaceNewLine(weapon.description)}
+
+
+ {getWeaponTypeLabel(weapon.type)}
+
+
+ ATK : {atk} / CRT : {crt} (at Max Lv {weapon.maxLv})
+
+
+
+ Skills
+
+ {weapon.skills.map(skill => {
+ return (
+
+
+
+ {skill.name}
+
+
+
- {skill.name}
-
-
-
-
- {formatSubSkillInfo({
- info: skill.info,
- maxLv: weapon.maxLv,
- paramBase1: skill.param1,
- paramBase2: skill.param2,
- paramBase3: skill.param3,
- paramAdd1: skill.param1Add,
- paramAdd2: skill.param2Add,
- paramAdd3: skill.param3Add
- })}
-
-
-
- )
- })}
-
- {/* {JSON.stringify(weapon, null, 2)} */}
-
+
+ {formatSubSkillInfo({
+ info: skill.info,
+ maxLv: weapon.maxLv,
+ paramBase1: skill.param1,
+ paramBase2: skill.param2,
+ paramBase3: skill.param3,
+ paramAdd1: skill.param1Add,
+ paramAdd2: skill.param2Add,
+ paramAdd3: skill.param3Add
+ })}
+
+
+
+ )
+ })}
+
+ {/*
{JSON.stringify(weapon, null, 2)} */}
+
+
)
}
@@ -88,7 +115,7 @@ export async function getStaticProps({ locale, params }: NextPageContext & { par
const rootWeapon = loadWeaponData(params.weaponId)
return {
- props: { rootWeapon }
+ props: { rootWeapon, ...(await getI18NProps(locale)) }
}
}
diff --git a/src/pages/honkai3rd/v2/weapons/index.tsx b/src/pages/honkai3rd/v2/weapons/index.tsx
index c1dcf1fc..6fb926c9 100644
--- a/src/pages/honkai3rd/v2/weapons/index.tsx
+++ b/src/pages/honkai3rd/v2/weapons/index.tsx
@@ -1,51 +1,70 @@
/** @jsxImportSource theme-ui */
import { Box, Card } from '@theme-ui/components'
import { NextPageContext } from 'next'
-import { Flex, Link } from 'theme-ui'
+import { Flex, Heading, Link } from 'theme-ui'
import { loadWeaponCatalog } from '../../../../lib/v2/server/loadData'
import { WeaponCatalogItem } from '../../../../lib/v2/data/types'
import WeaponIcon from '../../../../components/v2/WeaponIcon'
+import Head from '../../../../components/atoms/Head'
+import Honkai3rdLayout from '../../../../components/layouts/Honkai3rdLayout'
+import { useTranslation } from 'next-i18next'
+import { getI18NProps } from '../../../../server/i18n'
+import Breadcrumb from '../../../../components/organisms/Breadcrumb'
interface WeaponListPageProps {
weaponCatalog: WeaponCatalogItem[]
}
const WeaponListPage = ({ weaponCatalog }: WeaponListPageProps) => {
+ const { t } = useTranslation()
return (
-
- Weapons
-
- {weaponCatalog
- .filter(filterWeapons)
- .sort(sortWeapons)
- .map(weapon => {
- return (
-
-
-
-
-
-
-
- {weapon.name}
-
- {/* {weapon.id} */}
-
-
-
- )
- })}
-
-
+
+
+
+
+ {t('common.weapons')}
+
+ {weaponCatalog
+ .filter(filterWeapons)
+ .sort(sortWeapons)
+ .map(weapon => {
+ return (
+
+
+
+
+
+
+
+ {weapon.name}
+
+ {/* {weapon.id} */}
+
+
+
+ )
+ })}
+
+
+
)
}
@@ -55,7 +74,7 @@ export async function getStaticProps({ locale }: NextPageContext) {
const weaponCatalog = loadWeaponCatalog()
return {
- props: { weaponCatalog }
+ props: { weaponCatalog, ...(await getI18NProps(locale)) }
}
}