-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add a section for special thanks on top page (#200)
- Loading branch information
1 parent
a1e4ae3
commit cf1a94e
Showing
7 changed files
with
100 additions
and
38 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { Box } from '@mui/material' | ||
import { FC } from 'react' | ||
import Image from 'next/image' | ||
import { | ||
GopherConductor, | ||
GopherDrummer, | ||
GopherTrumpeter, | ||
GopherPomPom, | ||
GopherFlowerBlue, | ||
GopherFlowerPink, | ||
GopherPartyPopper | ||
} from 'src/images/gopher' | ||
import { useReward } from 'react-rewards' | ||
import { confettiColors } from 'src/styles/color' | ||
import { useSize } from 'src/modules/hooks' | ||
|
||
export const FooterGophers: FC = () => { | ||
const { isTabletOrOver } = useSize() | ||
const { reward } = useReward('confettiGopherPopper', 'confetti', { | ||
angle: 135, | ||
colors: confettiColors, | ||
position: 'absolute', | ||
startVelocity: 20 | ||
}) | ||
|
||
return ( | ||
<Box display="flex" alignItems="flex-end" justifyContent="center" gap={0.5} width="100%" padding="24px 16px"> | ||
<Image src={GopherConductor} alt="gopher conductor" style={{ minWidth: 0, objectFit: 'contain' }} /> | ||
<Image src={GopherDrummer} alt="gopher drummer" style={{ minWidth: 0, objectFit: 'contain' }} /> | ||
<Image src={GopherTrumpeter} alt="gopher trumpeter" style={{ minWidth: 0, objectFit: 'contain' }} /> | ||
<Image src={GopherPomPom} alt="gopher pom pom" style={{ minWidth: 0, objectFit: 'contain' }} /> | ||
<Image src={GopherFlowerBlue} alt="gopher flower blue" style={{ minWidth: 0, objectFit: 'contain' }} /> | ||
{isTabletOrOver && ( | ||
<> | ||
<Image src={GopherFlowerPink} alt="gopher flower pink" /> | ||
<Box onClick={reward} sx={{ '&:hover': { cursor: 'pointer' } }}> | ||
<span id="confettiGopherPopper" /> | ||
<Image src={GopherPartyPopper} alt="gopher party popper" /> | ||
</Box> | ||
</> | ||
)} | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/components/organisms/SpecialThanksSection/SpecialThanksSection.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import type { ComponentMeta, ComponentStoryObj } from '@storybook/react' | ||
import { SpecialThanksSection } from '.' | ||
|
||
const meta: ComponentMeta<typeof SpecialThanksSection> = { | ||
component: SpecialThanksSection | ||
} | ||
export default meta | ||
|
||
export const Default: ComponentStoryObj<typeof SpecialThanksSection> = { | ||
parameters: { | ||
backgrounds: { | ||
default: 'secondary' | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import type { FC } from 'react' | ||
import { Box, Typography } from '@mui/material' | ||
import { Colors } from 'src/styles/color' | ||
import Image from 'next/image' | ||
|
||
export const SpecialThanksSection: FC = () => { | ||
return ( | ||
<Box | ||
bgcolor={Colors.background.secondary} | ||
display={'flex'} | ||
flexDirection={'column'} | ||
alignItems={'center'} | ||
px={{ xs: 2 }} | ||
py={{ md: 10, xs: 4 }} | ||
> | ||
<Typography variant="h2" textAlign={'center'}> | ||
Special Thanks | ||
</Typography> | ||
<Box bgcolor={Colors.background.primary} maxWidth={'1024px'} width={'100%'} borderRadius={5} p={{ xs: 3, md: 5 }}> | ||
<Typography variant="body1" align="center"> | ||
reBako.io powered by | ||
</Typography> | ||
<Box position="relative" sx={{ aspectRatio: '16/9', maxWidth: '384px', mx: 'auto' }}> | ||
<Image | ||
src={'special-thanks/sikmi.png'} | ||
alt={'しくみ製作所'} | ||
quality={100} | ||
fill | ||
style={{ objectFit: 'contain' }} | ||
/> | ||
</Box> | ||
</Box> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters