Optimize all pages
This commit is contained in:
Generated
+20
@@ -814,6 +814,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz",
|
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz",
|
||||||
"integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ=="
|
"integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ=="
|
||||||
},
|
},
|
||||||
|
"@types/ramda": {
|
||||||
|
"version": "0.27.60",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/ramda/-/ramda-0.27.60.tgz",
|
||||||
|
"integrity": "sha512-6ie74xhtl2ducVG8cC8mnYwpvIUWHBoLHbmvEsl5qPqJkqVP9ce5yZW10WgheKd2ua1yPIwd0miMWBsG19UmiQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ts-toolbelt": "^6.15.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@types/react": {
|
"@types/react": {
|
||||||
"version": "17.0.37",
|
"version": "17.0.37",
|
||||||
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz",
|
"resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz",
|
||||||
@@ -3468,6 +3477,11 @@
|
|||||||
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
"integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"ramda": {
|
||||||
|
"version": "0.27.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz",
|
||||||
|
"integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw=="
|
||||||
|
},
|
||||||
"randombytes": {
|
"randombytes": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||||
@@ -3976,6 +3990,12 @@
|
|||||||
"punycode": "^2.1.0"
|
"punycode": "^2.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"ts-toolbelt": {
|
||||||
|
"version": "6.15.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/ts-toolbelt/-/ts-toolbelt-6.15.5.tgz",
|
||||||
|
"integrity": "sha512-FZIXf1ksVyLcfr7M317jbB67XFJhOO1YqdTcuGaq9q5jLUoTikukZ+98TPjKiP2jC5CgmYdWWYs0s2nLSU0/1A==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"tsconfig-paths": {
|
"tsconfig-paths": {
|
||||||
"version": "3.12.0",
|
"version": "3.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz",
|
||||||
|
|||||||
@@ -8,12 +8,14 @@
|
|||||||
"@mdi/react": "^1.5.0",
|
"@mdi/react": "^1.5.0",
|
||||||
"bootstrap": "^5.1.3",
|
"bootstrap": "^5.1.3",
|
||||||
"next": "^12.0.7",
|
"next": "^12.0.7",
|
||||||
|
"ramda": "^0.27.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-bootstrap": "^2.0.3",
|
"react-bootstrap": "^2.0.3",
|
||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"theme-ui": "^0.12.1"
|
"theme-ui": "^0.12.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/ramda": "^0.27.60",
|
||||||
"@types/react": "^17.0.37",
|
"@types/react": "^17.0.37",
|
||||||
"eslint": "8.5.0",
|
"eslint": "8.5.0",
|
||||||
"eslint-config-next": "12.0.7",
|
"eslint-config-next": "12.0.7",
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { Box, Heading, Paragraph } from '@theme-ui/components'
|
import { Box, Heading, Paragraph } from '@theme-ui/components'
|
||||||
import { NextPageContext } from 'next'
|
import { NextPageContext } from 'next'
|
||||||
|
import Image from 'next/image'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
@@ -33,10 +34,21 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Heading as='h1'>{battlesuit.name}</Heading>
|
<Heading as='h1'>{battlesuit.name}</Heading>
|
||||||
|
|
||||||
<Box className='mb-4'>
|
<Box className='mb-4'>
|
||||||
<Box>
|
<Box
|
||||||
<img
|
sx={{
|
||||||
|
position: 'relative',
|
||||||
|
overflow: 'hidden',
|
||||||
|
width: '100%',
|
||||||
|
maxWidth: '600px',
|
||||||
|
borderRadius: 4,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
alt={battlesuit.name}
|
alt={battlesuit.name}
|
||||||
src={`/assets/honkai3rd/battlesuits/${battlesuit.id}.png`}
|
src={`/assets/honkai3rd/battlesuits/${battlesuit.id}.png`}
|
||||||
|
width={600}
|
||||||
|
height={600}
|
||||||
|
layout='responsive'
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
@@ -49,7 +61,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.leader.core.description}</Paragraph>
|
<Paragraph>{battlesuit.leader.core.description}</Paragraph>
|
||||||
{battlesuit.leader.subskills.map((subskill, index) => {
|
{battlesuit.leader.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -57,7 +69,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -71,7 +83,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.passive.core.description}</Paragraph>
|
<Paragraph>{battlesuit.passive.core.description}</Paragraph>
|
||||||
{battlesuit.passive.subskills.map((subskill, index) => {
|
{battlesuit.passive.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -79,7 +91,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -93,7 +105,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.evasion.core.description}</Paragraph>
|
<Paragraph>{battlesuit.evasion.core.description}</Paragraph>
|
||||||
{battlesuit.evasion.subskills.map((subskill, index) => {
|
{battlesuit.evasion.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -101,7 +113,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -115,7 +127,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.special.core.description}</Paragraph>
|
<Paragraph>{battlesuit.special.core.description}</Paragraph>
|
||||||
{battlesuit.special.subskills.map((subskill, index) => {
|
{battlesuit.special.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -123,7 +135,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -138,7 +150,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.ultimate.core.description}</Paragraph>
|
<Paragraph>{battlesuit.ultimate.core.description}</Paragraph>
|
||||||
{battlesuit.ultimate.subskills.map((subskill, index) => {
|
{battlesuit.ultimate.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -146,7 +158,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -161,7 +173,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.basic.core.description}</Paragraph>
|
<Paragraph>{battlesuit.basic.core.description}</Paragraph>
|
||||||
{battlesuit.basic.subskills.map((subskill, index) => {
|
{battlesuit.basic.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -169,7 +181,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
@@ -185,7 +197,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
<Paragraph>{battlesuit.sp.core.description}</Paragraph>
|
<Paragraph>{battlesuit.sp.core.description}</Paragraph>
|
||||||
{battlesuit.sp.subskills.map((subskill, index) => {
|
{battlesuit.sp.subskills.map((subskill, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<React.Fragment key={subskill.name}>
|
||||||
<Heading as='h4'>
|
<Heading as='h4'>
|
||||||
{subskill.name}
|
{subskill.name}
|
||||||
{subskill.requiredRank != null
|
{subskill.requiredRank != null
|
||||||
@@ -193,7 +205,7 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
|
|||||||
: ''}
|
: ''}
|
||||||
</Heading>
|
</Heading>
|
||||||
<p>{subskill.description}</p>
|
<p>{subskill.description}</p>
|
||||||
</>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
import { Box, Heading, Flex, Text, Link } from '@theme-ui/components'
|
import { Box, Heading, Flex, Text, Link } from '@theme-ui/components'
|
||||||
|
import Image from 'next/image'
|
||||||
import NextLink from 'next/link'
|
import NextLink from 'next/link'
|
||||||
|
import { pick } from 'ramda'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
@@ -9,7 +11,7 @@ import {
|
|||||||
} from '../../../data/honkai3rd/battlesuits'
|
} from '../../../data/honkai3rd/battlesuits'
|
||||||
|
|
||||||
interface BattlesuitListPageProps {
|
interface BattlesuitListPageProps {
|
||||||
battlesuits: BattlesuitData[]
|
battlesuits: Pick<BattlesuitData, 'id' | 'name'>[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
||||||
@@ -58,29 +60,21 @@ const BattlesuitListPage = ({ battlesuits }: BattlesuitListPageProps) => {
|
|||||||
passHref={true}
|
passHref={true}
|
||||||
>
|
>
|
||||||
<Link>
|
<Link>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
|
<Box
|
||||||
<div
|
sx={{
|
||||||
className='rounded'
|
position: 'relative',
|
||||||
style={{
|
overflow: 'hidden',
|
||||||
width: '140px',
|
width: '140px',
|
||||||
height: '140px',
|
height: '140px',
|
||||||
position: 'relative',
|
borderRadius: 4,
|
||||||
overflow: 'hidden',
|
}}
|
||||||
borderRadius: 4,
|
>
|
||||||
}}
|
<Image
|
||||||
>
|
alt={battlesuit.name}
|
||||||
<img
|
layout='fill'
|
||||||
alt={battlesuit.name}
|
objectFit='cover'
|
||||||
style={{
|
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
||||||
position: 'absolute',
|
/>
|
||||||
left: '50%',
|
|
||||||
top: '50%',
|
|
||||||
transform: 'translateY(-50%) translateX(-50%)',
|
|
||||||
}}
|
|
||||||
height='140'
|
|
||||||
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -109,7 +103,9 @@ export default BattlesuitListPage
|
|||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
battlesuits: listBattlesuits(),
|
battlesuits: listBattlesuits().map((battlesuit) =>
|
||||||
|
pick(['id', 'name'], battlesuit)
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Box, Heading, Link, Image } from '@theme-ui/components'
|
import { Box, Heading, Link } from '@theme-ui/components'
|
||||||
|
import Image from 'next/image'
|
||||||
import NextLink from 'next/link'
|
import NextLink from 'next/link'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
import Breadcrumb from '../../components/organisms/Breadcrumb'
|
import Breadcrumb from '../../components/organisms/Breadcrumb'
|
||||||
@@ -36,11 +37,13 @@ const Honkai3rdIndexPage = () => {
|
|||||||
<Box p={3}>
|
<Box p={3}>
|
||||||
<Breadcrumb items={[{ href: 'honkai3rd', label: 'Honkai 3rd' }]} />
|
<Breadcrumb items={[{ href: 'honkai3rd', label: 'Honkai 3rd' }]} />
|
||||||
<Heading as='h1'>Honkai 3rd</Heading>
|
<Heading as='h1'>Honkai 3rd</Heading>
|
||||||
<Box mb={3}>
|
<Box mb={3} sx={{ position: 'relative', minHeight: 300 }}>
|
||||||
<Image
|
<Image
|
||||||
alt='Honkai 3rd Wallpaper'
|
alt='Honkai 3rd Wallpaper'
|
||||||
src='/assets/honkai3rd/wallpaper.png'
|
src='/assets/honkai3rd/wallpaper.png'
|
||||||
width='100%'
|
width={640}
|
||||||
|
height={360}
|
||||||
|
layout='responsive'
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<Box mb={3}>
|
<Box mb={3}>
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
import { NavLink, Box, Heading, Text, Paragraph } from '@theme-ui/components'
|
import { Box, Heading, Text, Paragraph } from '@theme-ui/components'
|
||||||
import { NextPageContext } from 'next'
|
import { NextPageContext } from 'next'
|
||||||
|
import Image from 'next/image'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
import {
|
import {
|
||||||
StigmataData,
|
StigmataData,
|
||||||
listStigmata,
|
listStigmata,
|
||||||
@@ -24,75 +27,89 @@ const StigmataListPage = ({
|
|||||||
}: StigmataShowPageProps) => {
|
}: StigmataShowPageProps) => {
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Box>
|
<Honkai3rdNavigator />
|
||||||
<Link passHref href='/honkai3rd'>
|
<Box p={3}>
|
||||||
<NavLink>Honkai 3rd</NavLink>
|
<Breadcrumb
|
||||||
</Link>
|
items={[
|
||||||
<Link passHref href='/honkai3rd/stigmata'>
|
{ href: '/honkai3rd', label: 'Honkai 3rd' },
|
||||||
<NavLink>Stigmata</NavLink>
|
{ href: '/honkai3rd/stigmata', label: 'Stigmata' },
|
||||||
</Link>
|
{
|
||||||
</Box>
|
href: `/honkai3rd/stigmata/${stigmataData.id}`,
|
||||||
|
label: stigmataData.name,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
|
|
||||||
<Heading as='h1'>{stigmataData.name}</Heading>
|
<Heading as='h1'>{stigmataData.name}</Heading>
|
||||||
|
|
||||||
<img
|
<Box
|
||||||
alt={stigmataData.name}
|
mb={3}
|
||||||
src={`/assets/honkai3rd/stigmata/${stigmataData.id}.png`}
|
sx={{
|
||||||
/>
|
position: 'relative',
|
||||||
|
overflow: 'hidden',
|
||||||
<Box>
|
width: '100%',
|
||||||
<Heading as='h2'>Skill - {stigmataData.skill.name}</Heading>
|
maxWidth: '600px',
|
||||||
<Paragraph>{stigmataData.skill.description}</Paragraph>
|
borderRadius: 4,
|
||||||
</Box>
|
}}
|
||||||
|
>
|
||||||
{stigmataSet != null && (
|
<Image
|
||||||
<Box>
|
alt={stigmataData.name}
|
||||||
<Heading as='h2'>Set</Heading>
|
src={`/assets/honkai3rd/stigmata/${stigmataData.id}.png`}
|
||||||
<Box>
|
width={600}
|
||||||
{stigmataSetList.map((stigmataSetItem) => {
|
height={600}
|
||||||
return (
|
layout='responsive'
|
||||||
<Link
|
/>
|
||||||
key={stigmataSetItem.id}
|
|
||||||
href={`/honkai3rd/stigmata/${stigmataSetItem.id}`}
|
|
||||||
>
|
|
||||||
<a>
|
|
||||||
<div
|
|
||||||
className='rounded'
|
|
||||||
style={{
|
|
||||||
width: '100px',
|
|
||||||
height: '100px',
|
|
||||||
position: 'relative',
|
|
||||||
overflow: 'hidden',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
alt={stigmataSetItem.name}
|
|
||||||
style={{
|
|
||||||
position: 'absolute',
|
|
||||||
left: '50%',
|
|
||||||
top: '50%',
|
|
||||||
transform: 'translateY(-50%) translateX(-50%)',
|
|
||||||
}}
|
|
||||||
height='100'
|
|
||||||
src={`/assets/honkai3rd/stigmata/icon-${stigmataSetItem.id}.png`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<Text>{stigmataSetItem.name}</Text>
|
|
||||||
</a>
|
|
||||||
</Link>
|
|
||||||
)
|
|
||||||
})}
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Heading as='h3'>{stigmataSet.twoSetSkill.name}</Heading>
|
|
||||||
<Paragraph>{stigmataSet.twoSetSkill.description}</Paragraph>
|
|
||||||
</Box>
|
|
||||||
<Box>
|
|
||||||
<Heading as='h3'>{stigmataSet.threeSetSkill.name}</Heading>
|
|
||||||
<Paragraph>{stigmataSet.threeSetSkill.description}</Paragraph>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
|
||||||
|
<Box mb={3}>
|
||||||
|
<Heading as='h2'>Skill - {stigmataData.skill.name}</Heading>
|
||||||
|
<Paragraph>{stigmataData.skill.description}</Paragraph>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
{stigmataSet != null && (
|
||||||
|
<Box>
|
||||||
|
<Heading as='h2'>Set</Heading>
|
||||||
|
<Box mb={3}>
|
||||||
|
{stigmataSetList.map((stigmataSetItem) => {
|
||||||
|
return (
|
||||||
|
<Link
|
||||||
|
key={stigmataSetItem.id}
|
||||||
|
href={`/honkai3rd/stigmata/${stigmataSetItem.id}`}
|
||||||
|
>
|
||||||
|
<a>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
position: 'relative',
|
||||||
|
overflow: 'hidden',
|
||||||
|
width: '100px',
|
||||||
|
height: '100px',
|
||||||
|
borderRadius: 4,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Image
|
||||||
|
alt={stigmataSetItem.name}
|
||||||
|
layout='fill'
|
||||||
|
objectFit='cover'
|
||||||
|
src={`/assets/honkai3rd/stigmata/icon-${stigmataSetItem.id}.png`}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
<Text>{stigmataSetItem.name}</Text>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
)
|
||||||
|
})}
|
||||||
|
</Box>
|
||||||
|
<Box mb={3}>
|
||||||
|
<Heading as='h3'>{stigmataSet.twoSetSkill.name}</Heading>
|
||||||
|
<Paragraph>{stigmataSet.twoSetSkill.description}</Paragraph>
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
|
<Heading as='h3'>{stigmataSet.threeSetSkill.name}</Heading>
|
||||||
|
<Paragraph>{stigmataSet.threeSetSkill.description}</Paragraph>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
/** @jsxImportSource theme-ui */
|
/** @jsxImportSource theme-ui */
|
||||||
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
|
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
|
||||||
|
import Image from 'next/image'
|
||||||
import NextLink from 'next/link'
|
import NextLink from 'next/link'
|
||||||
|
import { pick } from 'ramda'
|
||||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
import { StigmataData, listStigmata } from '../../../data/honkai3rd/stigmata'
|
import { StigmataData, listStigmata } from '../../../data/honkai3rd/stigmata'
|
||||||
|
|
||||||
interface StigmataListPageProps {
|
interface StigmataListPageProps {
|
||||||
stigmataDataList: StigmataData[]
|
stigmataDataList: Pick<StigmataData, 'id' | 'name' | 'rarity'>[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const StigmataListPage = ({ stigmataDataList }: StigmataListPageProps) => {
|
const StigmataListPage = ({ stigmataDataList }: StigmataListPageProps) => {
|
||||||
@@ -55,29 +57,21 @@ const StigmataListPage = ({ stigmataDataList }: StigmataListPageProps) => {
|
|||||||
passHref={true}
|
passHref={true}
|
||||||
>
|
>
|
||||||
<Link>
|
<Link>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
|
<Box
|
||||||
<div
|
sx={{
|
||||||
className='rounded'
|
position: 'relative',
|
||||||
style={{
|
overflow: 'hidden',
|
||||||
width: '100px',
|
width: '100px',
|
||||||
height: '100px',
|
height: '100px',
|
||||||
position: 'relative',
|
borderRadius: 4,
|
||||||
overflow: 'hidden',
|
}}
|
||||||
borderRadius: 4,
|
>
|
||||||
}}
|
<Image
|
||||||
>
|
alt={stigmata.name}
|
||||||
<img
|
layout='fill'
|
||||||
alt={stigmata.name}
|
objectFit='cover'
|
||||||
style={{
|
src={`/assets/honkai3rd/stigmata/icon-${stigmata.id}.png`}
|
||||||
position: 'absolute',
|
/>
|
||||||
left: '50%',
|
|
||||||
top: '50%',
|
|
||||||
transform: 'translateY(-50%) translateX(-50%)',
|
|
||||||
}}
|
|
||||||
height='100'
|
|
||||||
src={`/assets/honkai3rd/stigmata/icon-${stigmata.id}.png`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -109,7 +103,9 @@ export default StigmataListPage
|
|||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
stigmataDataList: listStigmata(),
|
stigmataDataList: listStigmata().map((stigmata) =>
|
||||||
|
pick(['id', 'name', 'rarity'], stigmata)
|
||||||
|
),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
/** @jsxImportSource theme-ui */
|
/** @jsxImportSource theme-ui */
|
||||||
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
|
import { Text, Box, Heading, Flex, Link } from '@theme-ui/components'
|
||||||
|
import Image from 'next/image'
|
||||||
import NextLink from 'next/link'
|
import NextLink from 'next/link'
|
||||||
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
import Breadcrumb from '../../../components/organisms/Breadcrumb'
|
||||||
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator'
|
||||||
import { listWeapons, WeaponData } from '../../../data/honkai3rd/weapons'
|
import { listWeapons, WeaponData } from '../../../data/honkai3rd/weapons'
|
||||||
|
import { pick } from 'ramda'
|
||||||
|
|
||||||
interface WeaponListPageProps {
|
interface WeaponListPageProps {
|
||||||
weaponDataList: WeaponData[]
|
weaponDataList: Pick<WeaponData, 'id' | 'name' | 'rarity'>[]
|
||||||
}
|
}
|
||||||
|
|
||||||
const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
||||||
@@ -55,29 +57,21 @@ const WeaponListPage = ({ weaponDataList }: WeaponListPageProps) => {
|
|||||||
passHref={true}
|
passHref={true}
|
||||||
>
|
>
|
||||||
<Link>
|
<Link>
|
||||||
<Box sx={{ display: 'flex', justifyContent: 'center' }}>
|
<Box
|
||||||
<div
|
sx={{
|
||||||
className='rounded'
|
position: 'relative',
|
||||||
style={{
|
overflow: 'hidden',
|
||||||
width: '100px',
|
width: '100px',
|
||||||
height: '100px',
|
height: '100px',
|
||||||
position: 'relative',
|
borderRadius: 4,
|
||||||
overflow: 'hidden',
|
}}
|
||||||
borderRadius: 4,
|
>
|
||||||
}}
|
<Image
|
||||||
>
|
alt={weapon.name}
|
||||||
<img
|
layout='fill'
|
||||||
alt={weapon.name}
|
objectFit='cover'
|
||||||
style={{
|
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
||||||
position: 'absolute',
|
/>
|
||||||
left: '50%',
|
|
||||||
top: '50%',
|
|
||||||
transform: 'translateY(-50%) translateX(-50%)',
|
|
||||||
}}
|
|
||||||
height='100'
|
|
||||||
src={`/assets/honkai3rd/weapons/${weapon.id}.png`}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -109,7 +103,9 @@ export default WeaponListPage
|
|||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
weaponDataList: listWeapons(),
|
weaponDataList: listWeapons().map((weapon) => {
|
||||||
|
return pick(['name', 'id', 'rarity'], weapon)
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user