harmony-unification / script.js
nkjoy's picture
์ „์ œ์ ์œผ๋กœ ํ”„๋ฆฌ๋ฏธ์—„ ๋””์ž์ธ์œผ๋กœ ํ•ด์ค˜ , ๊ธ€์ž์ฒด๋„ ์ด์œ๊ฑธ๋กœ ๋ณ€๊ฒฝ๋ถ€ํƒ
2ab122f verified
// Initialize feather icons
document.addEventListener('DOMContentLoaded', function() {
feather.replace();
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const target = document.querySelector(this.getAttribute('href'));
if (target) {
target.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
// Add fade-in animation to sections when they come into view
const sections = document.querySelectorAll('section');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('fade-in-up');
}
});
}, { threshold: 0.1 });
sections.forEach(section => {
observer.observe(section);
});
});