Skip to content
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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @ghdtjgus76 @eugene028 @hamo-o @SeieunYoo
* @eugene028 @hamo-o @SeieunYoo @soulchicken
63 changes: 62 additions & 1 deletion apps/wow-docs/app/component/page.tsx
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: "컴포넌트",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3;
한글로 직역해서 '컴포넌트' / '파운데이션'이렇게 적으면 조금 어색해보이기도 하고, 코드 관련된 것은 영어로 검색하는 경우가 많으니
영어로 Component <- 요렇게 적는게 더 좋을 것 같기도 해요!

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%",
});
5 changes: 0 additions & 5 deletions apps/wow-docs/app/constants/routePath.ts

This file was deleted.

93 changes: 93 additions & 0 deletions apps/wow-docs/app/foundation/graphic/page.tsx
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p5;
단순한 스타일이긴 하지만,, 엄청나게 반복될 것이 예상되어 요것도 컴포넌트로 따로 빼면 어떨까 합니다! (내용물 children으로 받는 형식)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋아요!! Card 라는 컴포넌트로 분리했습니다 e36f808


const imageStyle = css({
width: "100%",
});
54 changes: 53 additions & 1 deletion apps/wow-docs/app/foundation/page.tsx
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",
});
9 changes: 9 additions & 0 deletions apps/wow-docs/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,12 @@ body {
flex-direction: row;
min-height: 100vh;
}

::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-thumb {
background-color: #c1c1c1;
border-radius: 10px;
}
36 changes: 34 additions & 2 deletions apps/wow-docs/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ({
Expand All @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2;
positionrelative이기 때문에 left 속성이 안먹는 것 같아용!
지금 main 태그 안에 존재하는 레이아웃 스타일이 조금 틀어져서 전반적으로 가운데 정렬이 안맞는 것 같은데,

아래와 같이 스타일 바꿔보면 조금 더 좋아질 것 같아요.

Suggested change
<styled.main
height="100vh"
left="180px"
padding="70px 102px 0 101px"
position="relative"
<styled.main
height="100vh"
padding="70px 102px 0 101px"
position="relative"
width="100%"
margin-left="250px"
>

width="100vw"
width="calc(100vw - 250px)"
>
{children}
</styled.main>
Expand Down
4 changes: 2 additions & 2 deletions apps/wow-docs/app/overview/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ const OverviewPage = () => {
활용되는 가이드라인으로 구성함으로써 편의성과 확장성을 가지고 있어요.
</Text>
<Space height={60} />
<Link className={linkTextStyle} href={routePath.foundation}>
<Link className={linkTextStyle} href={routePath.foundation.base}>
Foundation
<RightArrow />
</Link>
<Space height={42} />
<Link className={linkTextStyle} href={routePath.component}>
<Link className={linkTextStyle} href={routePath.component.base}>
Component
<RightArrow />
</Link>
Expand Down
13 changes: 13 additions & 0 deletions apps/wow-docs/app/robots.ts
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}`,
};
}
27 changes: 27 additions & 0 deletions apps/wow-docs/app/sitemap.ts
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,
];
}
15 changes: 15 additions & 0 deletions apps/wow-docs/components/Card.tsx
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",
});
2 changes: 1 addition & 1 deletion apps/wow-docs/components/NavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const NavItem = ({ href, icon: Icon, alt, label, children }: NavItemProps) => {
: "inactive",
})}
>
<Text as="div" style={{ padding: "11px 36px" }} typo="body1">
<Text as="div" style={{ paddingLeft: "22px" }} typo="body1">
{child.label}
</Text>
</Link>
Expand Down
Loading