Apply responsive size for cards and images

This commit is contained in:
Sakura Knoll
2022-01-09 20:29:37 +09:00 Unverified
parent 793f2b0e6a
commit 584af953ca
6 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ const BattlesuitCard = ({ battlesuit, hidden }: BattlesuitCardProps) => {
<Card <Card
className={hidden ? 'hidden' : ''} className={hidden ? 'hidden' : ''}
sx={{ sx={{
width: [140, 160], width: 120,
padding: 2, padding: 2,
margin: 2, margin: 2,
'&.hidden': { '&.hidden': {
@@ -39,7 +39,7 @@ const BattlesuitCard = ({ battlesuit, hidden }: BattlesuitCardProps) => {
<SquareImageBox <SquareImageBox
alt={battlesuitName} alt={battlesuitName}
src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`} src={`/assets/honkai3rd/battlesuits/portrait-${battlesuit.id}.png`}
size={[120, 140]} size={100}
/> />
<Box <Box
sx={{ sx={{
+2 -2
View File
@@ -21,7 +21,7 @@ const ElfCard = ({ elf }: ElfCardProps) => {
sx={{ sx={{
m: 2, m: 2,
p: 2, p: 2,
width: [140, 160], width: [120],
'&.hiden': { '&.hiden': {
display: 'none', display: 'none',
}, },
@@ -31,7 +31,7 @@ const ElfCard = ({ elf }: ElfCardProps) => {
<SquareImageBox <SquareImageBox
alt={elfName} alt={elfName}
src={`/assets/honkai3rd/elfs/icon-${elf.id}.png`} src={`/assets/honkai3rd/elfs/icon-${elf.id}.png`}
size={[120, 140]} size={[100]}
/> />
<Box <Box
sx={{ sx={{
+4 -4
View File
@@ -20,14 +20,14 @@ const StigmataCard = ({ stigmata }: StigmataCardProps) => {
return ( return (
<Card <Card
sx={{ sx={{
width: '120px', width: [85, 120],
padding: 2, padding: [1, 2],
margin: 2, margin: [1, 2],
}} }}
> >
<PageLink href={`/honkai3rd/stigmata/${stigmata.id}`}> <PageLink href={`/honkai3rd/stigmata/${stigmata.id}`}>
<SquareImageBox <SquareImageBox
size={100} size={[75, 100]}
alt={stigmataName} alt={stigmataName}
src={`/assets/honkai3rd/stigmata/icon-${stigmata.id}.png`} src={`/assets/honkai3rd/stigmata/icon-${stigmata.id}.png`}
/> />
+3 -3
View File
@@ -62,15 +62,15 @@ const SingleStigmataPage = ({
position: 'relative', position: 'relative',
overflow: 'hidden', overflow: 'hidden',
width: '100%', width: '100%',
maxWidth: '600px', maxWidth: [300, 400],
borderRadius: 4, borderRadius: 4,
}} }}
> >
<Image <Image
alt={stigmataName} alt={stigmataName}
src={`/assets/honkai3rd/stigmata/${stigmataData.id}.png`} src={`/assets/honkai3rd/stigmata/${stigmataData.id}.png`}
width={600} width={400}
height={600} height={400}
layout='responsive' layout='responsive'
/> />
</Box> </Box>
@@ -64,14 +64,14 @@ const BattlesuitShowPage = ({ battlesuit }: BattlesuitShowPageProps) => {
position: 'relative', position: 'relative',
overflow: 'hidden', overflow: 'hidden',
width: '100%', width: '100%',
maxWidth: '600px', maxWidth: [300, 400],
}} }}
> >
<Image <Image
alt={battlesuitName} alt={battlesuitName}
src={`/assets/honkai3rd/battlesuits/${battlesuit.id}.png`} src={`/assets/honkai3rd/battlesuits/${battlesuit.id}.png`}
width={600} width={400}
height={600} height={400}
layout='responsive' layout='responsive'
/> />
</Box> </Box>
+2 -2
View File
@@ -45,8 +45,8 @@ const ElfShowPage = ({ elf }: ElfShowPageProps) => {
sx={{ sx={{
position: 'relative', position: 'relative',
overflow: 'hidden', overflow: 'hidden',
width: '400px', width: [300, 400],
height: '400px', height: [300, 400],
borderRadius: 4, borderRadius: 4,
}} }}
> >