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 => { fetch(targetUrl).then(response => response.text()).then(data => {
this.updateContent(data, elementId); this.updateContent(data, elementId);
history.pushState(null, null, targetUrl); history.pushState(null, null, targetUrl);
// Trigger removal of transition class after fetching data
this.removeTransitionClass(contentContainer);
}).catch(error => console.error('Error fetching content:', error)); }).catch(error => console.error('Error fetching content:', error));
} }
updateContent(data, elementId) { updateContent(data, elementId) {
@@ -165,17 +163,12 @@ class PageTransitions {
document.title = newTitle.textContent; 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 // Initialize or update dynamic components
this.collapsePanel = new _CollapsePanel__WEBPACK_IMPORTED_MODULE_0__["default"](); this.collapsePanel = new _CollapsePanel__WEBPACK_IMPORTED_MODULE_0__["default"]();
this.collapsePanel.addToggleCollapseListener('#content-container .accordion-toggle'); this.collapsePanel.addToggleCollapseListener('#content-container .accordion-toggle');
this.addLinkClickListener('#content-container a'); this.addLinkClickListener('#content-container a');
// Trigger removal of transition class after fetching data
this.removeTransitionClass(contentContainer);
} else { } else {
console.error(`Element with ID '${elementId}' not found in the fetched data`); console.error(`Element with ID '${elementId}' not found in the fetched data`);
} }

File diff suppressed because one or more lines are too long

View File

@@ -4,7 +4,7 @@ Theme URI: https://thecreatorpriz.com
Author: Prospect Ogujiuba Author: Prospect Ogujiuba
Author URI: https://thecreatpriz.com/ Author URI: https://thecreatpriz.com/
Description: This theme was created for Nishnawbe Aski Nation Post Secondary Transitions Handbook for Students. Description: This theme was created for Nishnawbe Aski Nation Post Secondary Transitions Handbook for Students.
Version: 1.0 Version: 1.0.1
Requires at least: 5.9 Requires at least: 5.9
Tested up to: 6.4.1 Tested up to: 6.4.1
Requires PHP: 7.2 Requires PHP: 7.2