remake the whole website. i need a new one regarding a greeg electrician in Athens. The websites theme should be orange and black
5214fe6 verified Download script.js from ConstantinePr/shockwire-electrics: direct link, hf CLI and curl.
- Browser
- Download file 988 Bytes
-
https://huggingface.co/spaces/ConstantinePr/shockwire-electrics/resolve/main/script.js
- Command line
-
hf download hf://spaces/ConstantinePr/shockwire-electrics/script.js
-
curl -L -o script.js https://huggingface.co/spaces/ConstantinePr/shockwire-electrics/resolve/main/script.js
988 Bytes
| document.addEventListener('DOMContentLoaded', function() { | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function(e) { | |
| e.preventDefault(); | |
| const targetId = this.getAttribute('href'); | |
| if (targetId === '#') return; | |
| const targetElement = document.querySelector(targetId); | |
| if (targetElement) { | |
| window.scrollTo({ | |
| top: targetElement.offsetTop - 80, | |
| behavior: 'smooth' | |
| }); | |
| } | |
| }); | |
| }); | |
| // Form submission handling | |
| const contactForm = document.querySelector('form'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', function(e) { | |
| e.preventDefault(); | |
| alert('Thank you for your message! We will contact you soon.'); | |
| this.reset(); | |
| }); | |
| } | |
| }); |