diff options
author | metamuffin <metamuffin@disroot.org> | 2023-12-16 13:47:56 +0100 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-12-16 13:47:56 +0100 |
commit | af4c1eca778e54e31ac35262a13f6f7aa75c6c7b (patch) | |
tree | 68df5d7359e44505310977e7218d7f6126bd0281 /server/src | |
parent | 2ff80433ee16f6e3088af09cac07cd6484b25b50 (diff) | |
download | jellything-af4c1eca778e54e31ac35262a13f6f7aa75c6c7b.tar jellything-af4c1eca778e54e31ac35262a13f6f7aa75c6c7b.tar.bz2 jellything-af4c1eca778e54e31ac35262a13f6f7aa75c6c7b.tar.zst |
style new elems
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/routes/ui/node.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/server/src/routes/ui/node.rs b/server/src/routes/ui/node.rs index 7ba455d..6ce82c2 100644 --- a/server/src/routes/ui/node.rs +++ b/server/src/routes/ui/node.rs @@ -174,22 +174,22 @@ markup::define! { p { @format_duration(m.duration) } p { @m.resolution_name() } } - @for (kind, value) in &node.ratings { - p { @match kind { - Rating::YoutubeLikes => { @format_count(*value as usize) " Likes" } - Rating::YoutubeViews => { @format_count(*value as usize) " Views" } - Rating::YoutubeFollowers => { @format_count(*value as usize) " Subscribers" } - Rating::RottenTomatoes => { @value " Tomatoes" } - Rating::Metacritic => { "Metacritic Score: " @value } - Rating::Imdb => { "IMDb Rating: " @value } - Rating::Tmdb => { "TMDB Rating: " @value } - } } + @if let Some(d) = &node.release_date { + p { @d.format("%Y-%m-%d").to_string() } } @if !node.children.is_empty() { p { @format!("{} items", node.children.len()) } } - @if let Some(d) = &node.release_date { - p { "Released " @d.format("%Y-%m-%d").to_string() } + @for (kind, value) in &node.ratings { + @match kind { + Rating::YoutubeLikes => {p{ @format_count(*value as usize) " Likes" }} + Rating::YoutubeViews => {p{ @format_count(*value as usize) " Views" }} + Rating::YoutubeFollowers => {p{ @format_count(*value as usize) " Subscribers" }} + Rating::RottenTomatoes => {p.rating{ @value " Tomatoes" }} + Rating::Metacritic => {p{ "Metacritic Score: " @value }} + Rating::Imdb => {p.rating{ "IMDb " @value }} + Rating::Tmdb => {p.rating{ "TMDB " @value }} + } } @if let Some(f) = &node.federated { p.federation { @f } |