aboutsummaryrefslogtreecommitdiff
path: root/server/src/routes/ui
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-06-16 18:18:53 +0200
committermetamuffin <metamuffin@disroot.org>2023-06-16 18:18:53 +0200
commited2b5a8911e46e9cc7242aff09b8fa61f210d185 (patch)
tree72c071c0103b865d05516fa581be10342f0ad1f3 /server/src/routes/ui
parent846fe07c2d083fa1015a9ef55b440a83def6e8b8 (diff)
downloadjellything-ed2b5a8911e46e9cc7242aff09b8fa61f210d185.tar
jellything-ed2b5a8911e46e9cc7242aff09b8fa61f210d185.tar.bz2
jellything-ed2b5a8911e46e9cc7242aff09b8fa61f210d185.tar.zst
asset api
Diffstat (limited to 'server/src/routes/ui')
-rw-r--r--server/src/routes/ui/node.rs15
-rw-r--r--server/src/routes/ui/style/layout.css2
2 files changed, 2 insertions, 15 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index 0b53e6d..46ab682 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -12,7 +12,6 @@ use crate::{
account::session::Session,
layout::{DynLayoutPage, LayoutPage},
},
- CONF,
};
use anyhow::Context;
use jellycommon::DirectoryKind;
@@ -153,19 +152,7 @@ pub async fn r_item_assets(
let node = library
.nested_path(&path)
.context("retrieving library node")?;
- let path = match role {
- AssetRole::Backdrop => node
- .common()
- .backdrop
- .clone()
- .or_else(|| node.common().poster.clone()),
- AssetRole::Poster => node.common().poster.clone(),
- };
- let path = if let Some(p) = path {
- library.root_path.join(p)
- } else {
- CONF.asset_path.join("fallback.jpeg")
- };
+ let path = node.get_asset(library, role);
info!("loading asset from {path:?}");
Ok((ContentType::WEBP, File::open(path).await?))
}
diff --git a/server/src/routes/ui/style/layout.css b/server/src/routes/ui/style/layout.css
index 89c12e2..07b7397 100644
--- a/server/src/routes/ui/style/layout.css
+++ b/server/src/routes/ui/style/layout.css
@@ -16,7 +16,7 @@
--dir-banner-aspect: (1.41 / 2);
--accent-light: rgb(255, 163, 87);
--accent-dark: rgb(199, 90, 0);
- --backdrop-height: 18em;
+ --backdrop-height: 24em;
--background-dark: #070707;
--background-light: #1c1c1c;
--main-side-margin: 2em;