diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-02-17 12:53:19 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-02-17 12:53:19 +0100 |
| commit | 5c83df829b57f685f1c2b5e2e9e1c99dfda8eb00 (patch) | |
| tree | 5a053a1d3133662de23ceb545db0828de5ddfcc9 /ui/src/components | |
| parent | ee59ba81602a209c2262846032d7e936cb2e8d1f (diff) | |
| download | jellything-5c83df829b57f685f1c2b5e2e9e1c99dfda8eb00.tar jellything-5c83df829b57f685f1c2b5e2e9e1c99dfda8eb00.tar.bz2 jellything-5c83df829b57f685f1c2b5e2e9e1c99dfda8eb00.tar.zst | |
fix up css
Diffstat (limited to 'ui/src/components')
| -rw-r--r-- | ui/src/components/node_list.rs | 2 | ||||
| -rw-r--r-- | ui/src/components/node_page.rs | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/ui/src/components/node_list.rs b/ui/src/components/node_list.rs index c3571de..cea6cb1 100644 --- a/ui/src/components/node_list.rs +++ b/ui/src/components/node_list.rs @@ -9,7 +9,7 @@ use jellycommon::{jellyobject::Object, *}; markup::define! { NodeList<'a>(ri: &'a RenderInfo<'a>, nl: Object<'a>) { - ul.nodelist { @for nku in nl.iter(NODELIST_ITEM) { + ul.nl.grid { @for nku in nl.iter(NODELIST_ITEM) { li { @NodeCard { ri, nku } } }} } diff --git a/ui/src/components/node_page.rs b/ui/src/components/node_page.rs index 405f50a..c045dcc 100644 --- a/ui/src/components/node_page.rs +++ b/ui/src/components/node_page.rs @@ -17,11 +17,12 @@ markup::define! { NodePage<'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(); - @if let Some(path) = node.get(NO_PICTURES).unwrap_or_default().get(PICT_BACKDROP) { + @let pics = node.get(NO_PICTURES).unwrap_or_default(); + @if let Some(path) = pics.get(PICT_BACKDROP) { img.backdrop[src=u_image(path, 2048)]; } - @if let Some(path) = node.get(NO_PICTURES).unwrap_or_default().get(PICT_COVER) { - @let cls = format!("bigposter {}", aspect_class(node)); + @if let Some(path) = pics.get(PICT_COVER) { + @let cls = format!("bigposter {} {}", aspect_class(node), if pics.has(PICT_BACKDROP.0) { "has_backdrop" } else { "" }); div[class=cls] { img[src=u_image(path, 2048), loading="lazy"]; } } .title { |