-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Feat] 파운데이션, 컴포넌트, 그래픽 페이지 마크업 #182
base: main
Are you sure you want to change the base?
Changes from all commits
c3056c2
51c40e4
ad8760c
9ed04d3
cd1a227
951247b
e36f808
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 |
---|---|---|
@@ -1 +1 @@ | ||
* @ghdtjgus76 @eugene028 @hamo-o @SeieunYoo | ||
* @eugene028 @hamo-o @SeieunYoo @soulchicken |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,66 @@ | ||
import Space from "@components/Space"; | ||
import Title from "@components/Text/Title"; | ||
import { componentItems } from "@constants/data"; | ||
import { css } from "@styled-system/css"; | ||
import { Grid } from "@styled-system/jsx"; | ||
import type { Metadata } from "next"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
export const metadata: Metadata = { | ||
title: "컴포넌트", | ||
description: "와우 디자인 시스템의 컴포넌트 입니다.", | ||
}; | ||
|
||
const ComponentPage = () => { | ||
return <div>component</div>; | ||
return ( | ||
<> | ||
<Title | ||
main="Component" | ||
sub="컴포넌트는 기능을 수행할 수 있는 최소 단위로,일관된 UI와 효율적인 개발을 위해 사용합니다." | ||
variant="header" | ||
/> | ||
<Space height={68} /> | ||
<Grid gap="22px" gridTemplateColumns="repeat(3, 1fr)"> | ||
{componentItems.map((item) => ( | ||
<Link className={containerStyle} href={item.href} key={item.imageAlt}> | ||
<Image | ||
alt={item.imageAlt} | ||
className={imageStyle} | ||
height={200} | ||
src={item.imageSrc} | ||
width={314} | ||
/> | ||
<Title | ||
className={titleStyle} | ||
main={item.title} | ||
padding="20px" | ||
sub={item.description} | ||
variant="component" | ||
/> | ||
</Link> | ||
))} | ||
</Grid> | ||
<Space height={127} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default ComponentPage; | ||
|
||
const containerStyle = css({ | ||
display: "flex", | ||
flexDirection: "column", | ||
}); | ||
|
||
const titleStyle = css({ | ||
borderRadius: "0 0 8px 8px", | ||
border: "1px solid", | ||
borderColor: "outline", | ||
borderTop: "none", | ||
flex: "auto", | ||
}); | ||
|
||
const imageStyle = css({ | ||
width: "100%", | ||
}); |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
"use client"; | ||
|
||
import Card from "@components/Card"; | ||
import Space from "@components/Space"; | ||
import Text from "@components/Text"; | ||
import Title from "@components/Text/Title"; | ||
import { css } from "@styled-system/css"; | ||
import { Flex } from "@styled-system/jsx"; | ||
import Image from "next/image"; | ||
import Divider from "wowds-ui/Divider"; | ||
|
||
const graphicExampleItems = [ | ||
{ | ||
imageAlt: "graphic-example-1", | ||
imageSrc: "/graphic/graphic-example-1.png", | ||
}, | ||
{ | ||
imageAlt: "graphic-example-2", | ||
imageSrc: "/graphic/graphic-example-2.png", | ||
}, | ||
{ | ||
imageAlt: "graphic-example-3", | ||
imageSrc: "/graphic/graphic-example-3.png", | ||
}, | ||
{ | ||
imageAlt: "graphic-example-4", | ||
imageSrc: "/graphic/graphic-example-4.png", | ||
}, | ||
]; | ||
const GraphicPage = () => { | ||
return ( | ||
<> | ||
<Title | ||
main="Graphic" | ||
sub="그래픽 이미지를 통해 와우 디자인 시스템의 브랜드 아이덴티티를 일관되게 전달합니다." | ||
variant="header" | ||
/> | ||
<Space height={68} /> | ||
<Text as="h2" typo="display2WebPage"> | ||
Theme | ||
</Text> | ||
<Space height={4} /> | ||
<Text as="h2" color="sub" typo="body1"> | ||
GDSC의 메인 색상을 활용하여 매트하고 깔끔한 조형들을 활용해요. <br /> | ||
언제든지 테마에 어울리는 그래픽을 제작하여 응용할 수 있어요. | ||
</Text> | ||
<Space height={40} /> | ||
<Card> | ||
<Image | ||
alt={graphicExampleItems[0]?.imageAlt as string} | ||
className={imageStyle} | ||
height={572} | ||
src={graphicExampleItems[0]?.imageSrc as string} | ||
width={908} | ||
/> | ||
</Card> | ||
<Space height={40} /> | ||
<Divider /> | ||
<Space height={40} /> | ||
<Text as="h2" typo="display2WebPage"> | ||
Example | ||
</Text> | ||
<Space height={40} /> | ||
<div className={containerStyle}> | ||
<Flex flexDirection="column" gap="40px"> | ||
{graphicExampleItems.slice(1).map((item) => ( | ||
<Image | ||
alt={item.imageAlt} | ||
className={imageStyle} | ||
height={572} | ||
key={item.imageAlt} | ||
src={item.imageSrc} | ||
width={908} | ||
/> | ||
))} | ||
</Flex> | ||
</div> | ||
<Space height={80} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default GraphicPage; | ||
|
||
const containerStyle = css({ | ||
backgroundColor: "backgroundAlternative", | ||
borderRadius: "sm", | ||
padding: "32px 40px", | ||
}); | ||
Comment on lines
+85
to
+89
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. p5; 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. 좋아요!! Card 라는 컴포넌트로 분리했습니다 e36f808 |
||
|
||
const imageStyle = css({ | ||
width: "100%", | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,57 @@ | ||
import Space from "@components/Space"; | ||
import Title from "@components/Text/Title"; | ||
import { foundationItems } from "@constants/data"; | ||
import { css } from "@styled-system/css"; | ||
import { Flex, Grid } from "@styled-system/jsx"; | ||
import type { Metadata } from "next"; | ||
import Image from "next/image"; | ||
import Link from "next/link"; | ||
|
||
export const metadata: Metadata = { | ||
title: "파운데이션", | ||
description: "와우 디자인 시스템의 파운데이션입니다.", | ||
}; | ||
|
||
const FoundationPage = () => { | ||
return <div>f</div>; | ||
return ( | ||
<> | ||
<Title | ||
main="Foundation" | ||
sub="파운데이션은 가장 기초적인 디자인 요소로, 일관된 디자인을 위해 다음의 규칙에 맞게 사용합니다" | ||
variant="header" | ||
/> | ||
<Space height={68} /> | ||
<Grid gap="22px" gridTemplateColumns="repeat(2, 1fr)"> | ||
{foundationItems.map((item) => ( | ||
<Link className={containerStyle} href={item.href} key={item.imageAlt}> | ||
<Flex> | ||
<Title | ||
justifyContent="end" | ||
main={item.title} | ||
padding="20px" | ||
sub={item.description} | ||
variant="component" | ||
/> | ||
|
||
<Image | ||
alt={item.imageAlt} | ||
height={200} | ||
src={item.imageSrc} | ||
width={200} | ||
/> | ||
</Flex> | ||
</Link> | ||
))} | ||
</Grid> | ||
<Space height={127} /> | ||
</> | ||
); | ||
}; | ||
|
||
export default FoundationPage; | ||
|
||
const containerStyle = css({ | ||
borderRadius: "8px", | ||
border: "1px solid", | ||
borderColor: "outline", | ||
}); |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,8 +5,39 @@ import { styled } from "@styled-system/jsx"; | |||||||||||||||||||||||||
import type { Metadata } from "next"; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
export const metadata: Metadata = { | ||||||||||||||||||||||||||
title: "와우 디자인 시스템", | ||||||||||||||||||||||||||
title: { default: "와우 디자인 시스템", template: "%s | 와우 디자인 시스템" }, | ||||||||||||||||||||||||||
description: "GDSC Hongik 디자인 시스템", | ||||||||||||||||||||||||||
verification: { | ||||||||||||||||||||||||||
google: process.env.NEXT_PUBLIC_GOOGLE_CONSOLE_KEY, | ||||||||||||||||||||||||||
other: { | ||||||||||||||||||||||||||
"naver-site-verification": | ||||||||||||||||||||||||||
process.env.NEXT_PUBLIC_NAVER_CONSOLE_KEY ?? "", | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
openGraph: { | ||||||||||||||||||||||||||
title: "와우 디자인 시스템", | ||||||||||||||||||||||||||
description: "GDSC Hongik 디자인 시스템", | ||||||||||||||||||||||||||
images: ["/images/og-image.png"], | ||||||||||||||||||||||||||
siteName: "와우 디자인 시스템", | ||||||||||||||||||||||||||
type: "website", | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
twitter: { | ||||||||||||||||||||||||||
card: "summary_large_image", | ||||||||||||||||||||||||||
title: "와우 디자인 시스템", | ||||||||||||||||||||||||||
description: "GDSC Hongik 디자인 시스템", | ||||||||||||||||||||||||||
images: ["/images/og-image.png"], | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
icons: { | ||||||||||||||||||||||||||
icon: "/images/logo.svg", | ||||||||||||||||||||||||||
apple: "/images/logo.svg", | ||||||||||||||||||||||||||
other: [ | ||||||||||||||||||||||||||
{ | ||||||||||||||||||||||||||
rel: "icon", | ||||||||||||||||||||||||||
type: "image/svg+xml", | ||||||||||||||||||||||||||
url: "/images/logo.svg", | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
], | ||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||
}; | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
const RootLayout = ({ | ||||||||||||||||||||||||||
|
@@ -20,9 +51,10 @@ const RootLayout = ({ | |||||||||||||||||||||||||
<Sidebar /> | ||||||||||||||||||||||||||
<styled.main | ||||||||||||||||||||||||||
height="100vh" | ||||||||||||||||||||||||||
left="180px" | ||||||||||||||||||||||||||
padding="70px 102px 0 101px" | ||||||||||||||||||||||||||
position="relative" | ||||||||||||||||||||||||||
Comment on lines
52
to
56
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. P2; 아래와 같이 스타일 바꿔보면 조금 더 좋아질 것 같아요.
Suggested change
|
||||||||||||||||||||||||||
width="100vw" | ||||||||||||||||||||||||||
width="calc(100vw - 250px)" | ||||||||||||||||||||||||||
> | ||||||||||||||||||||||||||
{children} | ||||||||||||||||||||||||||
</styled.main> | ||||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { PRDOUCTION_URL } from "@constants/routePath"; | ||
import type { MetadataRoute } from "next"; | ||
|
||
export default function robots(): MetadataRoute.Robots { | ||
return { | ||
rules: { | ||
userAgent: "*", | ||
allow: "/", | ||
}, | ||
sitemap: `${PRDOUCTION_URL}/sitemap.xml`, | ||
host: `${PRDOUCTION_URL}`, | ||
}; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { PRDOUCTION_URL, routePath } from "@constants/routePath"; | ||
import type { MetadataRoute } from "next"; | ||
|
||
export default function sitemap(): MetadataRoute.Sitemap { | ||
const foundationRoutes = Object.values(routePath.foundation).map((path) => ({ | ||
url: `${PRDOUCTION_URL}${path}`, | ||
lastModified: new Date().toISOString().split("T")[0], | ||
})); | ||
|
||
const componentRoutes = Object.values(routePath.component).map((path) => ({ | ||
url: `${PRDOUCTION_URL}${path}`, | ||
lastModified: new Date().toISOString().split("T")[0], | ||
})); | ||
|
||
return [ | ||
{ | ||
url: `${PRDOUCTION_URL}`, | ||
lastModified: new Date().toISOString().split("T")[0], | ||
}, | ||
{ | ||
url: `${PRDOUCTION_URL}${routePath.overview}`, | ||
lastModified: new Date().toISOString().split("T")[0], | ||
}, | ||
...foundationRoutes, | ||
...componentRoutes, | ||
]; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { css } from "@styled-system/css"; | ||
import type { PropsWithChildren } from "react"; | ||
|
||
interface CardProps extends PropsWithChildren {} | ||
const Card = ({ children }: CardProps) => { | ||
return <div className={containerStyle}>{children}</div>; | ||
}; | ||
|
||
export default Card; | ||
|
||
const containerStyle = css({ | ||
backgroundColor: "backgroundAlternative", | ||
borderRadius: "sm", | ||
padding: "32px 40px", | ||
}); |
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.
P3;
한글로 직역해서 '컴포넌트' / '파운데이션'이렇게 적으면 조금 어색해보이기도 하고, 코드 관련된 것은 영어로 검색하는 경우가 많으니
영어로
Component
<- 요렇게 적는게 더 좋을 것 같기도 해요!