Added submit page layout and front matter
This commit is contained in:
1 parent
b7f94ed0f0
commit
7cd127a8a3
8 files changed
+186
-192
No files matched your search
@@ -45,3 +45,61 @@
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Script to toggle mobile menu -->
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const menuButton = document.getElementById('menuButton');
|
||||
const mobileMenu = document.getElementById('mobileMenu');
|
||||
|
||||
if (menuButton && mobileMenu) {
|
||||
menuButton.addEventListener('click', () => {
|
||||
mobileMenu.classList.toggle('hidden');
|
||||
const expanded = menuButton.getAttribute('aria-expanded') === 'true';
|
||||
menuButton.setAttribute('aria-expanded', !expanded);
|
||||
});
|
||||
}
|
||||
|
||||
const nearbyLink = document.getElementById('nearby-link');
|
||||
const pastLink = document.getElementById('past-link');
|
||||
const mobileNearbyLink = document.getElementById('mobile-nearby-link');
|
||||
const mobilePastLink = document.getElementById('mobile-past-link');
|
||||
const filterContainer = document.getElementById('filter-container');
|
||||
const dateDisplay = document.getElementById('date-display');
|
||||
const filterSection = document.getElementById('filter-section');
|
||||
const filterText = document.getElementById('filter-text');
|
||||
|
||||
const showFilter = (type) => {
|
||||
filterContainer.classList.remove('hidden');
|
||||
if (type === 'nearby') {
|
||||
dateDisplay.classList.add('hidden');
|
||||
filterSection.classList.remove('hidden');
|
||||
filterText.innerHTML = 'Filter by distance: <a href="#" class="text-primary hover:underline">1 mile</a>, <a href="#" class="text-primary hover:underline">3 miles</a>, <a href="#" class="text-primary hover:underline">10 miles</a>. Go forward a <a href="#" class="text-primary hover:underline">20 miles</a>.';
|
||||
} else if (type === 'past') {
|
||||
dateDisplay.classList.remove('hidden');
|
||||
filterSection.classList.remove('hidden');
|
||||
filterText.innerHTML = 'Go back a <a href="#" class="text-primary hover:underline">day</a>, <a href="#" class="text-primary hover:underline">month</a>, or <a href="#" class="text-primary hover:underline">year</a>. Go forward a <a href="#" class="text-primary hover:underline">day</a>.';
|
||||
}
|
||||
};
|
||||
|
||||
nearbyLink.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
showFilter('nearby');
|
||||
});
|
||||
|
||||
pastLink.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
showFilter('past');
|
||||
});
|
||||
|
||||
mobileNearbyLink.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
showFilter('nearby');
|
||||
});
|
||||
|
||||
mobilePastLink.addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
showFilter('past');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user