-
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
layout/#31 #32
layout/#31 #32
Changes from 5 commits
97d105d
1bd0de8
ddb3728
d3b9e5b
f0e3675
8d96cc8
56b05eb
e3eec71
e9d20d6
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,10 @@ | ||
import Template from '../../ui/view/atom/template'; | ||
|
||
export default function Page() { | ||
return ( | ||
<Template className="flex flex-col items-center gap-8"> | ||
<div>์์1</div> | ||
<div>์์2</div> | ||
</Template> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Image from 'next/image'; | ||
import NavigationBar from '../ui/view/molecule/navigation-bar'; | ||
interface LayoutProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
function Layout({ children }: LayoutProps) { | ||
return ( | ||
<> | ||
<Image | ||
src="/assets/background.png" | ||
width={800} | ||
height={288} | ||
className="w-full bg-white h-[18rem]" | ||
alt="background" | ||
/> | ||
<div className="flex justify-center">{children}</div> | ||
</> | ||
); | ||
} | ||
|
||
export default Layout; |
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. [comment]
https://nextjs.org/docs/getting-started/project-structure#routing-files 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. content๋ฅผ ๋ด๋ box๋ฅผ ๋ณ๊ฐ์ ์ปดํฌ๋ํธ๋ก ์์ฑํ๋ ค๊ณ ํ์ต๋๋ค. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { twMerge } from 'tailwind-merge'; | ||
|
||
interface TemplateProps { | ||
children: React.ReactNode; | ||
size?: 'md' | 'lg'; | ||
className?: string; | ||
} | ||
|
||
export default function Template({ children, size = 'md', className }: TemplateProps) { | ||
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. Template๋ณด๋ค content layout์ด๋ผ๋ ์ด๋ฆ์ด ๋ ์ ํฉํ์ง ์์๊น์!? ๋ํ atom ํด๋์ ์๋ ๊ฒ ์ ํฉํ ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค! 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. layout๋ณด๋ค๋ container์ ๊ฐ๊น๋ค๋ ์๊ฐ์ด ๋ค์ด์ 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. ๊ณตํต ์ปดํฌ๋ํธ๋ณด๋ค layout ๊ฐ๋ ์ ๋ ๊ฐ๊น์ง ์์๊น ์๊ฐ์ ํ์๋๋ฐ ์ ํฌ๊ฐ ์ ์ํ atom ๋จ์๊ฐ ๋ ์ด์ ์ชผ๊ฐค ์ ์๋ ๋์์ธ์ ์ต์ ๋จ์๋ผ๋ฉด ํฌ๊ฒ ์๊ด ์์ ๊ฒ ๊ฐ์ต๋๋ค~! |
||
return ( | ||
<div | ||
className={twMerge( | ||
'absolute bg-white top-[7rem] z-10 rounded-xl p-[1.5rem] shadow-lg max-md:w-full', | ||
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. z-index๊ฐ ๋ฌด๋ถ๋ณํ๊ฒ ์ฌ์ฉ๋ ์ ์๋ ๊ฑธ ๋ฐฉ์งํ๊ธฐ ์ํด ์ ๋ ์ข ์ ๋ฆฌํ๋ ํธ์ธ๋ฐ tailwind config์ ์ด๋ ๊ฒ ์ ๋ฆฌํด๋ ์ข์ ๊ฒ ๊ฐ์์~!
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. ์ข์ ๋ฐฉ์์ธ ๊ฒ ๊ฐ์์ ์ ์ฉํด๋ณด๊ฒ ์ต๋๋ค ๐ |
||
size === 'md' ? 'md:w-[70%]' : 'md:w-[80%]', | ||
className, | ||
)} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Image from 'next/image'; | ||
|
||
export default function NavigationBar() { | ||
return ( | ||
<div className="absolute p-4 border-b-[1px] w-full"> | ||
<Image | ||
className="md:h-10 h-7 w-[110px] md:w-[150px]" | ||
width={150} | ||
height={100} | ||
src="/assets/logo.svg" | ||
alt="main-logo" | ||
/> | ||
</div> | ||
); | ||
} |
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.
[request change]
// ์ฐธ๊ณ
https://nextjs.org/docs/app/building-your-application/optimizing/images#local-images