diff options
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 { |