about summary refs log tree commit diff
path: root/templates/src/themes.rs
blob: ebc0ed945247e31a26a3ad0535e22f30d1254079 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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",
        }
    }
}