-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tutorial/#107 #113
Tutorial/#107 #113
Changes from 7 commits
114acbc
dc6d660
0166ce6
2ce6b1b
a372253
8649f72
88323f4
edb830c
bacbee5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import feature1 from '@/public/assets/tutorial/tutorial-feature1.png'; | ||
import feature2 from '@/public/assets/tutorial/tutorial-feature2.png'; | ||
import feature3 from '@/public/assets/tutorial/tutorial-feature3.png'; | ||
import upload0 from '@/public/assets/tutorial/tutorial0.png'; | ||
import upload1 from '@/public/assets/tutorial/tutorial1.png'; | ||
import upload2 from '@/public/assets/tutorial/tutorial2.png'; | ||
import upload3 from '@/public/assets/tutorial/tutorial3.png'; | ||
import upload4 from '@/public/assets/tutorial/tutorial4.png'; | ||
import { StaticImageData } from 'next/image'; | ||
import Link from 'next/link'; | ||
|
||
interface TutorialItem { | ||
imageUrl: StaticImageData; | ||
title: string; | ||
content: React.ReactNode; | ||
} | ||
|
||
export const TUTORIAL_FEATRUE: TutorialItem[] = [ | ||
{ | ||
imageUrl: feature1, | ||
title: 'first', | ||
content: '๊ฐ์ ์ปค์คํ ์ ํตํ ์กธ์ ์ฌ์ ์์ธก', | ||
}, | ||
{ | ||
imageUrl: feature2, | ||
title: 'second', | ||
content: '์นดํ ๊ณ ๋ฆฌ๋ณ(๊ต์ / ์ ๊ณต) ์๊ฐ ํ์ ํํฉ ์กฐํ', | ||
}, | ||
{ | ||
imageUrl: feature3, | ||
title: 'third', | ||
content: '์นดํ ๊ณ ๋ฆฌ๋ณ(๊ต์ / ์ ๊ณต) ๋ฏธ์ด์ ๊ณผ๋ชฉ ์ ๋ณด ๋ฐ ์์ฌ ํ์ ์กฐํ', | ||
}, | ||
]; | ||
|
||
export const TUTORIAL_UPLOAD: TutorialItem[] = [ | ||
{ | ||
imageUrl: upload0, | ||
title: '1.', | ||
content: ( | ||
<Link href="https://msi.mju.ac.kr/servlet/security/MySecurityStart" target="_blank"> | ||
<span className="text-primary">MyiWeb MSI</span>์ ์ ์ ํ ๋ก๊ทธ์ธ(PCํ๊ฒฝ ๊ถ์ฅ) | ||
</Link> | ||
), | ||
}, | ||
{ | ||
imageUrl: upload1, | ||
title: '2.', | ||
content: '์ข์ธก ์ฑ์ /์กธ์ ๋ฉ๋ด โ ์ฑ์ ํ(์๋ด์ฉ,B4)ํด๋ฆญ', | ||
}, | ||
{ | ||
imageUrl: upload2, | ||
title: '3.', | ||
content: '์ฐ์ธก ์๋จ ์กฐํ๋ฒํผ ํด๋ฆญ โ ํ๋ฆฐํธ ์์ด์ฝ ํด๋ฆญ (๋ชจ๋ฐ์ผ ํ๊ฒฝ์์๋ ๋จ์ง ์์ ์ ์์ต๋๋ค.)', | ||
}, | ||
{ | ||
imageUrl: upload3, | ||
title: '4.', | ||
content: '์ธ์ ์ ๋ณด์ ๋์(PDF๋ก ์ ์ฅ) ์ค์ โ ํ๋จ ์ ์ฅ ๋ฒํผ ํด๋ฆญ (๋น์จ์ด ๊นจ์ง์ง ์๋๋ก ์กฐ์ฌํด์ฃผ์ธ์.)', | ||
}, | ||
{ | ||
imageUrl: upload4, | ||
title: '5.', | ||
content: '์ ์ฅํ ํ์ผ ์ ๋ก๋', | ||
}, | ||
]; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import ImageCard from '@/app/ui/view/molecule/image-card/image-card'; | ||
import TitleBox from '@/app/ui/view/molecule/title-box/title-box'; | ||
import { cn } from '@/app/utils/shadcn/utils'; | ||
import Image from 'next/image'; | ||
import { TUTORIAL_FEATRUE, TUTORIAL_UPLOAD } from './data'; | ||
import ContentContainer from '@/app/ui/view/atom/content-container/content-container'; | ||
|
||
function TutorialPage() { | ||
return ( | ||
<ContentContainer className={cn('flex flex-col gap-10 p-1 py-10', 'md:gap-20')} size="lg"> | ||
<h1 className={cn('text-center text-xl font-bold', 'md:text-3xl')}>ํํ ๋ฆฌ์ผ</h1> | ||
<p className={cn('w-[90%] m-auto break-keep text-center text-base text-gray-6 font-semibold', 'md:text-2xl')}> | ||
๋ช ์ง์ธ์ ์ํ ์กธ์ ์๊ฑด ์ถฉ์กฑ๋ ํ์ธ ์๋น์ค โ์กธ์ ์๋ถํํดโ ์ ๋๋ค. <br /> | ||
์ฐ๋ฆฌ ์๋น์ค์ ์ฃผ์ ์ ๋ณด์ ์ฌ์ฉ๋ฒ์ ํ์ธํด๋ณด์ธ์ | ||
</p> | ||
<TitleBox title="์ฃผ์ ๊ธฐ๋ฅ"> | ||
<div className="flex gap-2 p-2"> | ||
{TUTORIAL_FEATRUE.map((feature, index) => ( | ||
<Image src={feature.imageUrl} alt={`feature-${index}`} key={index} className="max-w-[32%]" /> | ||
))} | ||
</div> | ||
</TitleBox> | ||
<p className={cn('w-[90%] m-auto break-keep text-center text-base text-gray-6 font-semibold', 'md:text-2xl')}> | ||
์ ๋ณด ์ ๊ณต์ ์ํด์๋ ์ฌ๋ฌ๋ถ์ ์ด์๊ณผ๋ชฉ ์ ๋ณด๊ฐ ํ์ํฉ๋๋ค. | ||
<br /> PDF ์ ๋ก๋๋ฅผ ์งํํด์ฃผ์ธ์. | ||
</p> | ||
<TitleBox title="PDF ํ์ผ ์ ๋ก๋ ๋ฐฉ๋ฒ"> | ||
<div className="flex overflow-scroll gap-8 w-full mt-4"> | ||
{TUTORIAL_UPLOAD.map((feature, index) => ( | ||
<ImageCard | ||
key={index} | ||
image={feature.imageUrl} | ||
title={feature.title} | ||
content={feature.content} | ||
className="min-w-44 h-44 md:min-w-72 md:h-72" | ||
/> | ||
))} | ||
</div> | ||
</TitleBox> | ||
</ContentContainer> | ||
); | ||
} | ||
|
||
export default TutorialPage; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ a { | |
|
||
::-webkit-scrollbar { | ||
width: 10px; | ||
height: 10px; | ||
} | ||
|
||
::-webkit-scrollbar-track { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,16 @@ export default function useDialog(key: DialogKey, onClose?: () => void) { | |
setOpenDialogList([key, true]); | ||
}; | ||
|
||
const close = () => { | ||
setOpenDialogList([key, false]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. onclose callback ํธ์ถ์ด ํ์ํฉ๋๋ค |
||
}; | ||
|
||
const toggle = () => { | ||
const prevState = isOpenDialogList[key]; | ||
setOpenDialogList([key, !prevState]); | ||
|
||
if (prevState) onClose?.(); | ||
}; | ||
|
||
return { isOpen, open, toggle }; | ||
return { isOpen, open, toggle, close }; | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์ ๊ฐ ๊ณตํต ์ปดํฌ๋ํธ ์คํ ๋ฆฌ๋ถ ๋ฌธ์ํ๋ฅผ ์งํํ๋๋ฐ, ์ฐธ๊ณ ํด์ ์กฐ๊ธ ๋ ์์ฑํด์ฃผ์ค ์ ์๋์?? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PR์๋ ์์ฑํ๋๋ฐ, ์คํ ๋ฆฌ๋ถ ๋ฌธ์ํ๋ ๋ค๋ฅธ ํ์ผ๋ค ๋ณ๊ฒฝ๊ณผ ๊ฐ์ PR๋ก ๋ฌถ์ด์ ์งํํ๊ฒ ์ต๋๋ค! |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import feature1 from '@/public/assets/tutorial/tutorial-feature1.png'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import ImageCard, { ImageCardProps } from './image-card'; | ||
|
||
const meta = { | ||
title: 'ui/view/molecule/ImageCard', | ||
component: ImageCard, | ||
} as Meta<typeof ImageCard>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = { | ||
args: { | ||
image: feature1, | ||
title: 'first', | ||
content: '๊ฐ์ ์ปค์คํ ์ ํตํ ์กธ์ ์ฌ์ ์์ธก', | ||
}, | ||
render: (args: ImageCardProps) => <ImageCard {...args} />, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { cn } from '@/app/utils/shadcn/utils'; | ||
import Image, { StaticImageData } from 'next/image'; | ||
|
||
export interface ImageCardProps { | ||
image: StaticImageData; | ||
title: string; | ||
content: React.ReactNode; | ||
className?: string; | ||
} | ||
|
||
function ImageCard({ image, title, content, className }: ImageCardProps) { | ||
return ( | ||
<div className={cn('flex flex-col gap-2', 'md:gap-4')}> | ||
<Image src={image} alt={title} className={className} /> | ||
<h5 className={cn('font-lg font-medium', 'md:text-2xl')}>{title}</h5> | ||
<p className={cn('text-xs', 'md:text-base')}>{content}</p> | ||
</div> | ||
); | ||
} | ||
|
||
export default ImageCard; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import TitleBox from './title-box'; | ||
import AnnounceMessageBox from '../announce-message-box/announce-massage-box'; | ||
|
||
const meta = { | ||
title: 'ui/view/molecule/TitleBox', | ||
component: TitleBox, | ||
} as Meta<typeof TitleBox>; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
interface TitleBoxProps extends React.PropsWithChildren { | ||
title: string; | ||
} | ||
|
||
export const Default: Story = { | ||
args: { | ||
children: <AnnounceMessageBox message="ํด๋น ํํธ์ ์กธ์ ์๊ฑด์ ์ถฉ์กฑํ์ จ์ต๋๋ค!" />, | ||
title: '์กธ์ ์๊ฑด ์๋ด', | ||
}, | ||
render: (args: TitleBoxProps) => <TitleBox {...args} />, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { cn } from '@/app/utils/shadcn/utils'; | ||
|
||
function TitleBox({ title, children }: React.PropsWithChildren<{ title: string }>) { | ||
return ( | ||
<div className="flex flex-col justify-center items-center gap-4"> | ||
<h1 className={cn('text-lg font-bold', 'md:text-2xl')}>{title}</h1> | ||
<div className="bg-primary h-1 w-10 text-center rounded-md"></div> | ||
{children} | ||
</div> | ||
); | ||
} | ||
|
||
export default TitleBox; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
importํ ์ด๋ฆ์ด upload์ธ ์ด์ ๊ฐ ์๋์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upload file image๋ผ์ upload๋ผ๊ณ ์์ฑํ๋๋ฐ, ์ค๋ช ์ด ๋ถ์กฑํ ๊ฒ ๊ฐ๋ค์ ์์ ์งํํ๊ฒ ์ต๋๋ค ๊ฐ์ฌํฉ๋๋ค !