Switch to Love theme colors.
This commit is contained in:
parent
7cc2d7518f
commit
1771bd7eb3
|
@ -8,10 +8,10 @@ use {
|
||||||
|
|
||||||
use crate::group_data::GroupDataModel;
|
use crate::group_data::GroupDataModel;
|
||||||
|
|
||||||
const BACKGROUND_1: RGBColor = RGBColor(17, 17, 17);
|
const BACKGROUND_1: RGBColor = RGBColor(31, 23, 49);
|
||||||
const BACKGROUND_2: RGBColor = RGBColor(0, 0, 0);
|
const BACKGROUND_2: RGBColor = RGBColor(42, 32, 65);
|
||||||
const FOREGROUND: RGBColor = RGBColor(255, 255, 255);
|
const FOREGROUND: RGBColor = RGBColor(242, 239, 255);
|
||||||
const ACCENT_1: RGBColor = RGBColor(255, 0, 255);
|
const ACCENT_1: RGBColor = RGBColor(210, 184, 58);
|
||||||
|
|
||||||
/// The chart for the user count.
|
/// The chart for the user count.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -46,7 +46,7 @@ impl UserCountChart {
|
||||||
|
|
||||||
let path = parent.join("user-count.svg");
|
let path = parent.join("user-count.svg");
|
||||||
let chart_root = SVGBackend::new(&path, (1280, 720)).into_drawing_area();
|
let chart_root = SVGBackend::new(&path, (1280, 720)).into_drawing_area();
|
||||||
chart_root.fill(&BACKGROUND_1)?;
|
chart_root.fill(&BACKGROUND_2)?;
|
||||||
|
|
||||||
let text_style =
|
let text_style =
|
||||||
|font_size: i32| ("sans-serif", font_size).into_font().color(&FOREGROUND);
|
|font_size: i32| ("sans-serif", font_size).into_font().color(&FOREGROUND);
|
||||||
|
@ -55,7 +55,7 @@ impl UserCountChart {
|
||||||
.margin(20, 20, 20, 20)
|
.margin(20, 20, 20, 20)
|
||||||
.titled("Tildes User Count", text_style(30))?;
|
.titled("Tildes User Count", text_style(30))?;
|
||||||
|
|
||||||
chart_root.fill(&BACKGROUND_1)?;
|
chart_root.fill(&BACKGROUND_2)?;
|
||||||
|
|
||||||
let mut chart = ChartBuilder::on(&chart_root)
|
let mut chart = ChartBuilder::on(&chart_root)
|
||||||
.caption(
|
.caption(
|
||||||
|
@ -75,9 +75,9 @@ impl UserCountChart {
|
||||||
.y_labels(5)
|
.y_labels(5)
|
||||||
.y_label_formatter(&|y| format!("{y:0}"))
|
.y_label_formatter(&|y| format!("{y:0}"))
|
||||||
.label_style(text_style(20))
|
.label_style(text_style(20))
|
||||||
.axis_style(&BACKGROUND_2)
|
.axis_style(&BACKGROUND_1)
|
||||||
.light_line_style(&BACKGROUND_2)
|
.light_line_style(&BACKGROUND_1)
|
||||||
.bold_line_style(&BACKGROUND_1)
|
.bold_line_style(&BACKGROUND_2)
|
||||||
.draw()?;
|
.draw()?;
|
||||||
|
|
||||||
chart
|
chart
|
||||||
|
|
|
@ -6,11 +6,11 @@ body {
|
||||||
--small-spacing: 4px;
|
--small-spacing: 4px;
|
||||||
--medium-spacing: 8px;
|
--medium-spacing: 8px;
|
||||||
--large-spacing: 16px;
|
--large-spacing: 16px;
|
||||||
--background-1: #222;
|
--background-1: #1f1731;
|
||||||
--background-2: #111;
|
--background-2: #2a2041;
|
||||||
--foreground-1: #fff;
|
--foreground-1: #f2efff;
|
||||||
--anchor-1: #f0f;
|
--anchor-1: #d2b83a;
|
||||||
--anchor-2: #000;
|
--anchor-2: var(--foreground-1);
|
||||||
|
|
||||||
background-color: var(--background-1);
|
background-color: var(--background-1);
|
||||||
color: var(--foreground-1);
|
color: var(--foreground-1);
|
||||||
|
@ -20,10 +20,8 @@ body {
|
||||||
a,
|
a,
|
||||||
a:visited {
|
a:visited {
|
||||||
color: var(--anchor-1);
|
color: var(--anchor-1);
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--anchor-1);
|
|
||||||
color: var(--anchor-2);
|
color: var(--anchor-2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue