|
|
|
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
|
|
|
const scanButton = document.querySelector('.btn-scan'); |
|
|
const editProfileButton = document.querySelector('.btn-edit-profile'); |
|
|
|
|
|
if (scanButton) { |
|
|
scanButton.addEventListener('click', function() { |
|
|
|
|
|
this.classList.add('active'); |
|
|
setTimeout(() => this.classList.remove('active'), 300); |
|
|
|
|
|
|
|
|
console.log('Camera would open here'); |
|
|
}); |
|
|
} |
|
|
|
|
|
if (editProfileButton) { |
|
|
editProfileButton.addEventListener('click', function() { |
|
|
this.classList.add('active'); |
|
|
setTimeout(() => this.classList.remove('active'), 300); |
|
|
console.log('Edit profile would open here'); |
|
|
}); |
|
|
} |
|
|
|
|
|
|
|
|
const actionButtons = document.querySelectorAll('.btn-outline'); |
|
|
actionButtons.forEach(button => { |
|
|
button.addEventListener('click', function() { |
|
|
this.classList.add('active'); |
|
|
setTimeout(() => this.classList.remove('active'), 300); |
|
|
console.log(`${this.textContent} action triggered`); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
const scanItems = document.querySelectorAll('.scan-item'); |
|
|
scanItems.forEach(item => { |
|
|
item.addEventListener('click', function() { |
|
|
this.classList.toggle('expanded'); |
|
|
console.log('Viewing scan details'); |
|
|
}); |
|
|
}); |
|
|
}); |