aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/Cargo.toml1
-rw-r--r--server/src/routes/ui/account/session/guard.rs1
-rw-r--r--server/src/routes/ui/node.rs5
-rw-r--r--server/src/routes/ui/style.rs4
-rw-r--r--web/style/nodecard.css25
5 files changed, 26 insertions, 10 deletions
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 5af4ca8..eb0b036 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -41,3 +41,4 @@ glob = "0.3.2"
[features]
bypass-auth = []
+hot-css = []
diff --git a/server/src/routes/ui/account/session/guard.rs b/server/src/routes/ui/account/session/guard.rs
index 208e45a..295c2d4 100644
--- a/server/src/routes/ui/account/session/guard.rs
+++ b/server/src/routes/ui/account/session/guard.rs
@@ -41,6 +41,7 @@ impl Session {
#[cfg(feature = "bypass-auth")]
{
+ parse_jellyfin_auth("a"); // unused warning is annoying
username = "admin".to_string();
}
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs
index f8b448f..75893a8 100644
--- a/server/src/routes/ui/node.rs
+++ b/server/src/routes/ui/node.rs
@@ -119,9 +119,8 @@ markup::define! {
}
}
NodeCardWide<'a>(node: &'a Node, udata: &'a NodeUserData) {
- @let cls = format!("node card widecard poster {}", aspect_class(node.kind));
- div[class=cls] {
- .poster {
+ div[class="node card widecard poster"] {
+ div[class=&format!("poster {}", aspect_class(node.kind))] {
a[href=uri!(r_library_node(&node.slug))] {
img[src=uri!(r_item_poster(&node.slug, Some(1024))), loading="lazy"];
}
diff --git a/server/src/routes/ui/style.rs b/server/src/routes/ui/style.rs
index a719b67..c935c8a 100644
--- a/server/src/routes/ui/style.rs
+++ b/server/src/routes/ui/style.rs
@@ -12,7 +12,7 @@ use rocket::{
macro_rules! concat_files {
([$base: expr], $($files:literal),*) => {{
- #[cfg(debug_assertions)]
+ #[cfg(any(debug_assertions, feature = "hot-css"))]
{
use std::{fs::read_to_string, path::PathBuf, str::FromStr};
[ $($files),* ]
@@ -28,7 +28,7 @@ macro_rules! concat_files {
.collect::<Vec<_>>()
.join("\n")
}
- #[cfg(not(debug_assertions))]
+ #[cfg(not(any(debug_assertions, feature = "hot-css")))]
concat!($(include_str!(concat!($base, "/", $files))),*).to_string()
}};
}
diff --git a/web/style/nodecard.css b/web/style/nodecard.css
index 011e415..76c4d3b 100644
--- a/web/style/nodecard.css
+++ b/web/style/nodecard.css
@@ -20,16 +20,16 @@
.card .poster img {
height: var(--card-size);
}
-.card.aspect-port {
+.aspect-port {
width: calc(var(--card-size) * var(--port-poster-aspect));
}
-.card.aspect-land {
+.aspect-land {
width: calc(var(--card-size) * var(--land-poster-aspect));
}
-.card.aspect-thumb {
+.aspect-thumb {
width: calc(var(--card-size) * var(--land-thumb-aspect));
}
-.card.aspect-square {
+.aspect-square {
width: calc(var(--card-size));
}
@@ -119,7 +119,22 @@
}
.widecard {
-
+ display: grid;
+ grid-template-columns: 1fr 10000fr;
+ width: 100%;
+}
+.widecard .poster {
+ grid-column: 1;
+}
+.widecard .details {
+ grid-column: 2;
+ margin: 1em;
+}
+.widecard .details .title {
+ font-size: large;
+}
+.widecard .details .props {
+ margin-bottom: 0.5em;
}
@media (max-width: 750px) {