-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[Feat/#8] 공통 레이아웃 설정
- Loading branch information
Showing
10 changed files
with
178 additions
and
20 deletions.
There are no files selected for viewing
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,11 @@ | ||
import HeaderContent from '@/shared/components/HeaderContent'; | ||
import MainContent from '@/shared/components/MainContent'; | ||
|
||
export default function ChatPage() { | ||
return ( | ||
<> | ||
<HeaderContent>{null}</HeaderContent> | ||
<MainContent>{null}</MainContent> | ||
</> | ||
); | ||
} |
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,11 @@ | ||
import HeaderContent from '@/shared/components/HeaderContent'; | ||
import MainContent from '@/shared/components/MainContent'; | ||
|
||
export default function TarotReadingResultPage() { | ||
return ( | ||
<> | ||
<HeaderContent>{null}</HeaderContent> | ||
<MainContent>{null}</MainContent> | ||
</> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
export default function Home() { | ||
return null; | ||
import HeaderContent from '@/shared/components/HeaderContent'; | ||
import MainContent from '@/shared/components/MainContent'; | ||
|
||
export default function HomePage() { | ||
return ( | ||
<> | ||
<HeaderContent>{null}</HeaderContent> | ||
<MainContent>{null}</MainContent> | ||
</> | ||
); | ||
} |
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,58 @@ | ||
'use client'; | ||
|
||
import { ReactNode } from 'react'; | ||
import { css } from 'styled-components'; | ||
|
||
interface HeaderContentProps { | ||
children: ReactNode; | ||
/** | ||
* 시작 부분에 표시할 요소입니다. | ||
*/ | ||
startAction?: ReactNode; | ||
/** | ||
* 끝 부분에 표시할 요소입니다. | ||
*/ | ||
endAction?: ReactNode; | ||
/** | ||
* true일 경우 헤더가 스티키 포지션으로 고정됩니다. (top: 0) | ||
*/ | ||
sticky?: boolean; | ||
/** | ||
* 헤더 구분선 표시 여부 | ||
*/ | ||
divider?: boolean; | ||
} | ||
|
||
export default function HeaderContent({ children, startAction, endAction, sticky, divider }: HeaderContentProps) { | ||
return ( | ||
<> | ||
<header | ||
css={css` | ||
position: relative; | ||
padding: 14px 20px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
${sticky && `position: sticky; top: 0;`} | ||
`} | ||
> | ||
{startAction ? startAction : <span role="presentation" />} | ||
{children} | ||
{endAction ? endAction : <span role="presentation" />} | ||
</header> | ||
{divider && ( | ||
<hr | ||
css={css` | ||
margin: 0; | ||
block-size: 1px; | ||
border: none; | ||
width: 100%; | ||
background-color: ${(props) => props.theme.colors.grey10}; | ||
box-shadow: 0 0 0 100vmax ${(props) => props.theme.colors.grey10}; | ||
clip-path: inset(0px -100vmax); | ||
`} | ||
/> | ||
)} | ||
</> | ||
); | ||
} |
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,17 @@ | ||
'use client'; | ||
|
||
import { ReactNode } from 'react'; | ||
import { css } from 'styled-components'; | ||
|
||
export default function MainContent({ children }: { children: ReactNode }) { | ||
return ( | ||
<main | ||
css={css` | ||
position: relative; | ||
flex: 1; | ||
`} | ||
> | ||
{children} | ||
</main> | ||
); | ||
} |
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,22 @@ | ||
'use client'; | ||
|
||
import { ReactNode } from 'react'; | ||
import { css } from 'styled-components'; | ||
|
||
export default function ResponsiveRootLayout({ children }: { children: ReactNode }) { | ||
return ( | ||
<div | ||
css={css` | ||
margin-inline: auto; | ||
min-height: 100dvh; | ||
display: flex; | ||
flex-direction: column; | ||
@media screen and (min-width: 450px) { | ||
max-width: 600px; | ||
} | ||
`} | ||
> | ||
{children} | ||
</div> | ||
); | ||
} |
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,24 @@ | ||
'use client'; | ||
|
||
import { createGlobalStyle } from 'styled-components'; | ||
|
||
const GlobalStyle = createGlobalStyle` | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
body { | ||
word-break: break-all; | ||
} | ||
button, | ||
input, | ||
select, | ||
textarea { | ||
font-family: inherit; | ||
} | ||
`; | ||
|
||
export default GlobalStyle; |
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