Style stigmata show page
This commit is contained in:
@@ -1,11 +1,12 @@
|
|||||||
import { Box, Heading, Text, Paragraph } from '@theme-ui/components'
|
import { Box, Heading, Text, Paragraph, Card, Flex } from '@theme-ui/components'
|
||||||
import { NextPageContext } from 'next'
|
import { NextPageContext } from 'next'
|
||||||
import Image from 'next/image'
|
import Image from 'next/image'
|
||||||
import Link from 'next/link'
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
import StigmataCard from '../../../components/molecules/StigmataCard'
|
||||||
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, StigmataSet } from '../../../lib/honkai3rd/stigmata'
|
import { StigmataData, StigmataSet } from '../../../lib/honkai3rd/stigmata'
|
||||||
|
import { capitalize } from '../../../lib/string'
|
||||||
import {
|
import {
|
||||||
listStigmata,
|
listStigmata,
|
||||||
getStigmataById,
|
getStigmataById,
|
||||||
@@ -60,53 +61,66 @@ const StigmataListPage = ({
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box mb={3}>
|
<Card mb={3}>
|
||||||
<Heading as='h2'>Skill - {stigmataData.skill.name}</Heading>
|
<Box p={2} sx={{ borderBottom: 'default' }}>
|
||||||
<Paragraph>{stigmataData.skill.description}</Paragraph>
|
{capitalize(stigmataData.type)}
|
||||||
</Box>
|
</Box>
|
||||||
|
<Box p={2} sx={{ borderBottom: 'default' }}>
|
||||||
|
{'⭐'.repeat(stigmataData.rarity)}
|
||||||
|
</Box>
|
||||||
|
<Box p={2}>
|
||||||
|
HP : {stigmataData.hp} / ATK : {stigmataData.atk} / DEF :{' '}
|
||||||
|
{stigmataData.def} / CRT : {stigmataData.crt}
|
||||||
|
</Box>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card mb={3}>
|
||||||
|
<Heading as='h2' m={0} p={2} sx={{ borderBottom: 'default' }}>
|
||||||
|
Skill - {stigmataData.skill.name}
|
||||||
|
</Heading>
|
||||||
|
<Paragraph p={2}>{stigmataData.skill.description}</Paragraph>
|
||||||
|
</Card>
|
||||||
|
|
||||||
{stigmataSet != null && (
|
{stigmataSet != null && (
|
||||||
<Box>
|
<Card>
|
||||||
<Heading as='h2'>Set</Heading>
|
<Heading as='h2' m={0} p={2} sx={{ borderBottom: 'default' }}>
|
||||||
<Box mb={3}>
|
{stigmataSet.name}
|
||||||
{stigmataSetList.map((stigmataSetItem) => {
|
<br />
|
||||||
return (
|
<Text as='small' sx={{ fontSize: 2, color: 'secondary' }}>
|
||||||
<Link
|
Set
|
||||||
key={stigmataSetItem.id}
|
</Text>
|
||||||
href={`/honkai3rd/stigmata/${stigmataSetItem.id}`}
|
</Heading>
|
||||||
>
|
<Flex
|
||||||
<a>
|
p={2}
|
||||||
<Box
|
|
||||||
sx={{
|
sx={{
|
||||||
position: 'relative',
|
borderBottom: 'default',
|
||||||
overflow: 'hidden',
|
justifyContent: 'space-around',
|
||||||
width: '100px',
|
flexWrap: 'wrap',
|
||||||
height: '100px',
|
|
||||||
borderRadius: 4,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Image
|
{stigmataSetList.map((stigmataSetItem) => {
|
||||||
alt={stigmataSetItem.name}
|
return (
|
||||||
layout='fill'
|
<StigmataCard
|
||||||
objectFit='cover'
|
key={stigmataSetItem.id}
|
||||||
src={`/assets/honkai3rd/stigmata/icon-${stigmataSetItem.id}.png`}
|
stigmata={stigmataSetItem}
|
||||||
/>
|
/>
|
||||||
</Box>
|
|
||||||
<Text>{stigmataSetItem.name}</Text>
|
|
||||||
</a>
|
|
||||||
</Link>
|
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</Box>
|
</Flex>
|
||||||
<Box mb={3}>
|
|
||||||
<Heading as='h3'>{stigmataSet.twoSetSkill.name}</Heading>
|
<Heading as='h3' m={0} p={2} sx={{ borderBottom: 'default' }}>
|
||||||
<Paragraph>{stigmataSet.twoSetSkill.description}</Paragraph>
|
{stigmataSet.twoSetSkill.name}
|
||||||
</Box>
|
</Heading>
|
||||||
<Box>
|
<Paragraph m={0} p={2} sx={{ borderBottom: 'default' }}>
|
||||||
<Heading as='h3'>{stigmataSet.threeSetSkill.name}</Heading>
|
{stigmataSet.twoSetSkill.description}
|
||||||
<Paragraph>{stigmataSet.threeSetSkill.description}</Paragraph>
|
</Paragraph>
|
||||||
</Box>
|
<Heading as='h3' m={0} p={2} sx={{ borderBottom: 'default' }}>
|
||||||
</Box>
|
{stigmataSet.threeSetSkill.name}
|
||||||
|
</Heading>
|
||||||
|
<Paragraph m={0} p={2}>
|
||||||
|
{stigmataSet.threeSetSkill.description}
|
||||||
|
</Paragraph>
|
||||||
|
</Card>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user