Skip to content

Commit 2102fd7

Browse files
committed
Add background SVG to HomePage and improve CSS type definitions
1 parent abfa523 commit 2102fd7

File tree

17 files changed

+209
-59
lines changed

17 files changed

+209
-59
lines changed

.changeset/loud-boats-count.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/react": patch
3+
---
4+
5+
Support theme typing to css
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@devup-ui/wasm": patch
3+
---
4+
5+
Fix empty css call issue

apps/landing/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"private": true,
66
"scripts": {
7-
"dev": "next dev --turbo",
7+
"dev": "next dev",
88
"build": "next build",
99
"start": "next start",
1010
"lint": "eslint"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function MenuItem(props: MenuItemProps) {
4040
bg={selected ? '$menuActive' : undefined}
4141
borderRadius="6px"
4242
gap="10px"
43-
p="6px 10px"
43+
p={['10px', null, '6px 10px']}
4444
>
4545
{selected && <Box bg="$primary" borderRadius="100%" boxSize="8px" />}
4646
<Text

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function IndexMenu({
3030
color={selected ? '$primary' : '$text'}
3131
flex="1"
3232
opacity={selected ? '0.8' : '0.6'}
33-
typography="captionBold"
33+
typography="caption"
3434
>
3535
{children}
3636
</Text>

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ export default function DetailLayout({
1010
}>) {
1111
return (
1212
<>
13-
<Flex maxW="1440px" mx="auto">
13+
<Flex maxW="1440px" minH="calc(100vh - 500px)" mx="auto">
1414
<Box p="20px 16px" w="220px">
15-
<LeftMenu />
15+
<Box pos="sticky" top={['70px', null, '90px']}>
16+
<LeftMenu />
17+
</Box>
1618
</Box>
1719
<Box className="markdown-body" flex={1} px="60px" py="40px">
1820
{children}

apps/landing/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function RootLayout({
2828
</head>
2929
<body
3030
className={css({
31-
bg: '$containerBackground',
31+
bg: '$background',
3232
color: '$text',
3333
})}
3434
>

apps/landing/src/app/page.tsx

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,59 @@ import { FeatureCard } from './FeatureCard'
1010
export default function HomePage() {
1111
return (
1212
<>
13+
<Box
14+
h="80dvh"
15+
pointerEvents="none"
16+
pos="absolute"
17+
top="0"
18+
w="100%"
19+
zIndex="-1"
20+
>
21+
<svg
22+
className={css({
23+
w: '100%',
24+
})}
25+
fill="none"
26+
viewBox="0 0 1921 928"
27+
width="1921"
28+
xmlns="http://www.w3.org/2000/svg"
29+
>
30+
<path
31+
d="M0 0H1921V852L962.5 928L0 852V0Z"
32+
fill="url(#paint0_linear_52_3823)"
33+
/>
34+
<defs>
35+
<linearGradient
36+
gradientUnits="userSpaceOnUse"
37+
id="paint0_linear_52_3823"
38+
x1="960.5"
39+
x2="960.5"
40+
y1="0"
41+
y2="928"
42+
>
43+
<stop
44+
className={css({
45+
color: '#E1E5F5',
46+
_themeDark: {
47+
color: '#29304F',
48+
},
49+
})}
50+
stopColor="currentColor"
51+
/>
52+
<stop
53+
className={css({
54+
color: '#FEF4FF',
55+
_themeDark: {
56+
color: '#1B141C',
57+
},
58+
})}
59+
offset="1"
60+
stopColor="currentColor"
61+
/>
62+
</linearGradient>
63+
</defs>
64+
</svg>
65+
</Box>
1366
<Box pt={['100px', '150px']}>
1467
<VStack alignItems="center" gap="50px" maxW="800px" mx="auto">
1568
<VStack alignItems="center" gap="24px">

apps/landing/src/components/Discord.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ export function Discord() {
99
alignItems="center"
1010
bgColor="$joinBg"
1111
bgImage={`url(${URL_PREFIX}/discord-bg.svg)`}
12+
bgPositionY={['bottom', null, 'initial']}
13+
bgSize={['contain', null, 'initial']}
1214
borderRadius="40px 40px 0px 40px"
1315
h="380px"
1416
justifyContent={[null, null, 'center']}

apps/landing/src/components/Header/Menu.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,15 @@ export function Menu({ children, keyword }: MenuProps) {
1616
path.startsWith(`/${keyword}`)
1717
return (
1818
<Text
19+
_active={{
20+
opacity: '1',
21+
color: '$primary',
22+
}}
23+
_hover={{
24+
opacity: '1',
25+
}}
1926
color={selected ? '$primary' : '$title'}
20-
opacity={selected ? 1 : '0.6'}
27+
opacity={selected ? undefined : '0.6'}
2128
typography="buttonLsemiB"
2229
>
2330
{children}

0 commit comments

Comments
 (0)