diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/listing.rs | 2 | ||||
-rw-r--r-- | src/themes.rs | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/listing.rs b/src/listing.rs index 0746f5c..4a20db2 100644 --- a/src/listing.rs +++ b/src/listing.rs @@ -14,7 +14,7 @@ use crate::renderer; use crate::themes; /// Default color scheme, when none is set through query parameters -const DEFAULT_COLORSCHEME: themes::ColorScheme = themes::ColorScheme::ArchLinux; +const DEFAULT_COLORSCHEME: themes::ColorScheme = themes::ColorScheme::Archlinux; /// Query parameters #[derive(Debug, Deserialize)] diff --git a/src/themes.rs b/src/themes.rs index 5e8dc00..885c628 100644 --- a/src/themes.rs +++ b/src/themes.rs @@ -3,7 +3,7 @@ use serde::Deserialize; #[derive(Debug, Deserialize, Clone)] pub enum ColorScheme { #[serde(alias = "archlinux")] - ArchLinux, + Archlinux, #[serde(alias = "zenburn")] Zenburn, @@ -16,7 +16,7 @@ impl ColorScheme { /// Returns the URL-compatible name of a color scheme pub fn to_string(&self) -> String { match &self { - ColorScheme::ArchLinux => "archlinux", + ColorScheme::Archlinux => "archlinux", ColorScheme::Zenburn => "zenburn", ColorScheme::Monokai => "monokai", } @@ -26,7 +26,7 @@ impl ColorScheme { /// Returns wether a color scheme is dark pub fn is_dark(&self) -> bool { match &self { - ColorScheme::ArchLinux => true, + ColorScheme::Archlinux => true, ColorScheme::Zenburn => true, ColorScheme::Monokai => true, } @@ -35,7 +35,7 @@ impl ColorScheme { /// Returns the name of a color scheme pub fn get_name(&self) -> String { match &self { - ColorScheme::ArchLinux => "Archlinux", + ColorScheme::Archlinux => "Archlinux", ColorScheme::Zenburn => "Zenburn", ColorScheme::Monokai => "Monokai", } @@ -45,7 +45,7 @@ impl ColorScheme { /// Lists available color schemes pub fn get_color_schemes() -> Vec<Self> { vec![ - ColorScheme::ArchLinux, + ColorScheme::Archlinux, ColorScheme::Zenburn, ColorScheme::Monokai, ] @@ -54,7 +54,7 @@ impl ColorScheme { /// Retrieves the color palette associated to a color scheme pub fn get_theme(self) -> Theme { match self { - ColorScheme::ArchLinux => Theme { + ColorScheme::Archlinux => Theme { background: "#383c4a".to_string(), text_color: "#fefefe".to_string(), directory_link_color: "#03a9f4".to_string(), |