diff options
Diffstat (limited to 'server/src/routes/ui/style/mod.rs')
-rw-r--r-- | server/src/routes/ui/style/mod.rs | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/server/src/routes/ui/style/mod.rs b/server/src/routes/ui/style/mod.rs index ad9c5e5..39e11af 100644 --- a/server/src/routes/ui/style/mod.rs +++ b/server/src/routes/ui/style/mod.rs @@ -8,22 +8,33 @@ use std::{ fn css_bundle() -> String { if cfg!(debug_assertions) { - ["layout.css", "player.css"] - .into_iter() - .map(|n| { - read_to_string( - PathBuf::from_str(file!()) - .unwrap() - .parent() - .unwrap() - .join(n), - ) - .unwrap() - }) - .collect::<Vec<_>>() - .join("\n") + [ + "layout.css", + "player.css", + "itempage.css", + "directorypage.css", + ] + .into_iter() + .map(|n| { + read_to_string( + PathBuf::from_str(file!()) + .unwrap() + .parent() + .unwrap() + .join(n), + ) + .unwrap() + }) + .collect::<Vec<_>>() + .join("\n") } else { - concat!(include_str!("layout.css"), include_str!("player.css")).to_string() + concat!( + include_str!("layout.css"), + include_str!("player.css"), + include_str!("itempage.css"), + include_str!("directorypage.css") + ) + .to_string() } } @@ -68,7 +79,6 @@ fn js_bundle() -> String { } } - #[get("/assets/style.css")] pub fn r_assets_style() -> (ContentType, String) { (ContentType::CSS, css_bundle()) |