Skip to content

Commit 9a394d2

Browse files
authored
Merge pull request #237 from forestream/feat-landing
Feat landing
2 parents 5dc4282 + bffa7dc commit 9a394d2

File tree

54 files changed

+1674
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1674
-260
lines changed

README.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,31 +82,28 @@ Devup UI is a CSS in JS preprocessor that does not require runtime.
8282
Devup UI eliminates the performance degradation of the browser through the CSS in JS preprocessor.
8383
We develop a preprocessor that considers all grammatical cases.
8484

85-
```jsx
86-
// Before
87-
<Box bg={"red"}/>
88-
// After
89-
<Box className={"d0"}/>
85+
```typescript
86+
const before = <Box bg={"red"}/>
87+
88+
const after = <div className="d0"/>
9089
```
9190

9291
Variables are fully supported.
9392

94-
```jsx
95-
// Before
96-
<Box bg={colorVariable}/>
97-
// After
98-
<Box className={"d0"} style={{
93+
```typescript
94+
const before = <Box bg={colorVariable}/>
95+
96+
const after = <div className="d0" style={{
9997
"--d0": colorVariable
10098
}}/>
10199
```
102100

103101
Various expressions and responsiveness are also fully supported.
104102

105-
```jsx
106-
// Before
107-
<Box bg={["red", "blue", a > b ? "yellow" : variable]}/>
108-
// After
109-
<Box className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
103+
```typescript
104+
const before = <Box bg={["red", "blue", a > b ? "yellow" : variable]}/>
105+
106+
const after = <div className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
110107
"--d2": variable
111108
}}/>
112109
```
@@ -130,7 +127,7 @@ Support Theme with Typing
130127
}
131128
```
132129

133-
```jsx
130+
```typescript
134131
// Type Safe
135132
<Text color="$text"/>
136133
```
@@ -139,11 +136,10 @@ Support Responsive And Pseudo Selector
139136

140137
You can use responsive and pseudo selector.
141138

142-
```jsx
139+
```typescript
143140
// Responsive with Selector
144-
<Box _hover={{bg: ["red", "blue"]}}/>
141+
const box = <Box _hover={{bg: ["red", "blue"]}}/>
145142

146143
// Same
147-
<Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
148-
144+
const box = <Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
149145
```

README_ko.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -82,31 +82,28 @@ Devup UI는 런타임이 필요 없는 CSS in JS 전처리기입니다.
8282
Devup UI는 CSS in JS 전처리기를 통하여 브라우저의 성능 저하를 원천적으로 제거합니다.
8383
모든 문법적 경우의 수를 고려하여 전처리기를 개발합니다.
8484

85-
```jsx
86-
// Before
87-
<Box bg={"red"}/>
88-
// After
89-
<Box className={"d0"}/>
85+
```typescript
86+
const before = <Box bg={"red"}/>
87+
88+
const after = <div className="d0"/>
9089
```
9190

9291
변수 사용도 완전히 지원합니다.
9392

94-
```jsx
95-
// Before
96-
<Box bg={colorVariable}/>
97-
// After
98-
<Box className={"d0"} style={{
93+
```typescript
94+
const before = <Box bg={colorVariable}/>
95+
96+
const after = <div className="d0" style={{
9997
"--d0": colorVariable
10098
}}/>
10199
```
102100

103101
다양한 표현식과 반응형도 모두 지원합니다.
104102

105-
```jsx
106-
// Before
107-
<Box bg={["red", "blue", a > b ? "yellow" : variable]}/>
108-
// After
109-
<Box className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
103+
```typescript
104+
const before = <Box bg={["red", "blue", a > b ? "yellow" : variable]}/>
105+
106+
const after = <div className={`d0 d1 ${a > b ? "d2" : "d3"}`} style={{
110107
"--d2": variable
111108
}}/>
112109
```
@@ -130,7 +127,7 @@ Devup UI는 CSS in JS 전처리기를 통하여 브라우저의 성능 저하를
130127
}
131128
```
132129

133-
```jsx
130+
```typescript
134131
// Type Safe
135132
<Text color="$text"/>
136133
```
@@ -139,11 +136,10 @@ Devup UI는 CSS in JS 전처리기를 통하여 브라우저의 성능 저하를
139136

140137
물론 동시 사용도 가능합니다.
141138

142-
```jsx
139+
```typescript
143140
// Responsive with Selector
144-
<Box _hover={{bg: ["red", "blue"]}}/>
141+
const box = <Box _hover={{bg: ["red", "blue"]}}/>
145142

146143
// Same
147-
<Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
148-
144+
const box = <Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
149145
```

apps/landing/devup.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"footerText": "#51575F",
3232
"menuHover": "#F6F4FF",
3333
"menuActive": "#EAE8FC",
34-
"captionBold": "#878594",
34+
"captionBold": "#7C7B8E",
3535
"search": "#9C50FF",
3636
"kakaoButton": "#DE9800",
3737
"kakaoButtonHover": "#C98900",
@@ -67,7 +67,7 @@
6767
"footerText": "#FFFFFF",
6868
"menuHover": "#3C404B",
6969
"menuActive": "#283259",
70-
"captionBold": "#878594",
70+
"captionBold": "#9C9BA9",
7171
"search": "#6FA4FF",
7272
"kakaoButton": "#A3740D",
7373
"kakaoButtonHover": "#C98900",
@@ -526,6 +526,14 @@
526526
"fontSize": "12px",
527527
"lineHeight": 1.4,
528528
"letterSpacing": "-0.03em"
529+
},
530+
"bodyBold": {
531+
"fontFamily": "Pretendard",
532+
"fontStyle": "normal",
533+
"fontWeight": 700,
534+
"fontSize": "16px",
535+
"lineHeight": 1.5,
536+
"letterSpacing": "-0.03em"
529537
}
530538
}
531539
}

apps/landing/next.config.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import { DevupUI } from '@devup-ui/next-plugin'
22
import createMDX from '@next/mdx'
3+
import remarkGfm from 'remark-gfm'
34

4-
const withMDX = createMDX({})
5+
const withMDX = createMDX({
6+
options: {
7+
remarkPlugins: [remarkGfm],
8+
},
9+
extension: /\.mdx?$/,
10+
})
511

612
export default withMDX(
713
DevupUI(

apps/landing/package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,31 @@
1111
"lint": "eslint"
1212
},
1313
"dependencies": {
14-
"body-scroll-lock": "3.1.5",
15-
"@devup-ui/react": "workspace:*",
1614
"@devup-ui/components": "workspace:*",
15+
"@devup-ui/react": "workspace:*",
1716
"@mdx-js/loader": "^3.1.0",
1817
"@mdx-js/react": "^3.1.0",
1918
"@next/mdx": "^15.3.4",
2019
"@types/mdx": "^2.0.13",
20+
"body-scroll-lock": "3.1.5",
21+
"clsx": "^2.1.1",
2122
"next": "^15.3.4",
2223
"react": "^19.1.0",
2324
"react-dom": "^19.1.0",
25+
"react-markdown": "8.0.6",
2426
"react-syntax-highlighter": "^15.6.1",
27+
"remark-gfm": "^4.0.1",
2528
"sanitize.css": "^13.0.0"
2629
},
2730
"devDependencies": {
28-
"@types/body-scroll-lock": "^3.1.2",
2931
"@devup-ui/next-plugin": "workspace:*",
32+
"@types/body-scroll-lock": "^3.1.2",
3033
"@types/node": "^24",
3134
"@types/react": "^19",
3235
"@types/react-dom": "^19",
3336
"@types/react-syntax-highlighter": "^15.5.13",
34-
"typescript": "^5",
3537
"glob": "^11.0.3",
36-
"remark": "^15.0.1"
38+
"remark": "^15.0.1",
39+
"typescript": "^5"
3740
}
3841
}

apps/landing/src/app/(detail)/components/Card.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { VStack } from '@devup-ui/react'
22

3-
export default function Card({ children }: { children: React.ReactNode }) {
3+
export default function Card({
4+
children,
5+
className,
6+
...props
7+
}: React.ComponentProps<'div'>) {
48
return (
59
<VStack
610
_active={{
@@ -13,8 +17,11 @@ export default function Card({ children }: { children: React.ReactNode }) {
1317
bg="$containerBackground"
1418
border="1px solid $border"
1519
borderRadius="10px"
20+
className={className}
1621
cursor="pointer"
22+
styleOrder={1}
1723
transition="all 0.2s ease"
24+
{...props}
1825
>
1926
{children}
2027
</VStack>

apps/landing/src/app/(detail)/components/LeftMenu.tsx

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,43 @@ export function LeftMenu() {
88
<MenuItem to="/components/overview">Overview</MenuItem>
99
<MenuItem
1010
subMenu={[
11-
{ to: '/components/form/button', children: 'Button' },
12-
{ to: '/components/form/text-box', children: 'Text box' },
13-
{ to: '/components/form/text-area', children: 'Text area' },
14-
{ to: '/components/form/dropdown', children: 'Dropdown' },
15-
{ to: '/components/form/radio', children: 'Radio' },
16-
{ to: '/components/form/checkbox', children: 'Checkbox' },
17-
{ to: '/components/form/stepper', children: 'Stepper' },
18-
{ to: '/components/form/toggle', children: 'Toggle' },
19-
{ to: '/components/form/slider', children: 'Slider' },
20-
{ to: '/components/form/date-picker', children: 'Date picker' },
21-
{ to: '/components/form/color-picker', children: 'Color picker' },
22-
{ to: '/components/form/uploader', children: 'Uploader' },
23-
{ to: '/components/form/pagination', children: 'Pagination' },
24-
{ to: '/components/form/progress-bar', children: 'Progress Bar' },
25-
{ to: '/components/form/search', children: 'Search' },
26-
{ to: '/components/form/select', children: 'Select' },
27-
{ to: '/components/form/label', children: 'Label' },
11+
{ to: '/components/button', children: 'Button' },
12+
{ to: '/components/text-box', children: 'Text box' },
13+
{ to: '/components/text-area', children: 'Text area' },
14+
{ to: '/components/dropdown', children: 'Dropdown' },
15+
{ to: '/components/radio', children: 'Radio' },
16+
{ to: '/components/checkbox', children: 'Checkbox' },
17+
{ to: '/components/stepper', children: 'Stepper' },
18+
{ to: '/components/toggle', children: 'Toggle' },
19+
{ to: '/components/slider', children: 'Slider' },
20+
{ to: '/components/date-picker', children: 'Date picker' },
21+
{ to: '/components/color-picker', children: 'Color picker' },
22+
{ to: '/components/uploader', children: 'Uploader' },
23+
{ to: '/components/pagination', children: 'Pagination' },
24+
{ to: '/components/progress-bar', children: 'Progress Bar' },
25+
{ to: '/components/search', children: 'Search' },
26+
{ to: '/components/select', children: 'Select' },
27+
{ to: '/components/label', children: 'Label' },
2828
]}
2929
>
3030
Form
3131
</MenuItem>
3232
<MenuItem
3333
subMenu={[
34-
{ to: '/components/layout/footer', children: 'Footer' },
35-
{ to: '/components/layout/tooltip', children: 'Tooltip' },
36-
{ to: '/components/layout/tab', children: 'Tab' },
37-
{ to: '/components/layout/menu', children: 'Menu' },
38-
{ to: '/components/layout/header', children: 'Header' },
39-
{ to: '/components/layout/confirm', children: 'Confirm' },
40-
{ to: '/components/layout/snackbar', children: 'Snackbar' },
41-
{ to: '/components/layout/bottom-sheet', children: 'Bottom sheet' },
34+
{ to: '/components/footer', children: 'Footer' },
35+
{ to: '/components/tooltip', children: 'Tooltip' },
36+
{ to: '/components/tab', children: 'Tab' },
37+
{ to: '/components/menu', children: 'Menu' },
38+
{ to: '/components/header', children: 'Header' },
39+
{ to: '/components/confirm', children: 'Confirm' },
40+
{ to: '/components/snackbar', children: 'Snackbar' },
41+
{ to: '/components/bottom-sheet', children: 'Bottom sheet' },
4242
]}
4343
>
4444
Layout
4545
</MenuItem>
4646
<MenuItem
47-
subMenu={[
48-
{ to: '/components/theme/theme-button', children: 'Theme Button' },
49-
]}
47+
subMenu={[{ to: '/components/theme-button', children: 'Theme Button' }]}
5048
>
5149
Theme
5250
</MenuItem>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
import { readFile } from 'node:fs/promises'
2+
import { join } from 'node:path'
3+
4+
import { Box, css, VStack } from '@devup-ui/react'
5+
import ReactMarkdown from 'react-markdown'
6+
7+
import { Code } from '@/components/Code'
8+
import { _components } from '@/mdx-components'
9+
10+
import Card from './Card'
11+
import MdxCardFooter from './MdxCardFooter'
12+
13+
export default async function MdxCard({
14+
src,
15+
demo,
16+
}: {
17+
src: string
18+
demo: React.ReactNode
19+
}) {
20+
const content = await readFile(
21+
join(
22+
process.cwd(),
23+
'src/app/(detail)/components',
24+
src ?? 'button/demo/Variants.tsx',
25+
),
26+
{
27+
encoding: 'utf-8',
28+
},
29+
)
30+
// extract comment
31+
const comment = content.match(/\/\*\*[\s\S]*?\*\//)?.[0]
32+
const code = content.replace('\n' + comment!, '')
33+
const normalizedComment = comment
34+
?.replace(/\/\*\*|\*\//g, '')
35+
?.replace(/^\s*\*\s*/gm, '')
36+
37+
return (
38+
<Card
39+
className={css({
40+
_active: {
41+
transform: 'none',
42+
},
43+
_hover: {
44+
boxShadow: 'none',
45+
},
46+
borderRadius: '10px',
47+
border: '1px solid $border',
48+
bg: '$containerBackground',
49+
maxW: '100%',
50+
flexShrink: 0,
51+
cursor: 'default',
52+
mb: '20px',
53+
_lastChild: {
54+
mb: '0',
55+
},
56+
typography: 'bodyReg',
57+
color: '$text',
58+
whiteSpace: 'pre-wrap',
59+
})}
60+
>
61+
<VStack gap="30px" px="24px" py="32px">
62+
<Box>{demo}</Box>
63+
<ReactMarkdown components={_components}>
64+
{normalizedComment ?? ''}
65+
</ReactMarkdown>
66+
</VStack>
67+
<MdxCardFooter>
68+
<Code language="typescript" value={code} />
69+
</MdxCardFooter>
70+
</Card>
71+
)
72+
}

0 commit comments

Comments
 (0)