started theme versioning
This commit is contained in:
@@ -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`);
|
||||
}
|
||||
|
Reference in New Issue
Block a user