feat: Add past button functionality and filter section
This commit is contained in:
1 parent
0ae5604b65
commit
413fe0e8ad
2 files changed
+39
-2
No files matched your search
+18
-1
@@ -33,7 +33,7 @@
|
||||
nearby
|
||||
</a>
|
||||
<!-- Added 'past' menu item -->
|
||||
<a class="navbar-item" href="#">
|
||||
<a class="navbar-item" href="#" id="past-button">
|
||||
past
|
||||
</a>
|
||||
<a class="navbar-item" href="#">
|
||||
@@ -61,6 +61,16 @@
|
||||
<p><strong>Quick Tips:</strong> Keep it brief, keep it real. Share your desk moments, finds, or frustrations. Upvote what resonates!</p>
|
||||
</div>
|
||||
|
||||
<!-- Date Display -->
|
||||
<div class="date-display mb-4">
|
||||
<p>Stories from April 24, 2025 (UTC)</p>
|
||||
</div>
|
||||
|
||||
<!-- Filter Section -->
|
||||
<div class="filter-section hidden">
|
||||
<p>Go back a day, month, or year. Go forward a day.</p>
|
||||
</div>
|
||||
|
||||
<div class="post-list">
|
||||
<!-- Post 1 -->
|
||||
<div class="post-item">
|
||||
@@ -203,6 +213,13 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// Toggle filter section visibility
|
||||
const pastButton = document.getElementById('past-button');
|
||||
const filterSection = document.querySelector('.filter-section');
|
||||
pastButton.addEventListener('click', () => {
|
||||
filterSection.classList.toggle('hidden');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in new issue
Block a user