Spaces:
Running
Running
Download script.js from Atulsinghbirla/Portfolio: direct link, hf CLI and curl.
- Browser
- Download file 1.12 kB
-
https://huggingface.co/spaces/Atulsinghbirla/Portfolio/resolve/main/script.js
- Command line
-
hf download hf://spaces/Atulsinghbirla/Portfolio/script.js
-
curl -L -o script.js https://huggingface.co/spaces/Atulsinghbirla/Portfolio/resolve/main/script.js
1.12 kB
| document.addEventListener('DOMContentLoaded', () => { | |
| const hamburger = document.querySelector('.hamburger'); | |
| const sidebar = document.querySelector('.sidebar'); | |
| const main = document.querySelector('.main'); | |
| const humIcon = document.querySelector('.hum'); | |
| const crosIcon = document.querySelector('.cros'); | |
| hamburger.addEventListener('click', () => { | |
| sidebar.classList.toggle('active'); | |
| main.classList.toggle('active'); | |
| humIcon.classList.toggle('active'); | |
| crosIcon.classList.toggle('active'); | |
| }); | |
| const contactForm = document.getElementById('contactForm'); | |
| if (contactForm) { | |
| contactForm.addEventListener('submit', (e) => { | |
| e.preventDefault(); | |
| alert('Thank you for your message! I will get back to you soon.'); | |
| contactForm.reset(); | |
| }); | |
| } | |
| const blogButtons = document.querySelectorAll('.blogitem .btn'); | |
| blogButtons.forEach(button => { | |
| button.addEventListener('click', () => { | |
| alert('Full blog post coming soon!'); | |
| }); | |
| }); | |
| }); |