aboutsummaryrefslogtreecommitdiff
path: root/ui/src/components/node_page.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src/components/node_page.rs')
-rw-r--r--ui/src/components/node_page.rs7
1 files changed, 4 insertions, 3 deletions
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 {