about summary refs log tree commit diff
path: root/templates/src/themes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'templates/src/themes.rs')
-rw-r--r--templates/src/themes.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/templates/src/themes.rs b/templates/src/themes.rs
new file mode 100644
index 0000000..ebc0ed9
--- /dev/null
+++ b/templates/src/themes.rs
@@ -0,0 +1,25 @@
+#[derive(Debug, Default, serde::Serialize, serde::Deserialize, Clone, Copy, PartialEq, Eq)]
+#[serde(rename_all = "snake_case")]
+/// Choices of themes possible in Kittybox.
+pub enum ThemeName {
+    #[default]
+    /// Default theme shipped with Kittybox.
+    Kittybox,
+    /// "Serious business" theme, typeset like a business memo.
+    VivianWork,
+    /// Emulation of the old style websites used back in the day.
+    Retro,
+    /// Custom CSS specified by user.
+    Custom,
+}
+
+impl ThemeName {
+    pub(crate) fn into_css_link(self) -> &'static str {
+        match self {
+            ThemeName::Kittybox => "/.kittybox/static/style.css",
+            ThemeName::VivianWork => "/.kittybox/static/vivian_work.style.css",
+            ThemeName::Retro => "/.kittybox/static/retro.style.css",
+            ThemeName::Custom => "/.kittybox/custom_style.css",
+        }
+    }
+}