mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 09:52:24 +00:00
feat: limit channel search results with show more button
- Added a "Show More" button to `views/search.html`. - Implemented responsive truncation logic in `css/tailwind.source.css` using `nth-child` selectors to show 5 items on mobile, 6 on desktop (LG), and 8 on large screens (XL). - Updated `js/searchView.js` to handle the logic for displaying the button and toggling the limit class. - Compiled CSS.
This commit is contained in:
1 parent
34d57c2072
commit
83ad3a1132
6 files changed
+59
-55
No files matched your search
@@ -5849,3 +5849,35 @@
|
||||
max-block-size: none;
|
||||
}
|
||||
}
|
||||
@layer components {
|
||||
/*
|
||||
Responsive grid limit utility
|
||||
Default (Mobile): Limit to 5
|
||||
lg: Limit to 6
|
||||
xl: Limit to 8
|
||||
*/
|
||||
.channel-grid-limit > :nth-child(n+6) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
@media (min-width: theme('screens.lg')) {
|
||||
.channel-grid-limit > :nth-child(n+6) {
|
||||
display: flex !important; /* Restore visibility for item 6 */
|
||||
}
|
||||
.channel-grid-limit > :nth-child(n+7) {
|
||||
display: none !important; /* Hide 7+ */
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: theme('screens.xl')) {
|
||||
.channel-grid-limit > :nth-child(n+7) {
|
||||
display: flex !important; /* Restore visibility for item 7 */
|
||||
}
|
||||
.channel-grid-limit > :nth-child(n+8) {
|
||||
display: flex !important; /* Restore visibility for item 8 */
|
||||
}
|
||||
.channel-grid-limit > :nth-child(n+9) {
|
||||
display: none !important; /* Hide 9+ */
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user