Fix(Styles): Redesigned Projects section for cleaner UI and removed hover animations for mobile compatibility.

This commit is contained in:
2025-03-05 06:43:31 +00:00
parent 6bb1f74395
commit 22c884c007
4 changed files with 106 additions and 61 deletions

View File

@@ -4,7 +4,8 @@ function hookupPage() {
console.log("Hooking up home page...");
hookupNav();
hookupScroll();
hookupProjectThumbnails();
// hookupProjectThumbnails();
hookupProjectDetailButtons();
}
function hookupNav() {
console.log("Hooking up nav...");
@@ -42,6 +43,7 @@ function hookupScroll() {
});
});
}
/*
function hookupProjectThumbnails() {
console.log("Hooking up project thumbnails...");
let demoButtonSelector = '.project-links .button';
@@ -71,6 +73,26 @@ function getProjectThumbnailContainer(projectName) {
console.log({container});
return container;
}
*/
function hookupProjectDetailButtons() {
console.log("Hooking up project detail buttons...");
let detailButtonSelector = '.project-detail-button';
document.querySelectorAll(detailButtonSelector).forEach(detailButton => {
console.log("Hooking up project detail button...");
detailButton.addEventListener('click', function() {
let projectDetailContainer = this.parentElement.querySelector('.project-detail-container');
let wasActive = projectDetailContainer.classList.contains(activeFlag);
if (wasActive) {
projectDetailContainer.classList.remove(activeFlag);
detailButton.innerText = 'Show Details';
}
else {
projectDetailContainer.classList.add(activeFlag);
detailButton.innerText = 'Hide Details';
}
});
});
}
// Google Translate
function initGoogleTranslateElement() {