Skip to content

Commit a1e8119

Browse files
committed
refactor: remove unused countdown logic and hero buttons
1 parent 031f122 commit a1e8119

2 files changed

Lines changed: 1 addition & 232 deletions

File tree

‎src/sections/About.jsx‎

Lines changed: 1 addition & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import styled from 'styled-components'
2-
import React, { useEffect, useState, useRef } from 'react'
2+
import React, { useEffect, useRef } from 'react'
33

44
const AboutContainer = styled.div`
55
aspect-ratio: 1512/900;
@@ -44,169 +44,7 @@ const Rails = styled.img`
4444
`
4545
// TRAIN END
4646

47-
// COUNTDOWN THINGS START
48-
const Countdown = styled.div``
4947

50-
const CountdownContainer = styled.img`
51-
position: absolute;
52-
width: calc(100vw * (613 / 1512));
53-
top: calc(100vw * (-53 / 1512));
54-
right: calc(100vw * (60 / 1512));
55-
z-index: 1;
56-
57-
${p => p.theme.mediaQueries.mobile} {
58-
width: calc(100vw * (188 / 393));
59-
height: calc(100vw * (132 / 393));
60-
right: calc(100vw * (100 / 393));
61-
top: calc(100vw * (-40 / 393));
62-
}
63-
`
64-
65-
const CountdownBorder = styled.img`
66-
position: absolute;
67-
width: calc(100vw * (224 / 1512));
68-
top: calc(100vw * (-30 / 1512));
69-
right: calc(100vw * (85 / 1512));
70-
z-index: 20;
71-
72-
${p => p.theme.mediaQueries.mobile} {
73-
width: calc(100vw * (112 / 393));
74-
height: calc(100vw * (49 / 393));
75-
left: 50%;
76-
right: auto;
77-
transform: translateX(-50%);
78-
top: calc(100vw * (30 / 393));
79-
}
80-
`
81-
82-
const CountdownMascots = styled.img`
83-
position: absolute;
84-
width: calc(100vw * (195 / 1512));
85-
top: calc(100vw * (-153 / 1512));
86-
right: calc(100vw * (50 / 1512));
87-
z-index: 5;
88-
89-
${p => p.theme.mediaQueries.mobile} {
90-
display: none;
91-
}
92-
`
93-
94-
const CountdownP = styled.p`
95-
font-family: 'Jersey 10';
96-
color: #ffffff;
97-
98-
background: linear-gradient(to bottom, #ffffff 0%, #f7e8e8 100%);
99-
-webkit-background-clip: text;
100-
background-clip: text;
101-
-webkit-text-fill-color: transparent;
102-
103-
display: inline-block;
104-
font-size: calc(100vw * (22 / 1512));
105-
letter-spacing: calc(100vw * (2 / 1512));
106-
107-
${p => p.theme.mediaQueries.mobile} {
108-
font-size: calc(100vw * (10 / 393));
109-
}
110-
`
111-
112-
const CountdownT = styled.p`
113-
font-family: 'Space Grotesk';
114-
color: #ffffff;
115-
font-weight: 500;
116-
117-
background: linear-gradient(to bottom, #ffffff 0%, #f7e8e8 100%);
118-
-webkit-background-clip: text;
119-
background-clip: text;
120-
-webkit-text-fill-color: transparent;
121-
122-
display: inline-block;
123-
font-size: calc(100vw * (30 / 1512));
124-
125-
${p => p.theme.mediaQueries.mobile} {
126-
font-size: calc(100vw * (15 / 393));
127-
}
128-
`
129-
130-
const CountdownLeft = styled.div`
131-
position: absolute;
132-
top: calc(100vw * (-30 / 1512));
133-
right: calc(100vw * (340 / 1512));
134-
z-index: 2;
135-
display: flex;
136-
flex-direction: column;
137-
gap: calc(100vw * (6 / 1512));
138-
139-
${p => p.theme.mediaQueries.mobile} {
140-
left: 50%;
141-
right: auto;
142-
transform: translateX(-50%);
143-
top: calc(100vw * (-25 / 393));
144-
}
145-
`
146-
147-
const CountdownGrid = styled.div`
148-
position: absolute;
149-
top: calc(100vw * (-19 / 1512));
150-
right: calc(100vw * (-12 / 1512));
151-
z-index: 3;
152-
153-
display: grid;
154-
grid-template-columns: repeat(3, max-content);
155-
column-gap: calc(100vw * (12 / 1512));
156-
align-items: center;
157-
justify-items: center;
158-
justify-content: center;
159-
160-
width: calc(100vw * (420 / 1512));
161-
162-
${p => p.theme.mediaQueries.mobile} {
163-
width: calc(100vw * (97 / 393));
164-
left: 50%;
165-
right: auto;
166-
transform: translateX(-50%);
167-
top: calc(100vw * (38 / 393));
168-
column-gap: calc(100vw * (12 / 393));
169-
}
170-
`
171-
172-
const GridItem = styled.div`
173-
display: flex;
174-
flex-direction: column;
175-
align-items: center;
176-
gap: calc(100vw * (0 / 1512));
177-
`
178-
179-
const GridNumber = styled.p`
180-
font-family: 'Jersey 10';
181-
font-weight: 700;
182-
font-size: calc(100vw * (55 / 1512));
183-
line-height: 1;
184-
margin: 0;
185-
letter-spacing: calc(100vw * (5 / 1512));
186-
187-
background: linear-gradient(to bottom, #ffffff 0%, #f7e8e8 100%);
188-
-webkit-background-clip: text;
189-
background-clip: text;
190-
-webkit-text-fill-color: transparent;
191-
192-
${p => p.theme.mediaQueries.mobile} {
193-
font-size: calc(100vw * (20 / 393));
194-
}
195-
`
196-
197-
const GridLabel = styled.p`
198-
font-family: 'Jersey 10';
199-
font-size: calc(100vw * (18 / 1512));
200-
margin: 0;
201-
color: rgba(255, 255, 255, 0.9);
202-
opacity: 0.95;
203-
letter-spacing: calc(100vw * (2 / 1512));
204-
205-
${p => p.theme.mediaQueries.mobile} {
206-
font-size: calc(100vw * (11 / 393));
207-
}
208-
`
209-
// COUNTDOWN THINGS END
21048

21149
// ABOUT IMAGES
21250
const LeftIsland = styled.img`
@@ -358,21 +196,7 @@ const TextRight = styled.p`
358196
`
359197
// TEXT END
360198

361-
const getReturnValues = countDown => {
362-
const days = Math.floor(countDown / (1000 * 60 * 60 * 24))
363-
const hours = Math.floor((countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))
364-
const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60))
365-
366-
if (days < 0 || hours < 0 || minutes < 0) {
367-
return [0, 0, 0]
368-
}
369-
370-
return [days, hours, minutes]
371-
}
372-
373199
const About = () => {
374-
const target = new Date('Dec 19, 2025 23:59:59').getTime()
375-
const [timeLeft, setTimeLeft] = useState(target - Date.now())
376200
// refs for parallax
377201
const containerRef = useRef(null)
378202
const cloudOneRef = useRef(null)
@@ -382,14 +206,6 @@ const About = () => {
382206
const rightIslandRef = useRef(null)
383207
const fogRef = useRef(null)
384208

385-
useEffect(() => {
386-
const interval = setInterval(() => {
387-
setTimeLeft(target - Date.now())
388-
}, 1000)
389-
390-
return () => clearInterval(interval)
391-
}, [target])
392-
393209
// Parallax scroll effect (similar pattern to Sponsors.jsx)
394210
useEffect(() => {
395211
const handleScroll = () => {
@@ -418,10 +234,6 @@ const About = () => {
418234
return () => window.removeEventListener('scroll', handleScroll)
419235
}, [])
420236

421-
const [days, hours, minutes] = getReturnValues(timeLeft)
422-
423-
const pad = n => String(n).padStart(2, '0')
424-
425237
return (
426238
<AboutContainer id="about" ref={containerRef}>
427239
<Tracks src="./assets/images/about/about_train.png" />

‎src/sections/Hero.jsx‎

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -150,49 +150,6 @@ const HackerButton = styled.a`
150150
}
151151
`
152152

153-
const MentorButton = styled.a`
154-
cursor: pointer;
155-
text-decoration: none;
156-
padding: calc(100vw * (15 / 1512)) calc(100vw * (20 / 1512));
157-
font-size: calc(100vw * (20 / 1512));
158-
border-radius: calc(100vw * (9 / 1512));
159-
background: linear-gradient(to bottom, #80344f 0%, #622a4d 100%) padding-box,
160-
linear-gradient(90deg, #f8c3e5 0%, #e69fdb 100%) border-box;
161-
border: 1px solid transparent;
162-
color: white;
163-
164-
&:hover {
165-
box-shadow: inset 0 -8px 8px rgba(30, 4, 27, 0.45);
166-
}
167-
168-
${p => p.theme.mediaQueries.mobile} {
169-
border-radius: calc(100vw * (5 / 487));
170-
padding: calc(100vw * (8 / 487)) calc(100vw * (12 / 487));
171-
font-size: calc(100vw * (14 / 487));
172-
}
173-
`
174-
175-
const VolunteerButton = styled.a`
176-
cursor: pointer;
177-
text-decoration: none;
178-
padding: calc(100vw * (15 / 1512)) calc(100vw * (20 / 1512));
179-
font-size: calc(100vw * (20 / 1512));
180-
border-radius: calc(100vw * (9 / 1512));
181-
background: linear-gradient(to bottom, #404721 0%, #1e2f0e 100%) padding-box,
182-
linear-gradient(90deg, #ffffff 0%, #9fc3be 100%) border-box;
183-
border: 1px solid transparent;
184-
color: white;
185-
186-
&:hover {
187-
box-shadow: inset 0 -8px 8px rgba(30, 4, 27, 0.45);
188-
}
189-
190-
${p => p.theme.mediaQueries.mobile} {
191-
border-radius: calc(100vw * (5 / 487));
192-
padding: calc(100vw * (8 / 487)) calc(100vw * (12 / 487));
193-
font-size: calc(100vw * (14 / 487));
194-
}
195-
`
196153
// LEFT SIDE END
197154

198155
// IMAGES START

0 commit comments

Comments
 (0)