-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
217 lines (203 loc) · 9.92 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code the Stars</title>
<link rel="icon" type="image/x-icon" href="/logo.png">
</head>
<body>
<header>
<img src="logo.png" alt="Code the Stars Logo" id="logo">
<nav>
<ul class="nav__links">
<li><a href="#">Home</a></li>
<li><a href="https://docs.google.com/document/d/1kbR163HKGg1wyzURbSaCKZvIw-K96VzOtn1IxMpsdkk/edit?usp=sharing">About</a></li>
<li><a href="https://docs.google.com/document/d/1pFrSjhwX7pl84aGoCbmsTEq1yKRLxrhg8mGPTuudIDo/edit?usp=sharing">Events</a></li>
<li><a href="https://www.zeffy.com/donation-form/code-the-stars-sponsor-a-laptop-program">Laptops</a></li>
<li><a href="#">Donate</a></li>
</ul>
</nav>
<a class="cta" href="#"><button>Sign Up</button></a>
</header>
<!--End of nav
Beginning of hero
</header>
<div class="hero-image">
<div class="hero-text">
<h1 style="font-size:50px">Meteor Hacks</h1>
<p>Hackathon</p>
<button>Register Now</button>
</div>
</div>
</div>-->
<div class="hero-image">
<div class="hero-text">
<h1 >We are Code the Stars</h1>
<br>
<br>
<br>
<a class="learnMore" href="https://codethestars.org/signup"><button>Sign Up</button></a>
</div>
</div>
</div>
<div id="AboutUsSection" style="padding-bottom: 2%; height: 50%;">
<br>
<div id="abtcon" style="background-color: transparent; ">
<h2 class="txts">A non-profit organization with an aim to empower young adults.</h2>
<p class="txts">We make tools, run events, and give back to the world.</p>
<p class="txts">We are young adults who understands the lack of attention to our demographic.</p>
<br>
<a id="abtusnow" href="https://docs.google.com/document/d/1kbR163HKGg1wyzURbSaCKZvIw-K96VzOtn1IxMpsdkk/edit?usp=sharing"><button>About Us</button></a>
<br>
</div>
</div>
<div id="LPimage">
<div id="LaptopProgram">
<h2>Sponsor-a-Laptop Program</h2>
<p> We are providing laptops to underprivileged communities to empower young adults.</p><br>
<a id="abtusnow" href="https://www.zeffy.com/donation-form/code-the-stars-sponsor-a-laptop-program"><button>Learn More and Donate</button></a>
</div>
</div>
<div id="Illuminate" style="height: 50%;">
<div id="IlluminateContent">
<h2>Illuminate</h2>
<p>Our online hackathon with over 300 teenagers participating. June 7th-9th.</p><br>
<a id="abtusnow" href=" https://illuminatehackathon.org"><button>Learn more</button></a>
</div>
</div>
<div id="boardapplicant" >
<div style=" text-align: center; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: white; background-color: transparent;">
<h2>We have spots open on our Board of Directors!</h2><br>
<a id="abtusnow" href=" https://form.jotform.com/243333494727159"><button>Apply Now</button></a>
</div>
</div>
<div id="Footer">
<br>
<h2 id="MailingListText">Sign up to our mailing list</h2>
<br>
<style>@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');</style><div class="newsletter-form-container"><form class="newsletter-form" action="https://app.loops.so/api/newsletter-form/cm4316qyz03sv7lzwqlke834d" method="POST" style="display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%;"><input class="newsletter-form-input" name="newsletter-form-input" type="email" placeholder="[email protected]" required="" style="font-family: Inter, sans-serif; color: rgb(0, 0, 0); font-size: 14px; margin: 0px 10px 0px 0px; width: 100%; max-width: 300px; min-width: 100px; background: rgb(255, 255, 255); border: 1px solid rgb(209, 213, 219); box-sizing: border-box; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px; border-radius: 6px; padding: 8px 12px;"><button type="submit" class="newsletter-form-button" style="background: rgb(13, 148, 136); font-size: 14px; color: rgb(255, 255, 255); font-family: Inter, sans-serif; display: flex; width: min-content; max-width: 300px; white-space: nowrap; height: 38px; align-items: center; justify-content: center; flex-direction: row; padding: 9px 17px; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px; border-radius: 6px; text-align: center; font-style: normal; font-weight: 500; line-height: 20px; border: none; cursor: pointer;">Subscribe</button><button type="button" class="newsletter-loading-button" style="background: rgb(128, 143, 142); font-size: 14px; color: rgb(255, 255, 255); font-family: Inter, sans-serif; display: none; width: min-content; max-width: 300px; white-space: nowrap; height: 38px; align-items: center; justify-content: center; flex-direction: row; padding: 9px 17px; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px; border-radius: 6px; text-align: center; font-style: normal; font-weight: 500; line-height: 20px; border: none; cursor: pointer;">Please wait...</button></form><div class="newsletter-success" style="display: none; align-items: center; justify-content: center; width: 100%;"><p class="newsletter-success-message" style="font-family: Inter, sans-serif; color: rgb(255, 255, 255); font-size: 14px;">Success!</p></div><div class="newsletter-error" style="display: none; align-items: center; justify-content: center; width: 100%;"><p class="newsletter-error-message" style="font-family: Inter, sans-serif; color: rgb(185, 28, 28); font-size: 14px;">Oops! Something went wrong, please try again</p></div>
<button
class='newsletter-back-button'
type='button'
style='color:#6b7280;font: 14px, Inter, sans-serif;margin:10px auto;text-align:center;display:none;background:transparent;cursor:pointer'
onmouseout='this.style.textDecoration="none"'
onmouseover='this.style.textDecoration="underline"'>
← Back
</button>
</div><script>
function submitHandler(event) {
event.preventDefault();
var container = event.target.parentNode;
var form = container.querySelector(".newsletter-form");
var formInput = container.querySelector(".newsletter-form-input");
var success = container.querySelector(".newsletter-success");
var errorContainer = container.querySelector(".newsletter-error");
var errorMessage = container.querySelector(".newsletter-error-message");
var backButton = container.querySelector(".newsletter-back-button");
var submitButton = container.querySelector(".newsletter-form-button");
var loadingButton = container.querySelector(".newsletter-loading-button");
const rateLimit = () => {
errorContainer.style.display = "flex";
errorMessage.innerText = "Too many signups, please try again in a little while";
submitButton.style.display = "none";
formInput.style.display = "none";
backButton.style.display = "block";
}
// Compare current time with time of previous sign up
var time = new Date();
var timestamp = time.valueOf();
var previousTimestamp = localStorage.getItem("loops-form-timestamp");
// If last sign up was less than a minute ago
// display error
if (previousTimestamp && Number(previousTimestamp) + 60000 > timestamp) {
rateLimit();
return;
}
localStorage.setItem("loops-form-timestamp", timestamp);
submitButton.style.display = "none";
loadingButton.style.display = "flex";
var formBody = "userGroup=&mailingLists=&email="
+ encodeURIComponent(formInput.value)
;
fetch(event.target.action, {
method: "POST",
body: formBody,
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
})
.then((res) => [res.ok, res.json(), res])
.then(([ok, dataPromise, res]) => {
if (ok) {
// If response successful
// display success
success.style.display = "flex";
form.reset();
} else {
// If response unsuccessful
// display error message or response status
dataPromise.then(data => {
errorContainer.style.display = "flex";
errorMessage.innerText = data.message
? data.message
: res.statusText;
});
}
})
.catch(error => {
// check for cloudflare error
if (error.message === "Failed to fetch") {
rateLimit();
return;
}
// If error caught
// display error message if available
errorContainer.style.display = "flex";
if (error.message) errorMessage.innerText = error.message;
localStorage.setItem("loops-form-timestamp", '');
})
.finally(() => {
formInput.style.display = "none";
loadingButton.style.display = "none";
backButton.style.display = "block";
});
}
function resetFormHandler(event) {
var container = event.target.parentNode;
var formInput = container.querySelector(".newsletter-form-input");
var success = container.querySelector(".newsletter-success");
var errorContainer = container.querySelector(".newsletter-error");
var errorMessage = container.querySelector(".newsletter-error-message");
var backButton = container.querySelector(".newsletter-back-button");
var submitButton = container.querySelector(".newsletter-form-button");
success.style.display = "none";
errorContainer.style.display = "none";
errorMessage.innerText = "Oops! Something went wrong, please try again";
backButton.style.display = "none";
formInput.style.display = "flex";
submitButton.style.display = "flex";
}
var formContainers = document.getElementsByClassName(
"newsletter-form-container"
);
for (var i = 0; i < formContainers.length; i++) {
var formContainer = formContainers[i]
var handlersAdded = formContainer.classList.contains('newsletter-handlers-added')
if (handlersAdded) continue;
formContainer
.querySelector(".newsletter-form")
.addEventListener("submit", submitHandler);
formContainer
.querySelector(".newsletter-back-button")
.addEventListener("click", resetFormHandler);
formContainer.classList.add("newsletter-handlers-added");
}
</script>
<br>
<p id="CTSNONPROFITSTATUS">Code the Stars is a nonprofit. Our EIN is 33-2174804.</p>
<br>
</div>
<link rel="stylesheet" href="style.css">
</body>
</html>