-
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.
Merge pull request #5 from cmg8431/feature/4-common
feat: 공통 layouts 및 components 추가
- Loading branch information
Showing
169 changed files
with
3,926 additions
and
111 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
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+166 KB
.yarn/cache/@fortawesome-fontawesome-common-types-npm-6.4.0-8174465a2e-a9b79136ca.zip
Binary file not shown.
Binary file added
BIN
+89 KB
.yarn/cache/@fortawesome-fontawesome-svg-core-npm-6.4.0-bc7699426e-5d4e6c15f8.zip
Binary file not shown.
Binary file added
BIN
+355 KB
.yarn/cache/@fortawesome-free-regular-svg-icons-npm-6.4.0-2f59fc26d1-a52689349b.zip
Binary file not shown.
Binary file added
BIN
+2.62 MB
.yarn/cache/@fortawesome-free-solid-svg-icons-npm-6.4.0-be633fc4ad-efdd168862.zip
Binary file not shown.
Binary file added
BIN
+13.5 KB
.yarn/cache/@fortawesome-react-fontawesome-npm-0.2.0-a36215138f-f652a0c217.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+17.5 KB
.yarn/cache/@motionone-animation-npm-10.15.1-f581cc96f3-75b7a1e6c4.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+31.8 KB
.yarn/cache/@motionone-generators-npm-10.15.1-9b31cd017c-0eb6797a64.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.58 KB
.yarn/cache/character-entities-html4-npm-2.1.0-ff9355188e-7034aa7c7f.zip
Binary file not shown.
Binary file added
BIN
+4.72 KB
.yarn/cache/character-entities-legacy-npm-3.0.0-ba39d6d541-7582af055c.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.64 KB
.yarn/cache/character-reference-invalid-npm-2.0.1-edca9dd17a-98d3b1a52a.zip
Binary file not shown.
Binary file added
BIN
+5.1 KB
.yarn/cache/comma-separated-tokens-npm-2.0.3-a4a34086b3-e3bf9e0332.zip
Binary file not shown.
Binary file added
BIN
+5.54 KB
.yarn/cache/decode-named-character-reference-npm-1.0.2-db17a755fd-f4c71d3b93.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+8.08 KB
.yarn/cache/estree-util-attach-comments-npm-2.1.1-872c177a8a-c5c2c41c9a.zip
Binary file not shown.
Binary file added
BIN
+12.9 KB
.yarn/cache/estree-util-build-jsx-npm-2.2.2-c3f1420348-d008ac36a4.zip
Binary file not shown.
Binary file added
BIN
+8.69 KB
.yarn/cache/estree-util-is-identifier-name-npm-2.1.0-2b8df71baf-cab317a071.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.02 KB
.yarn/cache/mdast-util-definitions-npm-5.1.2-45a5b0f1bf-2544daccab.zip
Binary file not shown.
Binary file added
BIN
+27.7 KB
.yarn/cache/mdast-util-from-markdown-npm-1.3.0-9951643d9b-cc971d1ad3.zip
Binary file not shown.
Binary file added
BIN
+8.81 KB
.yarn/cache/mdast-util-mdx-expression-npm-1.3.2-0cd3362efc-e4c90f26de.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+71.7 KB
.yarn/cache/mdast-util-to-markdown-npm-1.5.0-43c48b6c48-64338eb33e.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+69.3 KB
.yarn/cache/micromark-core-commonmark-npm-1.0.6-fad8e6e27b-4b483c4607.zip
Binary file not shown.
Binary file added
BIN
+11.3 KB
.yarn/cache/micromark-extension-mdx-expression-npm-1.0.4-1560d6bb9c-d19a31f981.zip
Binary file not shown.
Binary file added
BIN
+24.3 KB
.yarn/cache/micromark-extension-mdx-jsx-npm-1.0.3-6fc8150033-1a5566890a.zip
Binary file not shown.
Binary file added
BIN
+4.22 KB
.yarn/cache/micromark-extension-mdx-md-npm-1.0.0-4482adfb24-b4f205e1d5.zip
Binary file not shown.
Binary file added
BIN
+11.7 KB
.yarn/cache/micromark-extension-mdxjs-esm-npm-1.0.3-61f0769b16-7560746563.zip
Binary file not shown.
Binary file added
BIN
+4.91 KB
.yarn/cache/micromark-extension-mdxjs-npm-1.0.0-d2b6b69e4a-ba836c6d2d.zip
Binary file not shown.
Binary file added
BIN
+5.55 KB
.yarn/cache/micromark-factory-destination-npm-1.0.0-ead4af0386-8e733ae9c1.zip
Binary file not shown.
Binary file added
BIN
+5.44 KB
.yarn/cache/micromark-factory-label-npm-1.0.2-aa46281fdc-957e9366bd.zip
Binary file not shown.
Binary file added
BIN
+8.43 KB
.yarn/cache/micromark-factory-mdx-expression-npm-1.0.7-1d3e097e6d-e7893f2157.zip
Binary file not shown.
Binary file added
BIN
+4.64 KB
.yarn/cache/micromark-factory-space-npm-1.0.0-e5fee5c60c-70d3aafde4.zip
Binary file not shown.
Binary file added
BIN
+5.11 KB
.yarn/cache/micromark-factory-title-npm-1.0.2-3739fc0d5d-9a9cf66bab.zip
Binary file not shown.
Binary file added
BIN
+4.41 KB
.yarn/cache/micromark-factory-whitespace-npm-1.0.0-ea665f7a7c-0888386e6e.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+12.3 KB
.yarn/cache/micromark-util-character-npm-1.1.0-fe6b5d2ff8-504a4e3321.zip
Binary file not shown.
Binary file added
BIN
+6.06 KB
.yarn/cache/micromark-util-chunked-npm-1.0.0-456e2b513f-c1efd56e8c.zip
Binary file not shown.
Binary file added
BIN
+4.8 KB
.yarn/cache/micromark-util-classify-character-npm-1.0.0-68787d9dc2-180446e6a1.zip
Binary file not shown.
Binary file added
BIN
+3.82 KB
.yarn/cache/micromark-util-combine-extensions-npm-1.0.0-f13e57de5b-5304a820ef.zip
Binary file not shown.
Binary file added
BIN
+4.91 KB
...che/micromark-util-decode-numeric-character-reference-npm-1.0.0-68686444bf-f3ae2bb582.zip
Binary file not shown.
Binary file added
BIN
+4.73 KB
.yarn/cache/micromark-util-decode-string-npm-1.0.2-6aaf8c3c42-2dbb41c969.zip
Binary file not shown.
Binary file added
BIN
+3.07 KB
.yarn/cache/micromark-util-encode-npm-1.0.1-53c61ae1ae-9290583abf.zip
Binary file not shown.
Binary file added
BIN
+10.6 KB
.yarn/cache/micromark-util-events-to-acorn-npm-1.2.1-ad9f9cea32-baf1cad66d.zip
Binary file not shown.
Binary file added
BIN
+4.06 KB
.yarn/cache/micromark-util-html-tag-name-npm-1.1.0-a218ca069f-a9b783cec8.zip
Binary file not shown.
Binary file added
BIN
+4.54 KB
.yarn/cache/micromark-util-normalize-identifier-npm-1.0.0-79f4e82268-d7c09d5e83.zip
Binary file not shown.
Binary file added
BIN
+3.68 KB
.yarn/cache/micromark-util-resolve-all-npm-1.0.0-cb1a6324ae-409667f2bd.zip
Binary file not shown.
Binary file added
BIN
+7.21 KB
.yarn/cache/micromark-util-sanitize-uri-npm-1.1.0-4389b68137-fe6093faa0.zip
Binary file not shown.
Binary file added
BIN
+7.25 KB
.yarn/cache/micromark-util-subtokenize-npm-1.0.2-9d0d437340-c32ee58a7e.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+4.35 KB
.yarn/cache/space-separated-tokens-npm-2.0.2-b7ff42c9c6-202e97d7ca.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+5.84 KB
.yarn/cache/unist-util-position-from-estree-npm-1.1.2-2c54b9b445-e3f4060e2a.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.14 KB
.yarn/cache/unist-util-remove-position-npm-4.0.2-5806d5548a-989831da91.zip
Binary file not shown.
Binary file added
BIN
+6.49 KB
.yarn/cache/unist-util-stringify-position-npm-3.0.3-3ab0818239-dbd66c1518.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+13.1 KB
.yarn/cache/unist-util-visit-parents-npm-5.1.3-3b6b34d916-8ecada5978.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,7 +1,16 @@ | ||
/** @type {import('next').NextConfig} */ | ||
const nextConfig = { | ||
reactStrictMode: true, | ||
pageExtensions: ['tsx'], | ||
}; | ||
|
||
module.exports = nextConfig; | ||
const withMDX = require('@next/mdx')({ | ||
extension: /\.mdx?$/, | ||
}); | ||
|
||
module.exports = withMDX({ | ||
pageExtensions: ['tsx', 'md', 'mdx'], | ||
experimental: { | ||
scrollRestoration: true, | ||
}, | ||
webpack: (config, { isServer }) => { | ||
if (!isServer) config.resolve.fallback.fs = false; | ||
return config; | ||
}, | ||
}); |
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
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 @@ | ||
export { default as GiphyGIF } from './giphy.gif'; |
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,2 @@ | ||
export * from './gif'; | ||
export * from './png'; |
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 @@ | ||
export { default as ProfilePNG } from './profile.png'; |
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,64 @@ | ||
import Image from 'next/image'; | ||
|
||
import { Variants } from 'framer-motion'; | ||
|
||
import * as S from './styled'; | ||
|
||
type ButtonThemeType = 'default'; | ||
|
||
interface ButtonProps extends React.ComponentProps<typeof S.ButtonElement> { | ||
icon?: string; | ||
loading?: boolean; | ||
disabled?: boolean; | ||
fullWidth?: boolean; | ||
interval?: boolean; | ||
theme?: ButtonThemeType; | ||
size?: 'sm' | 'md' | 'lg'; | ||
children?: React.ReactNode; | ||
} | ||
|
||
export const Button = ({ | ||
icon, | ||
loading = false, | ||
disabled = false, | ||
fullWidth = false, | ||
theme = 'default', | ||
size = 'lg', | ||
...props | ||
}: ButtonProps) => { | ||
const getButtonVariants = (disabled: boolean): Variants => { | ||
if (disabled) return {}; | ||
return { | ||
hover: { | ||
scale: 1.03, | ||
transition: { | ||
duration: 0.15, | ||
}, | ||
}, | ||
tap: { | ||
scale: 0.97, | ||
opacity: 0.65, | ||
transition: { | ||
duration: 0.15, | ||
}, | ||
}, | ||
}; | ||
}; | ||
|
||
return ( | ||
<S.ButtonElement | ||
type="button" | ||
size={size} | ||
fw={fullWidth} | ||
theme={theme} | ||
disabled={disabled} | ||
whileHover="hover" | ||
whileTap="tap" | ||
variants={getButtonVariants(disabled)} | ||
{...props} | ||
> | ||
{icon && <Image src={icon} alt={''} />} | ||
<p>{loading ? '로딩 중' : props.children}</p> | ||
</S.ButtonElement> | ||
); | ||
}; |
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,53 @@ | ||
import { styled } from '@/stitches.config'; | ||
import { motion } from 'framer-motion'; | ||
|
||
export const ButtonElement = styled(motion.button, { | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
height: '100%', | ||
border: 'none', | ||
borderRadius: '12px', | ||
variants: { | ||
theme: { | ||
default: { | ||
backgroundColor: '$background', | ||
color: '$color', | ||
border: '1px solid $gray-200', | ||
}, | ||
}, | ||
fw: { | ||
true: { | ||
width: '100%', | ||
}, | ||
}, | ||
disabled: { | ||
true: { | ||
opacity: '0.7', | ||
cursor: 'not-allowed', | ||
}, | ||
}, | ||
interval: { | ||
true: { | ||
gap: '10px', | ||
}, | ||
}, | ||
size: { | ||
sm: { | ||
height: '38px', | ||
padding: '0 12px', | ||
fontSize: '$x3', | ||
}, | ||
md: { | ||
height: '46px', | ||
padding: '0 20px', | ||
fontSize: '14px', | ||
}, | ||
lg: { | ||
height: '62px', | ||
padding: '0 24px', | ||
fontSize: '16px', | ||
}, | ||
}, | ||
}, | ||
}); |
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,54 @@ | ||
import { Typo } from '../Typography'; | ||
import * as S from './styled'; | ||
|
||
const SITE_FOOTER_CONTENT = [ | ||
{ | ||
title: '사이트맵', | ||
contents: [ | ||
{ | ||
text: '홈', | ||
href: '/home', | ||
}, | ||
{ | ||
text: '프로필', | ||
href: '/home', | ||
}, | ||
{ | ||
text: '블로그', | ||
href: '/home', | ||
}, | ||
], | ||
}, | ||
]; | ||
|
||
export const Footer = () => { | ||
return ( | ||
<S.FooterWrapper> | ||
<S.FooterContainer> | ||
<div> | ||
{SITE_FOOTER_CONTENT.map((v) => { | ||
return ( | ||
<div> | ||
<div>{v.title}</div> | ||
{v.contents.map((content) => { | ||
return <div>{content.text}</div>; | ||
})} | ||
</div> | ||
); | ||
})} | ||
</div> | ||
<Typo.Detail | ||
style={{ | ||
color: 'var(--colors-gray600)', | ||
fontSize: '0.7rem', | ||
textAlign: 'center', | ||
}} | ||
> | ||
Copyright ⓒ 2023 <strong>mingi</strong> All rights reserved. | ||
<br /> Created by <strong>@cmg8431.</strong>Powered By{' '} | ||
<strong>@cmg8431</strong> | ||
</Typo.Detail> | ||
</S.FooterContainer> | ||
</S.FooterWrapper> | ||
); | ||
}; |
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 @@ | ||
import { styled } from '@/stitches.config'; | ||
|
||
export const FooterWrapper = styled('footer', { | ||
width: '100%', | ||
bottom: '0', | ||
left: '0', | ||
borderTop: '1px solid $gray100', | ||
marginTop: '2rem', | ||
}); | ||
|
||
export const FooterContainer = styled('div', { | ||
display: 'flex', | ||
maxWidth: '700px', | ||
padding: '2rem 0rem', | ||
margin: '0 auto', | ||
flexDirection: 'column', | ||
}); |
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,48 @@ | ||
import React from 'react'; | ||
|
||
import { useRouter } from 'next/router'; | ||
|
||
import { IconDefinition } from '@fortawesome/free-solid-svg-icons'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
|
||
import * as S from './styled'; | ||
|
||
export type GlobalNavigationBarMenuType = { | ||
to: string; | ||
icon: IconDefinition; | ||
text: string; | ||
}; | ||
|
||
export interface GlobalNavigationBarProps { | ||
menu: GlobalNavigationBarMenuType[]; | ||
} | ||
|
||
export const GlobalNavigationBar: React.FC<GlobalNavigationBarProps> = ({ | ||
menu, | ||
}) => { | ||
const router = useRouter(); | ||
|
||
const menuItems = menu.map(({ to, icon: Icon, text }) => ({ | ||
to, | ||
Icon, | ||
text, | ||
active: to === router.pathname, | ||
})); | ||
|
||
return ( | ||
<S.GlobalNavigationBarContainer> | ||
<S.GlobalNavigationBarItemListContainer> | ||
{menuItems.map(({ to, Icon, text, active }) => ( | ||
<S.GlobalNavigationItemContainer key={to} href={to}> | ||
<FontAwesomeIcon | ||
icon={Icon} | ||
size="lg" | ||
color={active ? 'var(--colors-gray900)' : 'var(--colors-gray300)'} | ||
/> | ||
<S.ItemText active={active}>{text}</S.ItemText> | ||
</S.GlobalNavigationItemContainer> | ||
))} | ||
</S.GlobalNavigationBarItemListContainer> | ||
</S.GlobalNavigationBarContainer> | ||
); | ||
}; |
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,55 @@ | ||
import Link from 'next/link'; | ||
|
||
import { styled } from '@/stitches.config'; | ||
|
||
export const GlobalNavigationBarContainer = styled('nav', { | ||
width: '100%', | ||
position: 'fixed', | ||
bottom: 0, | ||
left: 0, | ||
right: 0, | ||
maxWidth: '750px', | ||
margin: '0 auto', | ||
borderTop: '1px solid $gray100', | ||
borderRadius: '1.2rem 1.2rem 0 0', | ||
backgroundColor: '$background', | ||
background: 'rgba(255, 255, 255, 0.045)', | ||
backdropFilter: 'blur(5px)', | ||
}); | ||
|
||
export const GlobalNavigationBarItemListContainer = styled('div', { | ||
width: '100%', | ||
display: 'flex', | ||
alignItems: 'flex-start', | ||
justifyContent: 'space-between', | ||
padding: '0.7rem 2rem', | ||
maxWidth: '600px', | ||
margin: '0 auto', | ||
}); | ||
|
||
export const GlobalNavigationItemContainer = styled(Link, { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
textDecoration: 'none', | ||
}); | ||
|
||
export const ItemText = styled('p', { | ||
fontSize: '0.9rem', | ||
fontWeight: 700, | ||
textAlign: 'center', | ||
color: '$color', | ||
marginTop: '0.4rem', | ||
|
||
variants: { | ||
active: { | ||
true: { | ||
color: '$gray900', | ||
}, | ||
false: { | ||
color: '$gray300', | ||
}, | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.