Add photo overlay feature and update biography section

This commit is contained in:
2025-11-27 07:25:12 +03:30
parent 7dfd9d8639
commit 249b34215f
4 changed files with 83 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
document.addEventListener('DOMContentLoaded', function() {
// Scroll-reveal effect
const sections = document.querySelectorAll('.scroll-section');
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
@@ -10,8 +10,28 @@ document.addEventListener('DOMContentLoaded', function() {
}, {
threshold: 0.1
});
sections.forEach(section => {
observer.observe(section);
});
// Photo overlay
const profilePic = document.querySelector('.profile-pic');
const photoOverlay = document.getElementById('photo-overlay');
const closeBtn = document.querySelector('.close-btn');
if (profilePic && photoOverlay && closeBtn) {
profilePic.addEventListener('click', () => {
photoOverlay.classList.add('show');
});
closeBtn.addEventListener('click', () => {
photoOverlay.classList.remove('show');
});
photoOverlay.addEventListener('click', (e) => {
if (e.target === photoOverlay) {
photoOverlay.classList.remove('show');
}
});
}
});