Skip to content

Commit 1ff96de

Browse files
committed
Merge branch 'master' of https://github.com/Jils31/CodeCanvas
2 parents 35228c2 + b2bd16e commit 1ff96de

File tree

11 files changed

+940
-89
lines changed

11 files changed

+940
-89
lines changed

assets/GeneratePassword.png

617 KB
Loading

assets/Preview.png

86.3 KB
Loading

assets/business.png

40.7 KB
Loading

assets/businessman.png

31 KB
Loading

assets/businesswoman.png

21.7 KB
Loading

assets/ceo.png

28.6 KB
Loading

assets/man.png

31.1 KB
Loading

assets/woman.png

37.3 KB
Loading

index.html

Lines changed: 275 additions & 56 deletions
Large diffs are not rendered by default.

script.js

Lines changed: 72 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ const sampleProjects = [
55
id: 1,
66
title: 'Analog Clock Web App',
77
description: 'A beautifully designed analog clock that updates in real-time using vanilla JavaScript, HTML, and CSS. Perfect for understanding basic DOM manipulation and CSS transformations.',
8-
repoUrl: 'https://github.com/Varshitha713/analog-clock-web-app',
9-
demoUrl: 'https://varshitha713.github.io/analog-clock-web-app/',
8+
repoUrl: 'https://github.com/snehhhcodes/Analog-Clock-Web-App',
9+
demoUrl: 'https://snehhhcodes.github.io/Analog-Clock-Web-App/',
1010
difficulty: 'beginner',
1111
upvotes: 15,
1212
hasDemo: true,
1313
hasReadme: true,
14-
previewImage: 'https://github.com/user-attachments/assets/091946a3-d98d-42dc-a22a-90eaefc8b1b1',
14+
previewImage: 'assets/Preview.png',
1515
tags: ['JavaScript', 'CSS', 'HTML', 'DOM']
1616
},
1717
{
@@ -79,6 +79,20 @@ const sampleProjects = [
7979
previewImage: "assets/image.png",
8080
tags: ["REACT", "Tailwind CSS", "Responsive", "React-Router DOM"],
8181
},
82+
{
83+
id: 7,
84+
title: 'PassWord Generator',
85+
description: 'Enable user to create password with specified length and character (uppercase, lowercase , special character and numbers) to meet diverse securing requirements.',
86+
repoUrl: 'https://github.com/Sitaram8472/Generate-password',
87+
demoUrl: 'https://password-generator021.netlify.app/',
88+
difficulty: 'advanced',
89+
upvotes: 42,
90+
hasDemo: true,
91+
hasReadme: true,
92+
previewImage: "assets/GeneratePassword.png",
93+
tags: ['HTML', 'CSS', 'JavaScript', 'Responsive']
94+
},
95+
8296
];
8397

8498
// Store the current projects array
@@ -341,28 +355,40 @@ const sampleProjects = [
341355
// Make handleUpvote globally available
342356
window.handleUpvote = handleUpvote;
343357

344-
// Start the app
345-
document.addEventListener('DOMContentLoaded', init);
346-
347-
function validateForm() {
348-
const name = document.getElementById("name").value.trim();
349-
const email = document.getElementById("email").value.trim();
350-
const message = document.getElementById("message").value.trim();
351-
352-
if (!name || !email || !message) {
353-
alert("Please fill in all fields.");
354-
return false;
355-
}
356-
357-
const emailPattern = /^[^ ]+@[^ ]+\.[a-z]{2,3}$/;
358-
if (!email.match(emailPattern)) {
359-
alert("Please enter a valid email.");
360-
return false;
361-
}
362-
363-
document.getElementById("form-status").style.display = "block";
364-
return false; // Prevent actual submission
365-
}
358+
// Start the app
359+
document.addEventListener("DOMContentLoaded", init);
360+
// Adding m own version and also added a feature where the input field will get clear on clicking the send message button
361+
function validateForm() {
362+
const name = document.getElementById("name").value.trim();
363+
const lastname = document.getElementById("lastname").value.trim();
364+
const email = document.getElementById("email").value.trim();
365+
const message = document.getElementById("message").value.trim();
366+
if (!name || !lastname || !email || !message) {
367+
alert("Please fill in all fields.");
368+
return false;
369+
}
370+
const emailPattern = /^[^ ]+@[^ ]+\.[a-z]{2,3}$/;
371+
if (!email.match(emailPattern)) {
372+
alert("Please enter a valid email.");
373+
return false;
374+
}
375+
376+
// Show the overlay
377+
const overlay = document.getElementById("message-overlay");
378+
overlay.style.opacity = "1";
379+
overlay.style.pointerEvents = "auto";
380+
381+
// Hide the overlay after 3 seconds
382+
setTimeout(() => {
383+
overlay.style.opacity = "0";
384+
overlay.style.pointerEvents = "none";
385+
}, 3000);
386+
387+
// Clear form
388+
document.getElementById("contact-form").reset();
389+
390+
return false; // Prevent actual form submission
391+
}
366392

367393
const toggle = document.getElementById('darkModeToggle');
368394
const body = document.body;
@@ -384,4 +410,24 @@ const sampleProjects = [
384410

385411
// Update icon
386412
icon.textContent = theme === 'dark' ? '☀️' : '🌙';
387-
});
413+
});
414+
415+
//Review Section JS
416+
const swiper = new Swiper(".review-swiper", {
417+
loop: true,
418+
slidesPerView: 1,
419+
spaceBetween: 20,
420+
navigation: {
421+
nextEl: ".swiper-button-next",
422+
prevEl: ".swiper-button-prev",
423+
},
424+
keyboard: {
425+
enabled: true,
426+
},
427+
mousewheel: {
428+
forceToAxis: true,
429+
},
430+
grabCursor: true,
431+
speed: 600,
432+
});
433+

0 commit comments

Comments
 (0)