-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathme.html
493 lines (421 loc) · 23.3 KB
/
me.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
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
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
<!DOCTYPE html><html lang="en">
<head>
<!-- Google tag (gtag.js)
Hey Mayowa, iI'd recommend you set up yours
-->
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Clone a website with it's url via pure Python" />
<title>About Me</title>
<meta property="og:type" content="website">
<!-- <meta property="og:url" content="https://app.marvelly.com.ng/"> -->
<meta property="og:title" content="Web Cloner - Python">
<meta property="og:description" content="Screnshot a website with it's url via pure JavaScript">
<meta property="og:image" content="https://app.marvelly.com.ng/100daysofMiva/100.png">
<link rel="stylesheet" href="styles.css"/>
<link
href="https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400&display=swap"
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
<!-- <style>
.swal2-container.swal2-center>.swal2-popup{
background-color: #121212 !important;
}
.swal2-html-container, .swal2-title{
color: white !important;
}
#message {
display: none;
padding: 0.5rem;
margin-bottom: 1rem;
border-radius: 0.5rem;
background-color: #eaf4e1;
color: #2e7d32;
text-align: center;
} -->
<!-- </style> -->
<style>
.typewrite > .wrap {
border-right: 0.08em solid #111827;
white-space: wrap;
overflow: hidden;
font-size: 4rem;
font-style: bold;
font-weight: 600;
}
</style>
<link href="https://app.marvelly.com.ng/cgpa/design/style.css" rel="stylesheet">
<script>
if (localStorage.getItem('dark-mode') === 'false' || !('dark-mode' in localStorage)) {
document.querySelector('html').classList.remove('dark');
} else {
document.querySelector('html').classList.add('dark');
}
</script>
</head>
<body class="cj90m c7e3b cisrt c7wkd c2gcs ce7fn clmvh">
<!-- Page wrapper -->
<div class="cbvui chs6j c8gx0 ckwv3 cjycj cezsk">
<!-- Bg coloured shapes -->
<div class="cwysf cs1uv cojlt c9v7h cvhgl cr8aa cetkn cag0k" aria-hidden="true">
<div class="c5bik c9b4s c0oy8 cmix3 cj04y ckrsz cje3v csstg cevtx cv8gl cyy6y cr8aa c98s8 c3yb8"></div>
<div class="cfwzm chupg c9b4s c0oy8 cmix3 cj04y ckrsz csstg c8m5q cevtx cv8gl cyy6y cr8aa cjgsx cnbs3 c3yb8"></div>
<div class="csla3 chupg c9b4s c0oy8 cmix3 cj04y ckrsz csstg c8m5q cevtx cv8gl cyy6y cr8aa c110f c9hsq cggi5"></div>
<div class="cs09d czbwe cd03c c9b4s c0oy8 cmix3 cj04y ckrsz csstg cevtx cv8gl cc2fz cyy6y cr8aa c8zmq cwoae"></div>
<div class="cpxaw crjok c9b4s c0oy8 cmix3 cj04y ckrsz csstg c8m5q cevtx cv8gl cpsm9 cgtcx cc1h8 cr8aa c2svq"></div>
<div class="c55mv cpvgd c9b4s c0oy8 cmix3 cj04y ckrsz csstg c8m5q cevtx cv8gl cc2fz cyy6y cr8aa cubdc cggi5"></div>
</div>
<!-- Vertical lines -->
<div class="cwysf cs1uv cojlt c9v7h cvhgl cr8aa cag0k" aria-hidden="true">
<!-- Left side -->
<div class="c9dpd c30rf crc45 c06dl cd91y czb12 c2wd7 cd8xp cpue7 cevtx ch88u cr5hf cxgoq c6ppr cjkk2 chsmj"></div>
<!-- Right side -->
<div class="c9dpd c30rf crc45 c06dl cd91y czb12 c2wd7 cd8xp cpue7 cevtx ch88u cr5hf cvq9r cxgoq cj85p c6ppr"></div>
</div>
<!-- Site header -->
<header class="c9v3y crbyi c7hiy cvq6c cd5ux cr8aa cligc ctdcn coe0p crj7h c2dja casec">
<div class="cy6zq crh5c">
<div class="cpthp czrhe">
<div class="cvvig cba0k c04cg c45gv c5plh chwso cfctz ccjiw ckwv3 ckqfb cf0cr cezsk c2svq c02c5">
<!-- Border with dots in corners -->
<div class="ch4rd cetk9 couhs c53q4 cehp5 chqy8 cukhb cx8c7 cippd crgvw c2z22 cv89o cr2ij cpue7 crc6r cevtx cr5hf cxgoq cjkk2 c1qs0 ckoug cpnw7 cr8aa cag0k" aria-hidden="true"></div>
<!-- Site branding -->
<div class="ctuhr">
<!-- Logo -->
<a href="./">
<img src="https://app.marvelly.com.ng/cgpa/design/Miva-favicon.png" width="32" height="32"/>
</a>
</div>
<!-- Navigation links -->
<nav class="c3927 cezsk">
<ul class="chwso cxpc2 cmj1h cc7et cezsk">
<li>
<a class="cpvyo cv7b2 cj90m cgvn6 c2gcs ccjiw cjnro c02c5" m-nav href="./">Home</a>
</li>
<li>
<a class="cpvyo cv7b2 cj90m cgvn6 c2gcs ccjiw cjnro c02c5" onclick="showApiInfo()">API</a>
</li>
<li>
<a class="cpvyo cv7b2 cj90m cgvn6 c2gcs ccjiw cjnro c02c5" target="_blank" href="https://marvelly.com.ng">Designer</a>
</li>
</ul>
</nav>
<!-- Dark / Light mode toggle -->
<div class="chso3 ctuhr cezsk">
<input type="checkbox" name="light-switch" id="light-switch" class="light-switch cz99u">
<label class="c9yqy co456" for="light-switch">
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg">
<path class="cdp5p crwfp" d="M9 0H7v2h2V0ZM14.294 3.052 12.88 1.637 11.466 3.05l1.413 1.414 1.415-1.413ZM16 7h-2v2h2V7ZM11.535 13.02l1.415 1.413 1.414-1.415-1.415-1.413-1.414 1.414ZM9 14H7v2h2v-2ZM1.566 12.948l1.414 1.415 1.415-1.413-1.414-1.415-1.415 1.413ZM2 7H0v2h2V7ZM4.465 3.12 3.05 1.707 1.636 3.12l1.415 1.414L4.465 3.12Z"></path>
<path class="c7cme cksqw" d="M8 4C5.8 4 4 5.8 4 8s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4Z"></path>
</svg>
<span class="cz99u">Switch to light / dark version</span>
</label>
</div>
</div>
</div>
</div>
</header>
<!-- Page content -->
<main class="cgnjb">
<section><button id="confetti" class="button"></button>
<div class="c5fcz cnmmr cg498 cw2nq">
<div class="cy6zq crh5c">
<div class="cpthp czrhe">
<div class="c9pd1">
<div class="c0drb cpgkc ckhko c26j7 c2wd7 cl110 cd8xp ctanz cqckm conig cc8zc c0zgo c3927 chwso clw5z ckuy9 cjewx cx8zz ckwv3 cb7i0 cj1vz cezsk">
<div class="cxo8x cw1gd cmkro cbc1e cyfzq cevtx cshco cv8gl cgrfs cxcm6 cxpc2 ccjiw c1l9r ckwv3 cryv2 cc7et cf0cr c02c5">
<!-- Border with dots in corners -->
<div class="c3cy3 cpoza c4xyw cauvd cehp5 chqy8 c3ehf cks6d c8z9n crgvw c2z22 cr2ij cpue7 c8arv cevtx cr5hf cw7re cxgoq cjkk2 c1qs0 ckoug cpnw7 cr8aa cag0k" aria-hidden="true"></div>
<span class="c0cnt ce627 cyiq9 ccjbb cfatl c2gcs ckwv3">#100daysofMiva🎉 </span>
</div>
</div>
<h2 class="typewrite">
<span class="wrap"></span>
</h2>
<p class="cauea cgrfs cs94t">
Explore my journey, passions, and projects—let’s connect and create together!
</p>
</div>
</div>
</div>
</div>
</section>
<!-- Main content -->
<!-- Newsletter -->
<section>
<div class="c5fcz cg498">
<div class="cy6zq crh5c">
<div class="c1t8r c330t cfs2v c1upr c2wd7 cl110 cd8xp ctanz cqckm conig cc8zc c0zgo c3927 ciay6 c7a79 chwso clw5z cjewx ckwv3 cgio7 c9l48 cezsk">
<div id="app" class="cgc2y c81ef czrhe coe0p"><div id="message"></div>
<form method="POST" action="/clone" id="linkForm" onsubmit="submitForm(event)" class="ckwv3">
<!-- Border with dots in corners -->
<div class="cq4r1 cfdqj ck5ws c5pov cehp5 chqy8 cym3j cxpxq cvvig c0cnt cba0k crgvw ci2tu c2z22 csmr0 cr2ij cpue7 c26dl cevtx cr5hf cxgoq cjkk2 c1qs0 ccjiw cr8aa clot7 cag0k" aria-hidden="true"></div>
<div class="cacgm">
<div>
<!-- <label class="cz99u" for="url">Enter Url</label>
<div class="ckwv3">
<div class="cis7l cwysf cud52 chwso c9v7h cr8aa cu4yo cezsk cyi7p">
<svg class="cdyx3" fill="none" height="16" width="16" version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 512 512" xml:space="preserve"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"> <g> <g> <path d="M256,0C114.62,0,0,114.62,0,256s114.62,256,256,256s256-114.62,256-256S397.38,0,256,0z M172.211,41.609 c-24.934,27.119-44.68,66.125-56.755,111.992H49.749C75.179,102.741,118.869,62.524,172.211,41.609z M25.6,256 c0-26.999,5.077-52.727,13.662-76.8h70.494c-4.608,24.294-7.356,49.963-7.356,76.8s2.748,52.506,7.347,76.8H39.262 C30.677,308.727,25.6,283,25.6,256z M49.749,358.4h65.707c12.083,45.867,31.821,84.872,56.755,111.991 C118.869,449.476,75.179,409.259,49.749,358.4z M243.2,485.188c-43.81-8.252-81.877-58.24-101.359-126.788H243.2V485.188z M243.2,332.8H135.74c-4.924-24.166-7.74-49.997-7.74-76.8s2.816-52.634,7.74-76.8H243.2V332.8z M243.2,153.6H141.841 C161.323,85.052,199.39,35.063,243.2,26.812V153.6z M462.251,153.6h-65.707c-12.083-45.867-31.821-84.873-56.755-111.992 C393.131,62.524,436.821,102.741,462.251,153.6z M268.8,26.812c43.81,8.252,81.877,58.24,101.359,126.788H268.8V26.812z M268.8,179.2h107.46c4.924,24.166,7.74,49.997,7.74,76.8s-2.816,52.634-7.74,76.8H268.8V179.2z M268.8,485.188V358.4h101.359 C350.677,426.948,312.61,476.937,268.8,485.188z M339.789,470.391c24.934-27.127,44.672-66.125,56.755-111.991h65.707 C436.821,409.259,393.131,449.476,339.789,470.391z M402.244,332.8c4.608-24.294,7.356-49.963,7.356-76.8 s-2.748-52.506-7.347-76.8h70.494c8.576,24.073,13.653,49.801,13.653,76.8c0,27-5.077,52.727-13.662,76.8H402.244z"></path> </g> </g> </g></svg>
</div>
<input id="rand_word" name="rand_word" class="coyoz cc7et coe0p cyujy cjygq" type="url" id="url" name="url" placeholder="e.g https://example.com" required="">
</div> -->
</div>
<div>
</div>
<div>
<button id="submitButton" class="cg4ff czbbd cfhsj czmlk ceto1 ccs7d coe0p chuxb">
<a href="https://github.com/mayowa-kalejaiye" target="_blank">Github profile</a>!</button>
</div>
</div>
</form>
</div>
<div id="app2" style="display: none" class="cgc2y c81ef czrhe coe0p">
<div class="ckwv3">
<p id="api_title" class="c5x50 cbwmu cd79k c2gcs cj90m">
</p>
<!-- Border with dots in corners -->
<div class="cq4r1 cfdqj ck5ws c5pov cehp5 chqy8 cym3j cxpxq cvvig c0cnt cba0k crgvw ci2tu c2z22 csmr0 cr2ij cpue7 c26dl cevtx cr5hf cxgoq cjkk2 c1qs0 ccjiw cr8aa clot7 cag0k" aria-hidden="true"></div>
<!-- <div class="cacgm">
<div>
<div class="ckwv3">
<img src="" id="api_img" class="cot75 coe0p c4gmd cc7et">
</div>
</div>
-->
</div>
</div>
</div>
</div>
<div class="cpthp czrhe">
<div class="c9pd1">
<!-- Avatars -->
<p class="ckasv cc7et">Join me <span class="cj90m cgrfs cxpc2"></span> to build up a community for miva devs</p>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- Site footer -->
<footer class="c9v3y crbyi c7hiy cvq6c c07f0">
<div class="cy6zq crh5c">
<div class="cpthp czrhe">
<div class="c9pd1 c82jv">
<p class="cauea cgrfs cc7et"><a class="cb5h9 cfx8h cxpc2" onclick="showSupportInfo()">Make me happy</a><br/>© Simple Webcloner - A more meaningful API #100daysofMiva . Built by <a class="cb5h9 cfx8h cxpc2" href="/about" target="_blank">Mayor</a>. </p>
</div>
</div>
</div>
</footer>
</div>
<!-- JavaScript Code -->
<script src="https://confettijs.org/confetti.min.js"></script>
<script>
// async function submitForm(event) {
// event.preventDefault(); // Prevent the form from submitting the default way
// const formData = new FormData(document.getElementById('linkForm'));
// const submitButton = document.getElementById('submitButton');
// const message = document.getElementById('message');
// const randWord = formData.get('rand_word'); // Get the value of the rand_word field
// let confetti = new Confetti("confetti");
// // Edit given parameters
// confetti.setCount(500);
// confetti.setSize(1);
// confetti.setPower(25);
// confetti.setFade(false);
// confetti.destroyTarget(true);
// // Display initial button text immediately
// submitButton.innerText = "Submitting...";
// submitButton.classList.add('submitting');
// submitButton.disabled = true;
// message.style.display = 'none'; // Hide the message box initially
// // Prepare for dynamic button text updates
// const baseMessages = [
// "Cloning Website...",
// "Almost done...",
// "Hold on...",
// "Still working on it..."
// ];
// let messageIndex = 0;
// const updateButtonText = () => {
// submitButton.innerText = `${baseMessages[messageIndex]}`;
// messageIndex = (messageIndex + 1) % baseMessages.length;
// };
// // Update the button text every 2200ms
// const messageInterval = setInterval(updateButtonText, 2200);
// try {
// // Fetch from API
// const response = await fetch(`https://cherie.marvelly.com.ng/screenshot?thirdparty=1&url=${encodeURIComponent(randWord)}`);
// // // Check if the response is OK
// if (!response.ok) {
// throw new Error('Network response was not ok');
// }
// const data = await response.json();
// // Debug: Log the response data
// console.log('API response:', data);
// // Hide #app and show #app2
// document.getElementById("confetti").click();
// document.getElementById('app').style.display = 'none';
// const app2 = document.getElementById('app2');
// app2.style.display = 'block';
// // Update #app2 with API response
// document.getElementById('api_title').innerText = data.title;
// document.getElementById('api_img').src = data.screenshotURL;
// // Clear the interval and reset the button state
// clearInterval(messageInterval);
// submitButton.innerText = 'Submit';
// submitButton.classList.remove('submitting');
// submitButton.disabled = false;
// // Reset the form fields
// document.getElementById('linkForm').reset();
// } catch (error) {
// console.error('Error fetching data:', error);
// message.innerText = 'An error occurred while fetching the screenshot.';
// message.style.display = 'block';
// // Clear the interval and reset the button state
// clearInterval(messageInterval);
// submitButton.innerText = 'Submit';
// submitButton.classList.remove('submitting');
// submitButton.disabled = false;
// }
// }
// Handle the save image button click
// document.getElementById('save').addEventListener('click', async function() {
// const img = document.getElementById('api_img');
// const imageSrc = img.src;
// const fileName = 'webclone.png'; // You can customize this
// try {
// const response = await fetch(imageSrc);
// const blob = await response.blob();
// const url = URL.createObjectURL(blob);
// const link = document.createElement('a');
// link.href = url;
// link.download = fileName;
// document.body.appendChild(link);
// link.click();
// document.body.removeChild(link);
// URL.revokeObjectURL(url); // Release the object URL
// } catch (error) {
// console.error('Error downloading image:', error);
// }
// });
// Light switcher
const lightSwitches = document.querySelectorAll('.light-switch');
if (lightSwitches.length > 0) {
lightSwitches.forEach((lightSwitch, i) => {
if (localStorage.getItem('dark-mode') === 'true') {
// eslint-disable-next-line no-param-reassign
lightSwitch.checked = true;
}
lightSwitch.addEventListener('change', () => {
const { checked } = lightSwitch;
lightSwitches.forEach((el, n) => {
if (n !== i) {
// eslint-disable-next-line no-param-reassign
el.checked = checked;
}
});
document.documentElement.classList.add('[&_*]:!transition-none');
if (lightSwitch.checked) {
document.documentElement.classList.add('dark');
document.querySelector('html').style.colorScheme = 'dark';
localStorage.setItem('dark-mode', true);
document.dispatchEvent(new CustomEvent('darkMode', { detail: { mode: 'on' } }));
} else {
document.documentElement.classList.remove('dark');
document.querySelector('html').style.colorScheme = 'light';
document.getElementsByClassName('wrap', 'typewriter').style.borderRight = 'white';
localStorage.setItem('dark-mode', false);
document.dispatchEvent(new CustomEvent('darkMode', { detail: { mode: 'off' } }));
}
setTimeout(() => {
document.documentElement.classList.remove('[&_*]:!transition-none');
}, 1);
});
});
}
</script>
<script src="https://app.marvelly.com.ng/cgpa/design/alpinejs.min.js" defer=""></script>
<script>
function showApiInfo() {
Swal.fire({
title: "Still in Progress 🌚",
text: "Take it easy—I’m a solo dev with a life beyond code! 😅",
icon: "info",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Okay",
cancelButtonText: "Close"
});
}
function showSupportInfo() {
Swal.fire({
title: "Hit follow and star on GitHub to support my journey! ⭐🚀",
text: "https://github.com/mayowa-kalejaiye",
icon: "info",
showCancelButton: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
confirmButtonText: "Copy",
cancelButtonText: "Cancel"
}).then((result) => {
if (result.isConfirmed) {
copyToClipboard();
Swal.fire({
icon: "success",
title: "Copied!",
text: "The github account has been copied to your clipboard.",
});
}
});
}
function copyToClipboard() {
const number = "2063070682";
navigator.clipboard.writeText(number);
}
</script>
<script>
class Typewriter {
constructor(element, strings, period) {
this.element = element;
this.strings = strings;
this.period = period;
this.loop = true;
this.init();
}
init() {
this.currentStringIndex = 0;
this.isDeleting = false;
this.text = '';
this.type();
}
type() {
const currentString = this.strings[this.currentStringIndex];
if (this.isDeleting) {
this.text = currentString.substring(0, this.text.length - 1);
} else {
this.text = currentString.substring(0, this.text.length + 1);
}
this.element.innerHTML = this.text;
let typingSpeed = this.isDeleting ? 25 : 50;
if (!this.isDeleting && this.text === currentString) {
typingSpeed = this.period;
this.isDeleting = true;
} else if (this.isDeleting && this.text === '') {
this.isDeleting = false;
this.currentStringIndex = (this.currentStringIndex + 1) % this.strings.length;
typingSpeed = 500;
}
setTimeout(() => this.type(), typingSpeed);
}
}
document.addEventListener('DOMContentLoaded', () => {
const element = document.querySelector('.wrap');
const strings =[ "Welcome to My World!", "API Creator", "Project Builder", "Python Enthusiast", "Solo Developer", "Web Developer", "Full Stack Developer", "Software Developer" ];
const period = 2000;
new Typewriter(element, strings, period);
});
</script>
</body></html>