starting grammar sweep
This commit is contained in:
@@ -1077,6 +1077,10 @@ select {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-16 {
|
||||||
|
height: 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-1\/12 {
|
.w-1\/12 {
|
||||||
width: 8.333333%;
|
width: 8.333333%;
|
||||||
}
|
}
|
||||||
@@ -1370,6 +1374,18 @@ select {
|
|||||||
--tw-bg-opacity: 0.6;
|
--tw-bg-opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-opacity-80 {
|
||||||
|
--tw-bg-opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-opacity-20 {
|
||||||
|
--tw-bg-opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-opacity-30 {
|
||||||
|
--tw-bg-opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
.object-cover {
|
.object-cover {
|
||||||
-o-object-fit: cover;
|
-o-object-fit: cover;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
|
@@ -75,9 +75,10 @@ class HammerGestures {
|
|||||||
|
|
||||||
// Add a swipe event listener for swipe right
|
// Add a swipe event listener for swipe right
|
||||||
hammer.on('swiperight', ev => {
|
hammer.on('swiperight', ev => {
|
||||||
this.currentUrl = window.location.href;
|
this.homeUrl = `https://${window.location.hostname}`;
|
||||||
// this.goBack(this.currentUrl)
|
// this.goBack(this.currentUrl)
|
||||||
console.log(ev.type);
|
console.log(ev.type);
|
||||||
|
console.log(this.homeUrl);
|
||||||
console.log(JSON.parse(sessionStorage.getItem('historyArray')));
|
console.log(JSON.parse(sessionStorage.getItem('historyArray')));
|
||||||
if (JSON.parse(sessionStorage.getItem('historyArray')).length > 1) {
|
if (JSON.parse(sessionStorage.getItem('historyArray')).length > 1) {
|
||||||
this.pageTransition.animatePageTransition(() => {
|
this.pageTransition.animatePageTransition(() => {
|
||||||
@@ -146,9 +147,9 @@ class Nav {
|
|||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
init() {
|
init() {
|
||||||
// Open and Close the Nav Menu
|
|
||||||
document.addEventListener('DOMContentLoaded', () => {
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
this.toggleMenuBtn.addEventListener('click', () => this.toggleNavMenu());
|
this.toggleMenuBtn.addEventListener('click', () => this.toggleNavMenu());
|
||||||
|
document.addEventListener('click', event => this.handleOutsideClick(event));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
toggleNavMenu() {
|
toggleNavMenu() {
|
||||||
@@ -164,6 +165,15 @@ class Nav {
|
|||||||
});
|
});
|
||||||
}, 600);
|
}, 600);
|
||||||
}
|
}
|
||||||
|
handleOutsideClick(event) {
|
||||||
|
if (!this.toggleMenuBtn.contains(event.target) && !this.toggleSlideOutMenu.contains(event.target) && !event.target.classList.contains('accordion')) {
|
||||||
|
// Click is outside the menu and toggle button
|
||||||
|
this.toggleMenuBtn.classList.remove('active');
|
||||||
|
this.toggleSlideOutMenu.classList.remove('open');
|
||||||
|
document.body.classList.remove('noScroll');
|
||||||
|
this.collapseAllAccordions();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Nav);
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Nav);
|
||||||
|
|
||||||
@@ -234,7 +244,6 @@ class PageTransitions {
|
|||||||
this.animatePageTransition(() => {
|
this.animatePageTransition(() => {
|
||||||
this.submitFormAsync(form);
|
this.submitFormAsync(form);
|
||||||
});
|
});
|
||||||
this.formResetter(form);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -266,29 +275,24 @@ class PageTransitions {
|
|||||||
body: formData
|
body: formData
|
||||||
}).then(response => response.text()).then(data => {
|
}).then(response => response.text()).then(data => {
|
||||||
// Assuming the response contains the new content to be loaded
|
// Assuming the response contains the new content to be loaded
|
||||||
const targetUrl = form.action + '?s=' + formData.get('s'); // You might need to adjust this based on your server's response
|
const targetUrl = form.action + '?s=' + formData.get('s');
|
||||||
const elementId = 'content-container';
|
const elementId = 'content-container';
|
||||||
|
|
||||||
// Update content, push state, and remove transition class
|
|
||||||
this.updateContent(data, elementId);
|
|
||||||
history.pushState(null, null, targetUrl);
|
|
||||||
|
|
||||||
// Trigger removal of transition class after fetching data
|
// Trigger removal of transition class after fetching data
|
||||||
const contentContainer = document.getElementById(elementId);
|
const contentContainer = document.getElementById(elementId);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.removeTransitionClass(contentContainer);
|
this.removeTransitionClass(contentContainer);
|
||||||
}, 300);
|
}, 300);
|
||||||
|
|
||||||
// Update the page title
|
|
||||||
const newTitle = parsedData.querySelector('title');
|
|
||||||
if (newTitle) {
|
|
||||||
document.title = newTitle.textContent;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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');
|
||||||
|
|
||||||
|
// Update content, push state, and remove transition class
|
||||||
|
this.updateContent(data, elementId);
|
||||||
|
history.pushState(null, null, targetUrl);
|
||||||
|
this.formResetter(form);
|
||||||
}).catch(error => console.error('Error submitting form:', error));
|
}).catch(error => console.error('Error submitting form:', error));
|
||||||
}
|
}
|
||||||
formResetter(form) {
|
formResetter(form) {
|
||||||
@@ -310,7 +314,6 @@ class PageTransitions {
|
|||||||
const newContent = targetElement.innerHTML;
|
const newContent = targetElement.innerHTML;
|
||||||
|
|
||||||
// Update the content container
|
// Update the content container
|
||||||
|
|
||||||
contentContainer.innerHTML = newContent;
|
contentContainer.innerHTML = newContent;
|
||||||
|
|
||||||
// Trigger removal of transition class after fetching data
|
// Trigger removal of transition class after fetching data
|
||||||
@@ -345,36 +348,23 @@ class PageTransitions {
|
|||||||
createHistoryTracker() {
|
createHistoryTracker() {
|
||||||
// Get the initial page's href
|
// Get the initial page's href
|
||||||
let initialHref = window.location.href;
|
let initialHref = window.location.href;
|
||||||
|
// Add Home To History Array
|
||||||
|
this.historyArray.unshift(initialHref);
|
||||||
|
|
||||||
// Function to update history array and log it
|
// Function to update history array and log it
|
||||||
const updateHistory = () => {
|
const updateHistory = () => {
|
||||||
// Get the current page's href
|
// Get the current page's href
|
||||||
const currentHref = window.location.href;
|
const currentHref = window.location.href;
|
||||||
|
|
||||||
// Check if the currentHref is the same as the last item in the history array
|
|
||||||
// and if it's different from the initialHref
|
|
||||||
if (currentHref !== initialHref && (this.historyArray.length === 0 || currentHref !== this.historyArray[this.historyArray.length])) {
|
if (currentHref !== initialHref && (this.historyArray.length === 0 || currentHref !== this.historyArray[this.historyArray.length])) {
|
||||||
|
this.emptySearch = `https://${window.location.hostname}/?s=`;
|
||||||
|
|
||||||
// Remove all occurrences of the currentHref from this.historyArray
|
// Remove all occurrences of the currentHref from this.historyArray
|
||||||
this.historyArray = this.historyArray.filter(url => url !== currentHref);
|
this.historyArray = this.historyArray.filter(url => url !== currentHref);
|
||||||
|
|
||||||
// Add the currentHref to the history array
|
// Add the currentHref to the history array
|
||||||
this.historyArray.unshift(currentHref);
|
this.historyArray.unshift(currentHref);
|
||||||
// initialHref = currentHref
|
|
||||||
// this.historyArray.pop()
|
|
||||||
|
|
||||||
// Save the updated history array to the sessionStorage
|
|
||||||
const itemToRemove = 'https://' + window.location.hostname + '/?s=';
|
|
||||||
console.log(itemToRemove);
|
|
||||||
console.log('Yes');
|
|
||||||
|
|
||||||
// Use the filter method to create a new array without the item to remove
|
|
||||||
this.historyArray = this.historyArray.filter(item => item !== itemToRemove);
|
|
||||||
sessionStorage.setItem('historyArray', JSON.stringify(this.historyArray));
|
sessionStorage.setItem('historyArray', JSON.stringify(this.historyArray));
|
||||||
this.historyArray = JSON.parse(sessionStorage.getItem('historyArray')) || [];
|
this.historyArray = JSON.parse(sessionStorage.getItem('historyArray')) || [];
|
||||||
// sessionStorage.setItem('historyArray', JSON.stringify(this.historyArray))
|
|
||||||
|
|
||||||
// Log the history array (you can replace this with your own logic)
|
|
||||||
// console.log('History Array:', this.historyArray)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@@ -29,11 +29,11 @@ require_once(get_theme_file_path('/includes/back-end/helper_functions.php'));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li class="category-cards px-2 flex rounded-md shadow-md relative overflow-hidden w-full" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/bgs/<?php echo $pageBG ?>');">
|
<li class="category-cards h-16 flex rounded-md shadow-md relative overflow-hidden w-full" style="background-image: url('<?php echo get_template_directory_uri(); ?>/assets/images/bgs/<?php echo $pageBG ?>');">
|
||||||
|
|
||||||
<a class="relative w-full text-center py-4 space-y-2 flex items-center flex-col justify-center" href="<?php echo $pageSlug ?>">
|
<a class="relative w-full text-center py-4 space-y-2 flex items-center flex-col justify-center" href="<?php echo $pageSlug ?>">
|
||||||
|
|
||||||
<div class="bg-blue-500 bg-opacity-50 rounded-md py-2 px-2">
|
<div class="absolute inset-0 flex items-center justify-center h-full bg-blue-500 bg-opacity-50 rounded-md py-2 px-2">
|
||||||
<!-- <i class="<?php echo $pageBootstrapIcon ?> text-2xl" aria-hidden="true"></i> -->
|
<!-- <i class="<?php echo $pageBootstrapIcon ?> text-2xl" aria-hidden="true"></i> -->
|
||||||
<h2 class="text-sm font-medium text-white"><?php echo $pageTitle ?></h2>
|
<h2 class="text-sm font-medium text-white"><?php echo $pageTitle ?></h2>
|
||||||
<!-- <p class="font-medium lg:text-center"><?php echo get_field('description', $pageID); ?></p> -->
|
<!-- <p class="font-medium lg:text-center"><?php echo get_field('description', $pageID); ?></p> -->
|
||||||
|
@@ -201,15 +201,15 @@ $tribalCouncils = [
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<p><strong>Address: </strong><a class="font-medium underline" href=""><?= $tribalCouncil['contact']['address'] ?></a></p>
|
<p><strong>Address: </strong><?= $tribalCouncil['contact']['address'] ?></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<p><strong>Phone: </strong><a class="font-medium underline" href=""><?= $tribalCouncil['contact']['phone'] ?></a></p>
|
<p><strong>Phone: </strong><a class="font-medium underline" href="tel:+<?= str_replace("-", "", $tribalCouncil['contact']['phone']); ?>"><?= $tribalCouncil['contact']['phone'] ?></a></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<p><strong>Fax: </strong><a class="font-medium underline" href=""><?= $tribalCouncil['contact']['fax'] ?></a></p>
|
<p><strong>Fax: </strong><a class="font-medium underline" href="fax:+<?= str_replace("-", "", $tribalCouncil['contact']['fax']); ?>"><?= $tribalCouncil['contact']['fax'] ?></a></p>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
Reference in New Issue
Block a user