forked from hackclub/site
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathslack.js
More file actions
155 lines (147 loc) · 4.94 KB
/
Copy pathslack.js
File metadata and controls
155 lines (147 loc) · 4.94 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
import Meta from '@hackclub/meta'
import Head from 'next/head'
import { Box, Container, Heading, Text } from 'theme-ui'
import { useRef } from 'react'
import { ScrollMenu } from 'react-horizontal-scrolling-menu'
import 'react-horizontal-scrolling-menu/dist/styles.css'
import { thousands } from '../lib/members'
import projects from '../components/slack/projects'
import Channels from '../components/slack/channels'
import Join from '../components/slack/join'
import Footer from '../components/footer'
import ForceTheme from '../components/force-theme'
import Nav from '../components/nav'
import Header from '../components/slack/header'
import Project from '../components/slack/project'
import Quote from '../components/slack/quote'
import Arrows from '../components/slack/arrows'
const SlackPage = () => {
const nameInputRef = useRef(null)
return (
<>
<style css>
{/*this hides the horizontal scrollbar in the projects gallery*/}
{`
.react-horizontal-scrolling-menu--scroll-container {
scrollbar-width: none;
scroll-snap-type: x mandatory;
}
.react-horizontal-scrolling-menu--scroll-container::-webkit-scrollbar {
display: none;
}
`}
</style>
<Meta
as={Head}
name="Join our Slack"
description={`The Hack Club Slack is a community of ${thousands}k+ high school hackers around the world. Chat, meet new friends, code together, share your work.`}
image="https://cloud-n6i5i4zb9-hack-club-bot.vercel.app/02020-07-25_d2dd4egb1th5k71w4uj0abbfkvvtnc01.jpeg"
/>
<ForceTheme theme="light" />
<Nav slack={true} />
{/* <Box sx={{ position: 'fixed', mt: 5, maxWidth: '1024px', backgroundColor: 'red', zIndex: 100 }}>
<Text>Hack Club Slack</Text>
</Box>*/}
<Header nameInputRef={nameInputRef} />
<Container sx={{ pt: [4, 5], pb: 4 }}>
<Heading
as="h2"
variant="title"
sx={{ mt: [4, 5], color: 'black', maxWidth: 'copyUltra' }}
>
No commitments, just exploration...
</Heading>
<Text as="p" variant="subtitle" sx={{ fontSize: [2, 3], mt: 3 }}>
Across 2,000 public channels, find the community for your favorite
programming language, ask for advice, or just hang out. Find the
worlds that suit you.
</Text>
<Channels />
{/*<Flex
sx={{
gridRow: [null, 'span 2'],
gridColumn: ['span 2', 'span 3'],
maxHeight: '100%',
overflow: 'hidden'
}}
>
<Heading
as="h2"
variant="subheadline"
sx={{
textTransform: 'uppercase',
letterSpacing: 'headline',
width: '400px'
}}
>
Live from our Slack...
</Heading>
<SlackEvents />
</Flex>*/}
<Text as="h1" variant="title" sx={{ mt: [4, 5], mb: 3 }}>
Where the makers hang out...
</Text>
<Text as="p" variant="subtitle" sx={{ fontSize: [2, 3], mt: 3 }}>
These projects were built by Hack Clubbers all around the world on the
Hack Club Slack.
</Text>
</Container>
<Box
sx={{
backgroundColor: '#F9FAFC',
paddingT: '1rem',
overflow: 'hidden'
}}
>
<Box onMouseEnter={disableScroll} onMouseLeave={enableScroll}>
<ScrollMenu Footer={Arrows} transitionBehavior="smooth" noPolyfill>
{projects.map((project, i) => (
<Project
title={project.title}
description={project.description}
img={project.img}
color={project.color}
itemId={project.itemId}
key={project.itemId}
/>
))}
</ScrollMenu>
</Box>
</Box>
<Container sx={{ py: [4, 5] }}>
<Box sx={{ gap: '2rem', display: ['grid', 'grid', 'flex'] }}>
<Quote
text="I knew it's where I wanted to be"
person="Shawn"
img="https://cloud-8u876lgxi-hack-club-bot.vercel.app/0shawn.png"
age={18}
location="MD"
/>
<Quote
text="I felt so free- there were no expectations"
person="JC"
img="https://ca.slack-edge.com/T0266FRGM-U03MNFDRSGJ-e6fb939acfd8-512"
age={17}
location="MA"
/>
<Quote
text="Finally, I found my people!"
person="Cheru"
img="https://ca.slack-edge.com/T0266FRGM-U02UYFZQ0G0-eb4e3c7fb0cf-512"
age={16}
location="VT"
/>
</Box>
<Join />
</Container>
<Footer />
</>
)
}
function disableScroll() {
document.body.style.overflowAnchor = 'hidden'
}
function enableScroll() {
document.body.style.overflowAnchor = 'scroll'
}
export default SlackPage