-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
245 lines (233 loc) · 7.1 KB
/
index.tsx
File metadata and controls
245 lines (233 loc) · 7.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
import { Box, Button, Flex, Heading, HStack, Link, SimpleGrid, Stack, Text, VStack } from "@chakra-ui/react";
import { SignInButton, SignUpButton } from "@clerk/clerk-react";
import { Link as RouterLink } from "@tanstack/react-router";
import type { ReactNode } from "react";
import type { IconType } from "react-icons";
import { LuCalendarCheck, LuLink, LuSend } from "react-icons/lu";
import { type Faq, faqs } from "./faqs";
export const LandingPage = () => {
return (
<Box bg="white" minH="100vh" color="fg">
<Nav />
<Hero />
<PointSection />
<FaqSection />
<BottomCta />
<Footer />
</Box>
);
};
export const Nav = () => (
<Box as="nav" bg="white" w="full">
<Flex align="center" justify="space-between" px={{ base: 4, lg: 12 }} py={{ base: 3, lg: 5 }}>
<Link
asChild
fontWeight="bold"
fontSize={{ base: "xl", lg: "2xl" }}
color="fg"
_hover={{ textDecoration: "none" }}
>
<RouterLink to="/">シフトリ</RouterLink>
</Link>
</Flex>
</Box>
);
const Hero = () => (
<Box bgImage="linear-gradient(180deg, #99f6e4 0%, #fafafa 100%)" px={{ base: 4, lg: 12 }} py={{ base: 16, lg: 28 }}>
<VStack
mx="auto"
w="full"
maxW={{ base: "full", lg: "768px" }}
gap={{ base: 5, lg: 7 }}
align="stretch"
textAlign="left"
>
<Heading
as="h1"
fontWeight="bold"
fontSize={{ base: "26px", lg: "38px" }}
lineHeight={1.3}
color="fg"
whiteSpace="pre-line"
>
{"シフト作り\nもっとラクにできる"}
</Heading>
<Text fontSize={{ base: "md", lg: "lg" }} color="fg.muted" lineHeight={1.7}>
少人数のお店のシフト作成 ぜんぶおまかせ
</Text>
<Stack
direction={{ base: "column", lg: "row" }}
gap={{ base: 3, lg: 4 }}
w={{ base: "full", lg: "auto" }}
pt={{ base: 0, lg: 2 }}
align={{ base: "stretch", lg: "start" }}
>
<SignUpButton mode="modal">
<Button
colorPalette="teal"
h="56px"
w={{ base: "full", lg: "auto" }}
px={{ base: 0, lg: 8 }}
fontSize="lg"
fontWeight="bold"
>
ためしてみる
</Button>
</SignUpButton>
<SignInButton mode="modal">
<Button
variant="outline"
colorPalette="teal"
h={{ base: "48px", lg: "56px" }}
w={{ base: "full", lg: "auto" }}
px={{ base: 0, lg: 5 }}
fontSize="md"
fontWeight="semibold"
bg="white"
_hover={{ bg: "gray.100" }}
>
ログイン
</Button>
</SignInButton>
</Stack>
</VStack>
</Box>
);
type Point = {
icon: IconType;
title: string;
body: string;
};
const points: Point[] = [
{
icon: LuSend,
title: "募集も確定も ワンクリック",
body: "期間を決めて一斉送信 確定もボタンひとつで全員に届く",
},
{
icon: LuLink,
title: "スタッフの登録は不要",
body: "アプリもアカウントもいらない リンクを開くだけで希望シフトを提出",
},
{
icon: LuCalendarCheck,
title: "希望はそのままシフト表に",
body: "希望シフトがそのままシフト表に あとは微調整するだけ",
},
];
const PointSection = () => (
<Box bg="gray.50" px={{ base: 4, lg: 12 }} py={{ base: 12, lg: 24 }}>
<SimpleGrid mx="auto" w="full" maxW="1024px" columns={{ base: 1, lg: 3 }} gap={6}>
{points.map((p) => (
<PointCard key={p.title} {...p} />
))}
</SimpleGrid>
</Box>
);
const PointCard = ({ icon: Icon, title, body }: Point) => (
<VStack
align="start"
bg="white"
borderWidth="1px"
borderColor="teal.500"
borderRadius={{ base: "12px", lg: "16px" }}
p={{ base: 5, lg: 7 }}
gap={{ base: 3, lg: 4 }}
h="full"
>
<Flex
align="center"
justify="center"
boxSize={{ base: "56px", lg: "64px" }}
bg="teal.500"
borderRadius="full"
color="white"
>
<Icon size={32} />
</Flex>
<Text fontWeight="bold" fontSize={{ base: "18px", lg: "20px" }} lineHeight={1.4} color="fg">
{title}
</Text>
<Text fontSize="md" color="fg.muted" lineHeight={1.7}>
{body}
</Text>
</VStack>
);
const FaqSection = () => (
<Box bg="gray.50" px={{ base: 4, lg: 12 }} py={{ base: 12, lg: 24 }}>
<VStack mx="auto" w="full" maxW="768px" gap={{ base: 6, lg: 8 }} align="stretch">
<Heading as="h2" fontWeight="bold" fontSize={{ base: "24px", lg: "28px" }} lineHeight={1.3} color="teal.700">
よくある質問
</Heading>
<VStack gap={{ base: 3, lg: 4 }} align="stretch">
{faqs.map((f) => (
<FaqItem key={f.q} {...f} />
))}
</VStack>
</VStack>
</Box>
);
const FaqItem = ({ q, a }: Faq) => (
<VStack
align="start"
bg="white"
borderLeftWidth="3px"
borderLeftColor="teal.500"
borderRadius="12px"
p={{ base: 5, lg: 7 }}
gap={{ base: 2, lg: 3 }}
>
<Text fontWeight="bold" fontSize={{ base: "16px", lg: "18px" }} lineHeight={1.6} color="fg">
{q}
</Text>
<Text fontSize={{ base: "15px", lg: "16px" }} color="fg.muted" lineHeight={1.7}>
{a}
</Text>
</VStack>
);
const BottomCta = () => (
<Box bgImage="linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%)" px={{ base: 4, lg: 12 }} py={{ base: 12, lg: 24 }}>
<VStack mx="auto" w="full" maxW="768px" gap={6} align="center" textAlign="center">
<Heading as="h2" fontWeight="bold" fontSize={{ base: "20px", lg: "24px" }} color="fg">
シフト作り もっとラクにできる
</Heading>
<Text fontSize={{ base: "15px", lg: "16px" }} color="fg.muted">
少人数のお店のシフト管理を もっとかんたんに
</Text>
<SignUpButton mode="modal">
<Button
colorPalette="teal"
h="56px"
px={8}
fontSize="lg"
fontWeight="bold"
w={{ base: "full", lg: "auto" }}
minW={{ lg: "240px" }}
>
ためしてみる
</Button>
</SignUpButton>
</VStack>
</Box>
);
export const Footer = () => (
<Box as="footer" bg="white" px={{ base: 4, lg: 12 }} py={{ base: 8, lg: 12 }}>
<VStack mx="auto" w="full" maxW="1024px" gap={4} align="center">
<Text fontWeight="bold" fontSize={{ base: "18px", lg: "20px" }} color="fg">
シフトリ
</Text>
<HStack gap={{ base: 6, lg: 8 }}>
<FooterLink to="/privacy">プライバシーポリシー</FooterLink>
<FooterLink to="/terms">利用規約</FooterLink>
</HStack>
<Text fontSize="xs" color="fg.subtle">
© {new Date().getFullYear()} シフトリ v{__APP_VERSION__}
</Text>
</VStack>
</Box>
);
const FooterLink = ({ to, children }: { to: string; children: ReactNode }) => (
<Link asChild fontSize="sm" fontWeight="medium" color="fg.muted" _hover={{ color: "fg", textDecoration: "none" }}>
<RouterLink to={to}>{children}</RouterLink>
</Link>
);