Skip to content

Commit cf1a94e

Browse files
feat: Add a section for special thanks on top page (#200)
1 parent a1e4ae3 commit cf1a94e

File tree

7 files changed

+100
-38
lines changed

7 files changed

+100
-38
lines changed

public/special-thanks/sikmi.png

8.65 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { Box } from '@mui/material'
2+
import { FC } from 'react'
3+
import Image from 'next/image'
4+
import {
5+
GopherConductor,
6+
GopherDrummer,
7+
GopherTrumpeter,
8+
GopherPomPom,
9+
GopherFlowerBlue,
10+
GopherFlowerPink,
11+
GopherPartyPopper
12+
} from 'src/images/gopher'
13+
import { useReward } from 'react-rewards'
14+
import { confettiColors } from 'src/styles/color'
15+
import { useSize } from 'src/modules/hooks'
16+
17+
export const FooterGophers: FC = () => {
18+
const { isTabletOrOver } = useSize()
19+
const { reward } = useReward('confettiGopherPopper', 'confetti', {
20+
angle: 135,
21+
colors: confettiColors,
22+
position: 'absolute',
23+
startVelocity: 20
24+
})
25+
26+
return (
27+
<Box display="flex" alignItems="flex-end" justifyContent="center" gap={0.5} width="100%" padding="24px 16px">
28+
<Image src={GopherConductor} alt="gopher conductor" style={{ minWidth: 0, objectFit: 'contain' }} />
29+
<Image src={GopherDrummer} alt="gopher drummer" style={{ minWidth: 0, objectFit: 'contain' }} />
30+
<Image src={GopherTrumpeter} alt="gopher trumpeter" style={{ minWidth: 0, objectFit: 'contain' }} />
31+
<Image src={GopherPomPom} alt="gopher pom pom" style={{ minWidth: 0, objectFit: 'contain' }} />
32+
<Image src={GopherFlowerBlue} alt="gopher flower blue" style={{ minWidth: 0, objectFit: 'contain' }} />
33+
{isTabletOrOver && (
34+
<>
35+
<Image src={GopherFlowerPink} alt="gopher flower pink" />
36+
<Box onClick={reward} sx={{ '&:hover': { cursor: 'pointer' } }}>
37+
<span id="confettiGopherPopper" />
38+
<Image src={GopherPartyPopper} alt="gopher party popper" />
39+
</Box>
40+
</>
41+
)}
42+
</Box>
43+
)
44+
}

src/components/organisms/Footer/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { Trans, useTranslation } from 'react-i18next'
44
import { useSize } from 'src/modules/hooks'
55
import { FooterBottom } from 'src/components/organisms/Footer/FooterBottom'
66
import { IconTwitter } from 'src/components/atoms'
7+
import { FooterGophers } from './FooterGophers'
78

89
export const footerHeight = 60
910

@@ -20,6 +21,7 @@ export const Footer = () => {
2021
p: 0
2122
}}
2223
>
24+
<FooterGophers />
2325
<Box
2426
sx={{
2527
display: 'flex',
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import type { ComponentMeta, ComponentStoryObj } from '@storybook/react'
2+
import { SpecialThanksSection } from '.'
3+
4+
const meta: ComponentMeta<typeof SpecialThanksSection> = {
5+
component: SpecialThanksSection
6+
}
7+
export default meta
8+
9+
export const Default: ComponentStoryObj<typeof SpecialThanksSection> = {
10+
parameters: {
11+
backgrounds: {
12+
default: 'secondary'
13+
}
14+
}
15+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import type { FC } from 'react'
2+
import { Box, Typography } from '@mui/material'
3+
import { Colors } from 'src/styles/color'
4+
import Image from 'next/image'
5+
6+
export const SpecialThanksSection: FC = () => {
7+
return (
8+
<Box
9+
bgcolor={Colors.background.secondary}
10+
display={'flex'}
11+
flexDirection={'column'}
12+
alignItems={'center'}
13+
px={{ xs: 2 }}
14+
py={{ md: 10, xs: 4 }}
15+
>
16+
<Typography variant="h2" textAlign={'center'}>
17+
Special Thanks
18+
</Typography>
19+
<Box bgcolor={Colors.background.primary} maxWidth={'1024px'} width={'100%'} borderRadius={5} p={{ xs: 3, md: 5 }}>
20+
<Typography variant="body1" align="center">
21+
reBako.io powered by
22+
</Typography>
23+
<Box position="relative" sx={{ aspectRatio: '16/9', maxWidth: '384px', mx: 'auto' }}>
24+
<Image
25+
src={'special-thanks/sikmi.png'}
26+
alt={'しくみ製作所'}
27+
quality={100}
28+
fill
29+
style={{ objectFit: 'contain' }}
30+
/>
31+
</Box>
32+
</Box>
33+
</Box>
34+
)
35+
}
Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
11
import type { FC } from 'react'
22
import { Box, Typography } from '@mui/material'
3-
import { Colors, confettiColors } from 'src/styles/color'
4-
import {
5-
GopherConductor,
6-
GopherDrummer,
7-
GopherFlowerBlue,
8-
GopherFlowerPink,
9-
GopherPartyPopper,
10-
GopherPomPom,
11-
GopherTrumpeter
12-
} from 'src/images/gopher'
13-
import Image from 'next/image'
14-
import { useSize } from 'src/modules/hooks'
15-
import { useReward } from 'react-rewards'
3+
import { Colors } from 'src/styles/color'
164
import { sponsors } from 'src/modules/sponsors'
175
import { SponsorsCard } from 'src/components/molecules/SponsorsCard'
186

197
export const SponsorsSection: FC = () => {
20-
const { isTabletOrOver } = useSize()
21-
const { reward } = useReward('confettiGopherPopper', 'confetti', {
22-
angle: 135,
23-
colors: confettiColors,
24-
position: 'absolute',
25-
startVelocity: 20
26-
})
278
const { platinum, gold, silver, bronze } = sponsors
289

2910
return (
@@ -32,35 +13,18 @@ export const SponsorsSection: FC = () => {
3213
display={'flex'}
3314
flexDirection={'column'}
3415
alignItems={'center'}
35-
mb={{ md: 12.5, xs: 7.5 }}
3616
px={{ xs: 2 }}
3717
py={{ md: 10, xs: 4 }}
3818
>
3919
<Typography variant="h2" textAlign={'center'}>
4020
Sponsors
4121
</Typography>
42-
<Box gap={3} mb={5} display={'flex'} flexDirection={'column'} width={'100%'} alignItems={'center'}>
22+
<Box gap={3} display={'flex'} flexDirection={'column'} width={'100%'} alignItems={'center'}>
4323
<SponsorsCard planType="platinum" sponsors={platinum} />
4424
<SponsorsCard planType="gold" sponsors={gold} />
4525
<SponsorsCard planType="silver" sponsors={silver} />
4626
<SponsorsCard planType="bronze" sponsors={bronze} />
4727
</Box>
48-
<Box display="flex" alignItems="flex-end" justifyContent="center" gap={0.5} width="100%">
49-
<Image src={GopherConductor} alt="gopher conductor" style={{ minWidth: 0, objectFit: 'contain' }} />
50-
<Image src={GopherDrummer} alt="gopher drummer" style={{ minWidth: 0, objectFit: 'contain' }} />
51-
<Image src={GopherTrumpeter} alt="gopher trumpeter" style={{ minWidth: 0, objectFit: 'contain' }} />
52-
<Image src={GopherPomPom} alt="gopher pom pom" style={{ minWidth: 0, objectFit: 'contain' }} />
53-
<Image src={GopherFlowerBlue} alt="gopher flower blue" style={{ minWidth: 0, objectFit: 'contain' }} />
54-
{isTabletOrOver && (
55-
<>
56-
<Image src={GopherFlowerPink} alt="gopher flower pink" />
57-
<Box onClick={reward} sx={{ '&:hover': { cursor: 'pointer' } }}>
58-
<span id="confettiGopherPopper" />
59-
<Image src={GopherPartyPopper} alt="gopher party popper" />
60-
</Box>
61-
</>
62-
)}
63-
</Box>
6428
</Box>
6529
)
6630
}

src/components/pages/PageTop/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import type { NextPage } from 'next'
22
import { Layout } from 'src/components/commons'
33
// import { useSessionize } from 'src/modules/sessionize/hooks'
44
import { MainVisual, TopDescription, SponsorsSection } from 'src/components/organisms'
5+
import { SpecialThanksSection } from 'src/components/organisms/SpecialThanksSection'
56

67
export const PageTop: NextPage = () => {
78
// TODO(@maito1201): 取得したデータを基にセッションデータを表示する
@@ -13,6 +14,7 @@ export const PageTop: NextPage = () => {
1314
<MainVisual />
1415
<TopDescription />
1516
<SponsorsSection />
17+
<SpecialThanksSection />
1618
</Layout>
1719
)
1820
}

0 commit comments

Comments
 (0)