smooth things out

This commit is contained in:
prospect
2024-01-19 10:12:42 -05:00
parent f44201b81c
commit 9ee2bd992c
2 changed files with 12 additions and 1 deletions

View File

@@ -177,6 +177,17 @@ class PageTransitions {
this.updateContent(data, elementId);
history.pushState(null, null, targetUrl);
// Update the page title
const newTitle = parsedData.querySelector('title');
if (newTitle) {
document.title = newTitle.textContent;
}
// 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
const contentContainer = document.getElementById(elementId);
setTimeout(() => {