diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-18 13:25:24 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-18 13:25:24 +0100 |
| commit | 45a485431df0638396f0175de59275b3b5538022 (patch) | |
| tree | 4993b5b8b598d6de1036308d32b50d078fd0e365 /ui/src/components/node_card.rs | |
| parent | 3bbedf5ab337d8c6d608ed0b24b9c656b0ee1004 (diff) | |
| download | jellything-45a485431df0638396f0175de59275b3b5538022.tar jellything-45a485431df0638396f0175de59275b3b5538022.tar.bz2 jellything-45a485431df0638396f0175de59275b3b5538022.tar.zst | |
wide card; node visi; import children plugin
Diffstat (limited to 'ui/src/components/node_card.rs')
| -rw-r--r-- | ui/src/components/node_card.rs | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/ui/src/components/node_card.rs b/ui/src/components/node_card.rs index fc5738a..a4ea5e5 100644 --- a/ui/src/components/node_card.rs +++ b/ui/src/components/node_card.rs @@ -44,22 +44,24 @@ markup::define! { } } NodeCardWide<'a>(ri: &'a RenderInfo<'a>, nku: Object<'a>) { + @let node = nku.get(NKU_NODE).unwrap_or_default(); + @let slug = node.get(NO_SLUG).unwrap_or_default(); div[class="node card widecard poster"] { - // div[class=&format!("poster {}", aspect_class(node.kind))] { - // a[href=u_node_slug(&node.slug)] { - // img[src=u_node_image(&node.slug, PictureSlot::Cover, 512), loading="lazy"]; - // } - // .cardhover.item { - // @if node.media.is_some() { - // a.play.icon[href=u_node_slug_player(&node.slug)] { "play_arrow" } - // } - // } - // } - // div.details { - // a.title[href=u_node_slug(&node.slug)] { @node.title } - // @Props { node, udata, full: false, lang } - // span.overview { @node.description } - // } + div[class=&format!("poster {}", aspect_class(node))] { + a[href=u_node_slug(&slug)] { + img[src=u_image(node.get(NO_PICTURES).unwrap_or_default().get(PICT_COVER).unwrap_or_default(), 512), loading="lazy"]; + } + .cardhover.item { + @if node.has(NO_TRACK.0) { + a.play.icon[href=u_node_slug_player(&slug)] { "play_arrow" } + } + } + } + div.details { + a.title[href=u_node_slug(&slug)] { @node.get(NO_TITLE) } + @Props { ri, nku: *nku ,full: false } + span.overview { @node.get(NO_DESCRIPTION) } + } } } } |