aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiguel Ángel Moreno <mail@migalmoreno.com>2024-01-22 00:49:36 +0100
committerMiguel Ángel Moreno <mail@migalmoreno.com>2024-01-22 00:49:36 +0100
commite2fb6eef42108743e33cd790db52b3e97cbe72ef (patch)
treec2381885ba3e23f5cfbe08487209e349e1e558f0 /src
parentb531fcbc51d7eedf71dcfa60e018115b0179e4f6 (diff)
feat(frontend): make item cards more compact
Diffstat (limited to 'src')
-rw-r--r--src/frontend/tubo/components/items.cljs13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/frontend/tubo/components/items.cljs b/src/frontend/tubo/components/items.cljs
index 6d2663e..331d89a 100644
--- a/src/frontend/tubo/components/items.cljs
+++ b/src/frontend/tubo/components/items.cljs
@@ -85,8 +85,8 @@
(defn generic-item
[item service-color bookmarks]
- [:div.w-full.h-80.xs:h-72.my-2 {:key key}
- [:div.px-5.py-2.m-2.flex.flex-col.max-w-full.min-h-full.max-h-full
+ [:div.w-full.h-80.xs:h-72 {:key key}
+ [:div.flex.flex-col.max-w-full.min-h-full.max-h-full
(case (:type item)
"stream" [stream-item item service-color bookmarks]
"channel" [channel-item item service-color bookmarks]
@@ -102,10 +102,9 @@
(if (empty? related-streams)
[:div.flex.items-center.flex-auto
[:p "No available streams"]]
- [:div.grid.w-full
- {:class "grid-cols-[repeat(auto-fill,_minmax(200px,_1fr))]"}
- (for [[i item] (map-indexed vector related-streams)
- :let [keyed-item (assoc item :key i)]]
- [generic-item keyed-item service-color bookmarks])])
+ [:div.grid.w-full.gap-x-10.gap-y-5
+ {:class "grid-cols-[repeat(auto-fill,_minmax(165px,_1fr))]"}
+ (for [[i item] (map-indexed vector related-streams)]
+ ^{:key i} [generic-item item service-color bookmarks])])
(when-not (empty? next-page-url)
[loading/loading-icon service-color "text-2xl" (when-not pagination-loading? "invisible")])]))