switched from data to css output
This commit is contained in:
parent
d56a670145
commit
e40bfb1a06
1 changed files with 14 additions and 1 deletions
|
@ -142,7 +142,20 @@ pub fn run_calendar(args: &CliArgs) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("{}", serde_json::to_string(&output_state).unwrap());
|
|
||||||
|
if !output_state.has_bg {
|
||||||
|
println!("rgba(0, 0, 0, 0.0)");
|
||||||
|
} else {
|
||||||
|
let gradient_color = if output_state.is_sun {
|
||||||
|
"#ffa500"
|
||||||
|
} else {
|
||||||
|
"#d3d3d3"
|
||||||
|
};
|
||||||
|
|
||||||
|
println!("linear-gradient({}deg, {}, #262626)", (output_state.gradient_angle_percentage * 180.0 - 90.0) as u32, gradient_color);
|
||||||
|
}
|
||||||
|
|
||||||
|
// println!("{}", serde_json::to_string(&output_state).unwrap());
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_time(i: &str) -> Option<i32> {
|
fn parse_time(i: &str) -> Option<i32> {
|
||||||
|
|
Loading…
Reference in a new issue