-
-
Notifications
You must be signed in to change notification settings - Fork 358
/
Copy pathHome.tsx
390 lines (378 loc) · 13 KB
/
Home.tsx
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
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
import { useEffect, useContext } from 'react'
import { useTour } from '@reactour/tour'
import NextLink from 'next/link'
import { ModalContext } from 'modaaals'
import Section from './Section'
import Logo from './Logo'
import Text from './Text'
import Heading from './Heading'
import Row from './Row'
import Box from './Box'
import Scrollable from './Scrollable'
import Footer from './Footer'
import Image from './Image'
import { Button, Link } from './Button'
import Dropdown from './Dropdown'
import ImagesRow from './ImagesRow'
import Tabs from './Tabs'
type DemoProps = {
isShowingMore: boolean
toggleShowMore: () => void
}
export default function Home({ isShowingMore, toggleShowMore }: DemoProps) {
const { setIsOpen } = useTour()
const { openModal } = useContext(ModalContext)
console.log('TEST LOG')
useEffect(() => {
function keyHandling(e: KeyboardEvent) {
if (e.keyCode === 75) {
e.preventDefault()
setIsOpen(true)
}
}
window.addEventListener('keyup', keyHandling)
return () => window.removeEventListener('keyup', keyHandling)
}, [setIsOpen])
return (
<>
<Section center classic>
<Logo />
<Heading h="3" data-tut="reactour__copy">
Tourist Guide into your React Components
</Heading>
</Section>
<Section center classic sticky>
<Button h="4" onClick={() => setIsOpen(true)}>
Try it
</Button>
<Link
color="dark"
h="4"
href="https://github.com/elrumordelaluz/reactour"
>
Github
</Link>
<NextLink href="/tour">
<Link color="dark" h="5">
/tour
</Link>
</NextLink>
<NextLink href="/mask">
<Link color="dark" h="5">
/mask
</Link>
</NextLink>
<NextLink href="/popover">
<Link color="dark" h="5">
/popover
</Link>
</NextLink>
</Section>
<Section>
<Row>
<Box center width="100%">
<Heading h="1">Expedition into the awesome wildlife</Heading>
<Heading
data-tut="reactour__style"
h="4"
color="black"
style={{ width: '50%', margin: '0 auto 2em' }}
>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Asperiores voluptatibus aperiam minus reprehenderit fugiat?
Officia modi quo.
</Heading>
</Box>
</Row>
<Row>
<Box data-tut="reactour__goTo">
<Link href="https://dribbble.com/shots/2524506-Tweet" nospaces>
<Image
alt="cockatoodr"
src="https://cdn.dribbble.com/users/235991/screenshots/2524506/cockatoodr.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
<Box>
<Heading h="2" data-tut="reactour__position">
Tweet
</Heading>
<Text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Praesentium esse adipisci dolores itaque aliquid vero, officiis
ipsam officia, corporis non magnam voluptates reprehenderit
impedit quibusdam quo amet, ex rerum. Necessitatibus eum adipisci
hic deserunt, ipsam eveniet, vel commodi odit id explicabo autem
quibusdam pariatur! Voluptatem blanditiis praesentium architecto,
temporibus quaerat?
</Text>
</Box>
</Row>
<Row>
<Box align="right">
<Heading h="2">{"I'm bringin silver back"}</Heading>
<Text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quidem
odio asperiores ex autem impedit consequatur, iste distinctio
illum, delectus eius minima? Laudantium labore numquam, nihil.
</Text>
</Box>
<Box>
<Link
href="https://dribbble.com/shots/2696833-I-m-bringin-silver-back"
nospaces
>
<Image
alt="giril"
src="https://cdn.dribbble.com/users/235991/screenshots/2696833/giril-01.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
</Row>
<Row>
<Box>
<Link href="https://dribbble.com/shots/3380738-Little-dog" nospaces>
<Image
alt="dog"
src="https://cdn.dribbble.com/users/235991/screenshots/3380738/dog.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
<Box>
<Heading h="2">Little Dog</Heading>
<Text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Asperiores voluptatibus aperiam minus reprehenderit fugiat?
Officia modi quo, rerum labore et consectetur minima consequatur
rem, animi quis molestias optio facere pariatur cupiditate?
Accusamus architecto maiores, beatae earum eaque, autem eius
saepe, nesciunt aut, ducimus aliquid sequi itaque fugit veniam
non. Suscipit hic, ad aliquid veniam quod veritatis id voluptas
similique nemo.
</Text>
</Box>
</Row>
</Section>
<Section
data-tut="reactour__state--observe"
style={{ paddingBottom: '3em' }}
>
<Row>
<Box center>
<Heading h="1">Also its beautiful Buildings</Heading>
</Box>
</Row>
<Row>
<Box data-tut="reactour__action">
<Link
href="https://dribbble.com/shots/2788237-Tilford-Street"
nospaces
>
<Image
alt="tilforddr"
src="https://cdn.dribbble.com/users/235991/screenshots/2788237/tilforddr-01.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
<Box>
<Heading h="2">Tilford Street</Heading>
<Text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Asperiores voluptatibus aperiam minus reprehenderit fugiat?
Officia modi quo, rerum labore et consectetur minima consequatur
rem, animi quis molestias optio facere pariatur cupiditate?
Accusamus architecto maiores, beatae earum eaque, autem eius
saepe, nesciunt aut, ducimus aliquid sequi itaque fugit veniam
non. Suscipit hic, ad aliquid veniam quod veritatis id voluptas
similique nemo.
</Text>
</Box>
</Row>
<Row>
<Box align="right">
<Heading
h="2"
style={{
display: 'flex',
alignItems: 'center',
justifyContent: 'flex-end',
}}
data-tut="reactour__highlighted"
>
109 Baptist St
<Dropdown>
<Tabs>
<Tabs.Tab>
This is a div in absolute position which will be in the
highlighted region of the mask when tour is running.
</Tabs.Tab>
<Tabs.Tab>
This is a long text which demonstrates how resizeObservables
works. Lorem ipsum dolor sit amet, consectetur adipisicing
elit. Optio neque vero consequuntur recusandae, dolore. Aut
molestiae error enim illum odio vero sunt laborum
consectetur minus deleniti pariatur eos quos, earum tenetur
architecto veniam voluptatum sit! Optio similique ducimus
esse vel inventore eaque earum adipisci quo, sit illum
reprehenderit? Fugiat rerum inventore commodi dolores nisi
soluta, nulla velit omnis! Quisquam est illo deserunt.
Consequatur modi voluptatem consectetur nesciunt, eligendi,
natus animi.
</Tabs.Tab>
</Tabs>
</Dropdown>
</Heading>
<Text>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio
neque vero consequuntur recusandae, dolore. Aut molestiae error
enim illum odio vero sunt laborum consectetur minus deleniti
pariatur eos quos, earum tenetur architecto veniam voluptatum sit!
Optio similique ducimus esse vel inventore eaque earum adipisci
quo, sit illum reprehenderit? Fugiat rerum inventore commodi
dolores nisi soluta, nulla velit omnis! Quisquam est illo
deserunt. Consequatur modi voluptatem consectetur nesciunt,
eligendi, natus animi.
</Text>
</Box>
<Box>
<Link
href="https://dribbble.com/shots/2757736-109-Baptist-St"
nospaces
>
<Image
alt="terrace3"
src="https://cdn.dribbble.com/users/235991/screenshots/2757736/terrace3-04.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
</Row>
<ImagesRow>
<Box>
<Link href="https://dribbble.com/shots/1931264-Lean-Green" nospaces>
<Image
alt="house8"
src="https://cdn.dribbble.com/users/235991/screenshots/1931264/house8.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
<Box>
<Link
href="https://dribbble.com/shots/1972953-Greek-House"
nospaces
>
<Image
alt="greekhouse"
src="https://cdn.dribbble.com/users/235991/screenshots/1972953/greekhouse.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
<Box>
<Link
href="https://dribbble.com/shots/1919911-House-Fancy"
nospaces
>
<Image
alt="house french"
src="https://cdn.dribbble.com/users/235991/screenshots/1919911/house_french.png"
/>
</Link>
<Text size=".7em">
Image by{' '}
<Link href="https://twitter.com/hoolahk" color="dark" nospaces>
Kate Hoolahan
</Link>
</Text>
</Box>
</ImagesRow>
<Box center width="100%">
<Button data-tour="open_modal" onClick={() => openModal('test')}>
Open Modal
</Button>
</Box>
</Section>
<Scrollable>
<Link
style={{
width: '70%',
marginTop: '200vh',
marginBottom: '200vh',
boxShadow: '0 .5em 3em rgba(0,0,0,.3)',
}}
data-tut="reactour__scroll--hidden"
href="https://dribbble.com/shots/2783174-Funny-little-bird"
nospaces
>
<Image
alt="htweetydr"
src="https://cdn.dribbble.com/users/235991/screenshots/2783174/tweetydr-01.png"
/>
</Link>
</Scrollable>
<Footer>
<Logo size="20vw" iso={false} />
<Text size=".7em">
<span data-tut="reactour__scroll">
Made with{' '}
<span role="img" aria-label="heart">
❤️
</span>
</span>{' '}
by{' '}
<Link
href="https://twitter.com/elrumordelaluz"
color="white"
nospaces
>
@elrumordelaluz
</Link>{' '}
·{' '}
<Link href="https://github.com/elrumordelaluz/reactour" nospaces>
Github
</Link>
</Text>
</Footer>
</>
)
}