-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
390 lines (288 loc) · 12.3 KB
/
script.js
File metadata and controls
390 lines (288 loc) · 12.3 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
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
// NAV HOVER
$(document).ready(function () {
$("nav a").on({
mouseenter: function () {
$(this).css({
color: "rgb(255, 225, 230)",
"font-weight": "bolder",
"letter-spacing": "5px"
});
},
mouseleave: function () {
$(this).css({
color: "",
"font-weight": "",
"letter-spacing": ""
});
},
});
});
// CONTENT VISIBILITY
$(document).ready(function () {
$(".content").hide();
$("#home").show();
$("nav a").click(function (e) {
e.preventDefault();
const target = $(this).attr("href").substring(1);
$(".content").hide();
$("#" + target).show();
});
});
//CONTENT FOR STEPS
$(document).ready(function () {
let currentStep = 0;
const totalSteps = 5;
const stepsContent = {
1: `
<h3 id="1">1. Find your DRIVE.</h3>
<p>My drive is to help spread positive energy into this world by utilizing my creativity to its maximum potential!</p>
<p>In your language: Being an artist that inspires.<br>
This is my drive.<br>
What's yours?</p>
<input placeholder=" ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________">
<h3 id="1">Congratulations! You completed your first step!</h3>
<p>Now time to get a foundation for your bonfire of success. <p>
`,
2: `
<h3 id="2">2. Find your FOCUS.</h3>
<p>My focus is the media. Getting myself out there. Having my name appear in very blank space I can find. Having my craft, my talents, my capabilities become known. Having an audience. People that wish to follow me as I pursue spreading positivity.</p>
<p>Care to share?</p>
<input placeholder=" ________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________">
<h3 id="2">Congratulations! You completed your second step!</h3>
<p>Now time to get some wood for your bonfire of success.</p>
`,
3: `
<h3 id="3">3. Solidify your CHARACTER.</h3>
<u>Stage Name:</u> Makási - meaning strong, tough<br>
<u>Talents:</u> singing - painting - writing - designing - rapping - covers - projection mapping - gloving - dancing - cosplay - photography - parody - comedy - motivational speaking - advice giving - revolution starting <br>
<u>Portal:</u> Youtube - Instagram - Wix <br><br>
<u id="outline">Outline:</u>
<ul id="list">
<li><input type="checkbox" class="check-task">
Main Email
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Youtube Domain
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Instagram Domain
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Logo
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Profile Pic
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Background Cover
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
Catchy Description
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
First Video
<button id="delete-btn">Delete</button>
</li>
<li><input type="checkbox" class="check-task">
First Instagram Post
<button id="delete-btn">Delete</button>
</li><br>
<input type="text" id="new-task" placeholder="Add your own!"><br>
<button id="add-task">Add Task</button><br><br>
<u>Character:</u><br>
<input placeholder="__________________________________________________________________________________________________________________________________________"><br>
<u>Capabilities:</u><br>
<input placeholder="______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________"><br>
<u>Execution:</u> <br>
<input placeholder="________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________">
<h3 id="3">Congratulations! You completed your third step!</h3>
<p>Now time to spark up your bonfire of success. </p>
`,
4: `
<h3 id="4">4. FOLLOW THROUGH.</h3>
<p>The more effort you put towards posting about your passion,
the more air you are introducing to the fire to ignite it!<br>
Keep going. Keep executing. <br>
and before you know it,.. </p>
<img src="assets/uni.jpg" alt="Unicorn" width="400px" height="auto">
<h3 id="4">You will unleash your inner unicorn!🦄✨</h3>
<p>Hope this helped! <br>
✨🦄✨</p>
`,
5: `
<h3 id="5">5. TESTIMONY!**</h3>
<div id="image-grid">
<img src="assets/test1.png" alt="Instagram Results" width="auto" height="300px">
<img src="assets/test2.png" alt="Instagram Results" width="auto" height="300px">
<img src="assets/test3.png" alt="Instagram Results" width="auto" height="300px">
<img src="assets/test4.png" alt="Instagram Results" width="auto" height="300px">
<img src="assets/test5.png" alt="Instagram Results" width="auto" height="300px">
<img src="assets/test6.png" alt="Instagram Results" width="auto" height="300px">
</div>
<h3 id="5">YOU CAN DO IT!</h3>
<p>Just keep going and people will notice how amazing you are!<br>
<em>**Disclaimer: Results may vary. This was my own personal experience. My progress is a result of constant effort, including researching strategies to gain followers.</em></p>
`,
};
function showStep(step) {
$("#step").html(stepsContent[step]);
}
showStep(currentStep);
$("#next").click(function () {
if (currentStep < totalSteps) {
currentStep++;
showStep(currentStep);
}
});
$("#prev").click(function () {
if (currentStep > 1) {
currentStep--;
showStep(currentStep);
}
});
$(document).keydown(function (e) {
if (e.key === "ArrowRight" && currentStep < totalSteps) {
currentStep++;
showStep(currentStep);
} else if (e.key === "ArrowLeft" && currentStep > 1) {
currentStep--;
showStep(currentStep);
}
});
$(document).keydown(function (e) {
if (e.key === "ArrowRight" && currentStep < totalSteps) {
currentStep++;
showStep(currentStep);
} else if (e.key === "ArrowLeft" && currentStep > 1) {
currentStep--;
showStep(currentStep);
}
});
$("ol a").click(function (e) {
e.preventDefault();
const targetStep = $(this).attr("href").substring(1);
currentStep = parseInt(targetStep);
showStep(currentStep);
});
});
$(document).ready(function () {
$(document).on("click", "img", function () {
$(this).toggleClass("expanded");
if ($(this).hasClass("expanded")) {
$(this).css({
width: "600px",
height: "auto",
});
} else {
$(this).css({
width: "",
height: "",
});
}
});
});
$(document).ready(function () {
function validateName(name) {
return name.trim().length > 0;
}
function validateEmail(email) {
const regex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return regex.test(email.trim());
}
function isValidPhoneNumber(phoneNumber) {
const regex = /^(1\s?)?(\(?\d{3}\)?[\s\-]?)?\d{3}[\s\-]?\d{4}$/;
return regex.test(phoneNumber.trim());
}
function validateMessage(message) {
return message.trim().length > 0;
}
$("#name-check-btn").click(function () {
const name = $("#name-input").val();
if (validateName(name)) {
$("#name-results-div").html("<p style='color:green;'>Yay! Valid name!</p>");
} else {
$("#name-results-div").html("<p style='color:burgundy;'>Uh-oh! Name is required!</p>");
}
});
$("#email-check-btn").click(function () {
const email = $("#email-input").val();
if (validateEmail(email)) {
$("#email-results-div").html("<p style='color:green;'>Yay! Valid email!</p>");
} else {
$("#email-results-div").html("<p style='color:burgundy;'>Uh-oh! Invalid email format!</p>");
}
});
$("#number-check-btn").click(function () {
const number = $("#number-user-input").val();
if (isValidPhoneNumber(number)) {
$("#number-results-div").html("<p style='color:green;'>Yay! Valid phone number!</p>");
} else {
$("#number-results-div").html("<p style='color:burgundy;'>Uh-oh! Invalid phone number!</p>");
}
});
$("#message-check-btn").click(function () {
const message = $("#message-input").val();
if (validateMessage(message)) {
$("#message-results-div").html("<p style='color:green;'>Yay! Valid message!</p>");
} else {
$("#message-results-div").html("<p style='color:burgundy;'>Uh-oh! Message cannot be empty!</p>");
}
});
$("#name-clear-btn").click(function () {
$("#name-input").val("");
$("#name-results-div").empty();
});
$("#email-clear-btn").click(function () {
$("#email-input").val("");
$("#email-results-div").empty();
});
$("#number-clear-btn").click(function () {
$("#number-user-input").val("");
$("#number-results-div").empty();
});
$("#message-clear-btn").click(function () {
$("#message-input").val("");
$("#message-results-div").empty();
});
});
$(document).ready(function () {
$("#step").on("click", "#delete-btn", function () {
$(this).closest("li").hide();
});
$("#step").on("click", "#add-task", function () {
const newTask = $("#new-task").val().trim();
if (newTask) {
$("#list").prepend(`
<li>
<input type="checkbox" class="check-task">${newTask}
<button id="delete-btn">Delete</button>
</li>
`);
$("#new-task").val("");
}
});
});
//INTERACTIVE BUTTON
$(document).ready(function() {
$('#interactive-btn').hover(
function() {
$(this).css({
'transform': 'rotate(180deg)',
'filter': 'hue-rotate(180deg)'
});
},
function() {
$(this).css({
'transform': 'rotate(0deg)',
'filter': 'hue-rotate(0deg)'
});
}
);
});