0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-12-22 12:28:21 -05:00

feat: add a new field animation to the struct style (#424)

This commit is contained in:
neon_arch 2023-12-11 12:27:29 +03:00
parent 62682911fc
commit 1c5a317c4d

View File

@ -17,6 +17,9 @@ pub struct Style {
/// It stores the parsed colorscheme option used to set a colorscheme for the
/// theme being used.
pub colorscheme: String,
/// It stores the parsed animation option used to set an animation for the
/// theme being used.
pub animation: Option<String>,
}
impl Style {
@ -27,8 +30,12 @@ impl Style {
/// * `theme` - It takes the parsed theme option used to set a theme for the website.
/// * `colorscheme` - It takes the parsed colorscheme option used to set a colorscheme
/// for the theme being used.
pub fn new(theme: String, colorscheme: String) -> Self {
Style { theme, colorscheme }
pub fn new(theme: String, colorscheme: String, animation: Option<String>) -> Self {
Style {
theme,
colorscheme,
animation,
}
}
}