Skip to content

Commit b248a53

Browse files
committed
Fix docs layout, font, color
1 parent 6ad4bd9 commit b248a53

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

apps/landing/src/app/(detail)/docs/layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ export default function DetailLayout({
1616
<LeftMenu />
1717
</Box>
1818
</Box>
19-
<Box className="markdown-body" flex={1} px="60px" py="40px">
19+
<Box
20+
className="markdown-body"
21+
flex={1}
22+
px={['20px', null, '60px']}
23+
py={['20px', null, '40px']}
24+
w="100%"
25+
>
2026
{children}
2127
</Box>
2228
<Box display={['none', null, null, 'initial']}>

apps/landing/src/app/markdown.css

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,30 @@ table {
44
border-collapse: collapse;
55
border-spacing: 0;
66
border: 1px solid var(--text);
7+
color: var(--text, #2F2F2F);
8+
9+
/* Desktop/bodyReg */
10+
font-family: Pretendard;
11+
font-size: 16px;
12+
font-style: normal;
13+
font-weight: 400;
14+
line-height: 150%; /* 24px */
15+
letter-spacing: -0.48px;
16+
}
17+
18+
code {
19+
font-family: D2Coding;
20+
font-size: 13px;
21+
font-style: normal;
22+
font-weight: 700;
23+
line-height: 1.5;
24+
letter-spacing: -0.03em;
25+
}
26+
27+
@media (min-width: 1280px) {
28+
code {
29+
font-size: 15px;
30+
}
731
}
832

933
th, td {

apps/landing/src/mdx-components.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { Text } from '@devup-ui/react'
12
import type { MDXComponents } from 'mdx/types'
23

34
import { Code } from './components/Code'
@@ -17,6 +18,34 @@ const _components = {
1718
</code>
1819
)
1920
},
21+
h1({ children }: { children: React.ReactNode }) {
22+
return (
23+
<Text as="h1" color="$title" typography="h1">
24+
{children}
25+
</Text>
26+
)
27+
},
28+
h2({ children }: { children: React.ReactNode }) {
29+
return (
30+
<Text as="h2" color="$title" typography="h2">
31+
{children}
32+
</Text>
33+
)
34+
},
35+
h3({ children }: { children: React.ReactNode }) {
36+
return (
37+
<Text as="h3" color="$title" typography="h3">
38+
{children}
39+
</Text>
40+
)
41+
},
42+
p({ children }: { children: React.ReactNode }) {
43+
return (
44+
<Text as="p" color="$text" typography="bodyReg">
45+
{children}
46+
</Text>
47+
)
48+
},
2049
}
2150

2251
export function useMDXComponents(components: MDXComponents): MDXComponents {

0 commit comments

Comments
 (0)