Enhance interactivity and mobile responsiveness in widget components
- Added touchend event listeners to certification, education, and skills cards for improved mobile compatibility. - Updated click event listeners to prevent default actions, ensuring modals display correctly on both desktop and mobile devices. - Enhanced mobile-specific styles in the Work Experience component for better usability, including adjustments to padding, gap, and text sizing.
This commit is contained in:
@@ -253,7 +253,14 @@ const getImageSrc = (imagePath: string) => {
|
||||
// Add click listeners to cert cards
|
||||
const certCards = document.querySelectorAll('.cert-card');
|
||||
certCards.forEach(card => {
|
||||
card.addEventListener('click', function() {
|
||||
// Add both click and touchend for mobile compatibility
|
||||
card.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
showCertModal(this);
|
||||
});
|
||||
|
||||
card.addEventListener('touchend', function(e) {
|
||||
e.preventDefault();
|
||||
showCertModal(this);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user