aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-18 15:52:30 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-18 15:52:30 +0200
commit45dbdfebdb9c194af2ff25a8fa2fd574b757a06c (patch)
tree908c0a6877ce1c6fec2638b119b7413af8a87dae /server/src/routes
parent012a4ded84613d0cf0409c124a69146170e3d500 (diff)
downloadjellything-45dbdfebdb9c194af2ff25a8fa2fd574b757a06c.tar
jellything-45dbdfebdb9c194af2ff25a8fa2fd574b757a06c.tar.bz2
jellything-45dbdfebdb9c194af2ff25a8fa2fd574b757a06c.tar.zst
revert to old design
Diffstat (limited to 'server/src/routes')
-rw-r--r--server/src/routes/ui/node.rs37
1 files changed, 25 insertions, 12 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index e4d53e6..773daa4 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -82,24 +82,37 @@ pub async fn r_library_node_filter<'a>(
markup::define! {
NodeCard<'a>(id: &'a str, node: &'a NodePublic) {
- @let cls = format!("node card {}", match node.kind {NodeKind::Channel => "aspect-square", NodeKind::Video => "aspect-thumb", NodeKind::Collection => "aspect-land", _ => "aspect-port"});
+ @let cls = format!("node card poster {}", match node.kind {NodeKind::Channel => "aspect-square", NodeKind::Video => "aspect-thumb", NodeKind::Collection => "aspect-land", _ => "aspect-port"});
div[class=cls] {
.poster {
- .inner {
- a[href=uri!(r_library_node(id))] {
- img[src=uri!(r_item_assets(id, AssetRole::Poster, Some(1024)))];
+ a[href=uri!(r_library_node(id))] {
+ img[src=uri!(r_item_assets(id, AssetRole::Poster, Some(1024)))];
+ }
+ @if matches!(node.kind, NodeKind::Collection | NodeKind::Channel) {
+ .cardhover.open {
+ a[href=&uri!(r_library_node(id))] { "Open" }
+ @Props { node }
}
- div.details {
- h3 { @node.title }
+ } else {
+ .cardhover.item {
+ a.play[href=&uri!(r_player(id, PlayerConfig::default()))] { "▶" }
@Props { node }
- p.description { @node.description }
- @if matches!(node.kind, NodeKind::Collection | NodeKind::Channel) {
- a[href=&uri!(r_library_node(id))] { "Open" }
- } else {
- a.play[href=&uri!(r_player(id, PlayerConfig::default()))] { "Watch now" }
- }
}
}
+ // .inner {
+ // a[href=uri!(r_library_node(id))] {
+ // img[src=uri!(r_item_assets(id, AssetRole::Poster, Some(1024)))];
+ // }
+ // div.details {
+ // h3 { @node.title }
+ // p.descriptioüwn { @node.description }
+ // @if matches!(node.kind, NodeKind::Collection | NodeKind::Channel) {
+ // a[href=&uri!(r_library_node(id))] { "Open" }
+ // } else {
+ // a.play[href=&uri!(r_player(id, PlayerConfig::default()))] { "Watch now" }
+ // }
+ // }
+ // }
}
div.title {
a[href=uri!(r_library_node(id))] {