Skip to content

Commit 437d442

Browse files
committed
(v0.3.4-alpha) Trailer + Community Sectopm
Added a cursor trailer just a simple round circle as of now. Also added a COMMUNITY section inspiration: spaces.hackclub.com! It looks very good! OH ALSO removd the glow things cuz many ppl was mistaking this with ai :pf:
1 parent b064866 commit 437d442

4 files changed

Lines changed: 281 additions & 25 deletions

File tree

src/App.jsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,35 @@ import { Analytics } from "@vercel/analytics/react";
44
import { SpeedInsights } from "@vercel/speed-insights/react"
55
import Landing from "./routes/landing.jsx";
66
import Navbar from "./components/Navbar.jsx";
7+
import {useState} from "react";
78

89
function App() {
910

11+
const [isInteracting, setIsInteracting] = useState(false);
12+
13+
const trailerFunc = (e) => {
14+
const trailer = document.getElementById("trailer");
15+
16+
const x = e.clientX - trailer.offsetWidth / 2;
17+
const y = e.clientY - trailer.offsetHeight / 2;
18+
19+
const keyframes = {
20+
transform: `translate(${x}px, ${y}px) scale(${ isInteracting ? 2.5 : 1 })`
21+
}
22+
23+
trailer.animate(keyframes, {
24+
duration: 800,
25+
fill: "forwards"
26+
});
27+
}
28+
1029
return (
1130
<>
12-
<div className="viewport">
31+
<div
32+
className="viewport"
33+
onMouseMove={trailerFunc}
34+
>
35+
<div id={"trailer"}></div>
1336
<Navbar />
1437
<Landing />
1538

src/routes/landing.jsx

Lines changed: 56 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function Landing() {
4646
</div>
4747
</section>
4848
</section>
49-
<section className="content">
49+
<section className="ysws">
5050
<div className={"divider"}>
5151
<div className="track">
5252
<span>{generateBinary()}</span>
@@ -109,18 +109,67 @@ function Landing() {
109109
</div>
110110

111111
</section>
112-
<section
113-
style={{
114-
height: "100vh",
115-
width: "100%",
116-
}}
117-
>
112+
<section className={"community"}>
118113
<div className={"divider"}>
119114
<div className="track">
120115
<span>{generateBinary()}</span>
121116
<span>{generateBinary()}</span>
122117
</div>
123118
</div>
119+
<div className={"glow"}/>
120+
121+
<h1>Community</h1>
122+
<div className={"small-divider"}/>
123+
124+
<div className={"container"}>
125+
<div className={"description"}>
126+
<h2>Join the community</h2>
127+
<p>Connect with thousands of teen hackers on Slack, share your projects, and get help when you're stuck.</p>
128+
<div className={"buttons"}>
129+
{/*<div className={"button-container"}>*/}
130+
{/* Learn More*/}
131+
{/*</div>*/}
132+
<a href={"http://hackclub.com/slack"} target="_blank" rel="noopener noreferrer">
133+
<div className={"button-container-important"}>
134+
Join Slack
135+
</div>
136+
</a>
137+
</div>
138+
</div>
139+
<div className={"terminal"}>
140+
<div className={"titlebar"}>
141+
<div className={"actions"}>
142+
<div className={"circle red"}></div>
143+
<div className={"circle yellow"}></div>
144+
<div className={"circle green"}></div>
145+
</div>
146+
<div className={"title-container"}>
147+
<div className={"title"}>anon@hackclub - cipher</div>
148+
</div>
149+
</div>
150+
<div className={"body"}>
151+
<p>anon@hackclub ~ % <span className={"bright"}>./connect --community</span></p>
152+
<p>
153+
INIT handshake...<br/>
154+
RESOLVING: <span className="accent">hackclub.com/slack</span><br/>
155+
STATUS: <span className="success">FRIENDLY</span><br/>
156+
NODES: <span className="info">49,567</span><br/>
157+
</p>
158+
</div>
159+
</div>
160+
</div>
161+
</section>
162+
<section style={{
163+
height: "100vh",
164+
width: "100%",
165+
}}>
166+
<div className={"divider"}>
167+
<div className="track">
168+
<span>{generateBinary()}</span>
169+
<span>{generateBinary()}</span>
170+
</div>
171+
</div>
172+
<div className={"glow"}/>
124173
</section>
125174
</>
126175
)

src/styles/App.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,29 @@
66
display: flex;
77
flex-direction: column;
88
align-items: center;
9+
}
10+
11+
#trailer {
12+
height: 1.5rem;
13+
width: 1.5rem;
14+
background-color: white;
15+
border-radius: 1.5rem;
16+
17+
position: fixed;
18+
19+
top: 0;
20+
left: 0;
21+
z-index: 100000;
22+
23+
pointer-events: none;
24+
opacity: 0;
25+
26+
transition: opacity 500ms ease;
27+
28+
display: grid;
29+
place-items: center;
30+
}
31+
32+
*:hover > #trailer {
33+
opacity: 1;
934
}

0 commit comments

Comments
 (0)