Skip to content

Commit cc56bc1

Browse files
Double footer Removed
1 parent 9bb90c6 commit cc56bc1

File tree

2 files changed

+22
-86
lines changed

2 files changed

+22
-86
lines changed

index.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ <h2 class="section-title" style="font-size: 3rem; text-align: center; margin-bot
190190
</div>
191191
</footer>
192192
<button id="scrollToTopBtn" title="Go to top"></button>
193-
<script src="script.js"></script>
193+
194194

195195
</section>
196196

@@ -201,16 +201,7 @@ <h2 class="section-title" style="font-size: 3rem; text-align: center; margin-bot
201201
</div>
202202
</div>
203203
</main>
204-
205-
<footer class="footer">
206-
<div class="container">
207-
<p>&copy; 2025 CodeCanvas. Open source project for the developer community.</p>
208-
<p>Built with ❤️ for showcasing amazing front-end projects</p>
209-
</div>
210-
</footer>
211-
212-
<button id="scrollToTopBtn" title="Go to top"></button>
213-
214204
<script src="script.js"></script>
205+
215206
</body>
216207
</html>

script.js

Lines changed: 20 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
const sampleProjects = [
34
{
45
id: 1,
@@ -404,78 +405,22 @@ const sampleProjects = [
404405
icon.textContent = theme === 'dark' ? '☀️' : '🌙';
405406
});
406407

407-
// Show the overlay
408-
const overlay = document.getElementById("message-overlay");
409-
overlay.style.opacity = "1";
410-
overlay.style.pointerEvents = "auto";
411-
412-
// Hide the overlay after 3 seconds
413-
setTimeout(() => {
414-
overlay.style.opacity = "0";
415-
overlay.style.pointerEvents = "none";
416-
}, 3000);
417-
418-
// Clear form
419-
document.getElementById("contact-form").reset();
420-
421-
return false; // Prevent actual form submission
422-
}
423-
424-
const toggle = document.getElementById('darkModeToggle');
425-
const body = document.body;
426-
const icon = document.getElementById('themeIcon');
427-
428-
// Load preference
429-
const savedTheme = localStorage.getItem('theme');
430-
if (savedTheme === 'dark') {
431-
body.classList.add('dark-theme');
432-
icon.textContent = '☀️'; // Sun in dark mode
433-
} else {
434-
icon.textContent = '🌙'; // Moon in light mode
435-
}
436-
437-
toggle.addEventListener('click', () => {
438-
body.classList.toggle('dark-theme');
439-
const theme = body.classList.contains('dark-theme') ? 'dark' : 'light';
440-
localStorage.setItem('theme', theme);
441-
442-
// Update icon
443-
icon.textContent = theme === 'dark' ? '☀️' : '🌙';
444-
});
445-
446-
//Review Section JS
447-
const swiper = new Swiper(".review-swiper", {
448-
loop: true,
449-
slidesPerView: 1,
450-
spaceBetween: 20,
451-
navigation: {
452-
nextEl: ".swiper-button-next",
453-
prevEl: ".swiper-button-prev",
454-
},
455-
keyboard: {
456-
enabled: true,
457-
},
458-
mousewheel: {
459-
forceToAxis: true,
460-
},
461-
grabCursor: true,
462-
speed: 600,
463-
});
464-
465-
466-
//Scroll to top functionality
467-
const scrollToTopBtn = document.getElementById("scrollToTopBtn");
468-
469-
// Show button when user scrolls down
470-
window.addEventListener("scroll", () => {
471-
scrollToTopBtn.style.display = window.scrollY > 300 ? "block" : "none";
472-
});
473-
474-
// Scroll to top smoothly
475-
scrollToTopBtn.addEventListener("click", () => {
476-
window.scrollTo({
477-
top: 0,
478-
behavior: "smooth"
479-
});
480-
});
481-
408+
//Review Section JS
409+
const swiper = new Swiper(".review-swiper", {
410+
loop: true,
411+
slidesPerView: 1,
412+
spaceBetween: 20,
413+
navigation: {
414+
nextEl: ".swiper-button-next",
415+
prevEl: ".swiper-button-prev",
416+
},
417+
keyboard: {
418+
enabled: true,
419+
},
420+
mousewheel: {
421+
forceToAxis: true,
422+
},
423+
grabCursor: true,
424+
speed: 600,
425+
});
426+

0 commit comments

Comments
 (0)