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:
@@ -235,7 +235,14 @@ const getEducationStyle = (title: string) => {
|
||||
// Add click listeners to education cards
|
||||
const educationCards = document.querySelectorAll('.education-card');
|
||||
educationCards.forEach(card => {
|
||||
card.addEventListener('click', function() {
|
||||
// Add both click and touchend for mobile compatibility
|
||||
card.addEventListener('click', function(e) {
|
||||
e.preventDefault();
|
||||
showEducationModal(this);
|
||||
});
|
||||
|
||||
card.addEventListener('touchend', function(e) {
|
||||
e.preventDefault();
|
||||
showEducationModal(this);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user