From 6d60095da8467c2d29a1b2dfac985444e5790482 Mon Sep 17 00:00:00 2001 From: Mathias Rav Date: Sun, 9 May 2021 21:34:47 +0200 Subject: [PATCH] Move CSS to its own file --- src/application.rs | 18 +----------------- src/style.css | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 17 deletions(-) create mode 100644 src/style.css diff --git a/src/application.rs b/src/application.rs index 92f6686..222bff0 100644 --- a/src/application.rs +++ b/src/application.rs @@ -21,23 +21,7 @@ pub enum MediaType { Midi, } -// FIXME: This should be in its own .css file. -static STYLE: &str = " -.audio { - background: rgb(50,100,240); - color: black; -} - -.video { - background: rgb(200,200,0); - color: black; -} - -.midi { - background: rgb(200,0,50); - color: black; -} -"; +static STYLE: &str = include_str!("style.css"); mod imp { use super::*; diff --git a/src/style.css b/src/style.css new file mode 100644 index 0000000..aae85c4 --- /dev/null +++ b/src/style.css @@ -0,0 +1,14 @@ +.audio { + background: rgb(50,100,240); + color: black; +} + +.video { + background: rgb(200,200,0); + color: black; +} + +.midi { + background: rgb(200,0,50); + color: black; +}