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
|
nearby
|
||||||
</a>
|
</a>
|
||||||
<!-- Added 'past' menu item -->
|
<!-- Added 'past' menu item -->
|
||||||
<a class="navbar-item" href="#">
|
<a class="navbar-item" href="#" id="past-button">
|
||||||
past
|
past
|
||||||
</a>
|
</a>
|
||||||
<a class="navbar-item" href="#">
|
<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>
|
<p><strong>Quick Tips:</strong> Keep it brief, keep it real. Share your desk moments, finds, or frustrations. Upvote what resonates!</p>
|
||||||
</div>
|
</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">
|
<div class="post-list">
|
||||||
<!-- Post 1 -->
|
<!-- Post 1 -->
|
||||||
<div class="post-item">
|
<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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -239,4 +239,24 @@ body {
|
|||||||
letter-spacing: 0.1ch;
|
letter-spacing: 0.1ch;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Filter Section Styling */
|
||||||
|
.filter-section {
|
||||||
|
display: none; /* Hide by default */
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-section.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-section.visible {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.date-display {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
color: #38315f;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user