started theme versioning

This commit is contained in:
prospect
2024-01-19 07:39:47 -05:00
parent 85d8f37afd
commit 160df267f2
3 changed files with 4 additions and 11 deletions

View File

@@ -145,8 +145,6 @@ class PageTransitions {
fetch(targetUrl).then(response => response.text()).then(data => {
this.updateContent(data, elementId);
history.pushState(null, null, targetUrl);
// Trigger removal of transition class after fetching data
this.removeTransitionClass(contentContainer);
}).catch(error => console.error('Error fetching content:', error));
}
updateContent(data, elementId) {
@@ -165,17 +163,12 @@ class PageTransitions {
document.title = newTitle.textContent;
}
// Other dynamic updates can go here, for example:
// const newMetaDescription = parsedData.querySelector('meta[name="description"]');
// if (newMetaDescription) {
// const currentMetaDescription = document.querySelector('meta[name="description"]');
// currentMetaDescription.setAttribute('content', newMetaDescription.getAttribute('content'));
// }
// Initialize or update dynamic components
this.collapsePanel = new _CollapsePanel__WEBPACK_IMPORTED_MODULE_0__["default"]();
this.collapsePanel.addToggleCollapseListener('#content-container .accordion-toggle');
this.addLinkClickListener('#content-container a');
// Trigger removal of transition class after fetching data
this.removeTransitionClass(contentContainer);
} else {
console.error(`Element with ID '${elementId}' not found in the fetched data`);
}