From 17571f78631a9ce182d938d69a227ecc8ffb59aa Mon Sep 17 00:00:00 2001 From: Sakura Knoll Date: Sun, 2 Jan 2022 20:07:47 +0900 Subject: [PATCH] Style elf show page --- src/pages/honkai3rd/elfs/[elfId].tsx | 75 +++++++++++++++++++++------- 1 file changed, 57 insertions(+), 18 deletions(-) diff --git a/src/pages/honkai3rd/elfs/[elfId].tsx b/src/pages/honkai3rd/elfs/[elfId].tsx index 1c7ab749..001ead4f 100644 --- a/src/pages/honkai3rd/elfs/[elfId].tsx +++ b/src/pages/honkai3rd/elfs/[elfId].tsx @@ -1,10 +1,13 @@ /** @jsxImportSource theme-ui */ -import { Box, Heading, Paragraph } from '@theme-ui/components' +import { Box, Card, Flex, Heading, Paragraph, Text } from '@theme-ui/components' import { NextPageContext } from 'next' import Image from 'next/image' +import React from 'react' +import BattlesuitFeatureLabel from '../../../components/atoms/BattlesuitFeatureLabel' import Breadcrumb from '../../../components/organisms/Breadcrumb' import Honkai3rdNavigator from '../../../components/organisms/Honkai3rdNavigator' import { ElfData } from '../../../lib/honkai3rd/elfs' +import { capitalize } from '../../../lib/string' import { getElfById, listElfs } from '../../../server/data/honkai3rd/elfs' interface ElfShowPageProps { @@ -48,24 +51,60 @@ const ElfShowPage = ({ elf }: ElfShowPageProps) => { /> - {'⭐'.repeat(elf.baseRank)} - - {elf.skillRows.map((row, rowIndex) => { - return ( - - {row.map((item, columnIndex) => { - return ( - - {item.name} - {item.description} - - ) - })} -
+ + + + {'⭐'.repeat(elf.baseRank)} + + + {elf.features.map((feature) => ( + + - ) - })} -
+ ))} + + + + {elf.skillRows.map((row, rowIndex) => { + return ( + + {row.map((item, columnIndex) => { + return ( + + + + {item.name} + + + {capitalize(item.type)} + + + + {item.description} + + + ) + })} + + ) + })}
)