Skip to content

Commit b160213

Browse files
authored
Merge pull request #1551 from rysb-dev/feature/ayu-dark-theme
Add Ayu Dark theme
2 parents 9bd3ba4 + 693b454 commit b160213

File tree

3 files changed

+74
-1
lines changed

3 files changed

+74
-1
lines changed

data/style.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
@use "themes/archlinux" with ($generate_default: false);
2+
@use "themes/ayu_dark" with ($generate_default: false);
23
@use "themes/monokai" with ($generate_default: false);
34
@use "themes/squirrel" with ($generate_default: false);
45
@use "themes/zenburn" with ($generate_default: false);
56

67
// theme colors can be found at the bottom
7-
$themes: squirrel, archlinux, monokai, zenburn;
8+
$themes: squirrel, archlinux, ayu_dark, monokai, zenburn;
89

910
html {
1011
font-smoothing: antialiased;
@@ -865,6 +866,10 @@ th span.active span {
865866
@include archlinux.theme();
866867
}
867868

869+
@else if $name ==ayu_dark {
870+
@include ayu_dark.theme();
871+
}
872+
868873
@else if $name ==monokai {
869874
@include monokai.theme();
870875
}

data/themes/ayu_dark.scss

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
$generate_default: true !default;
2+
3+
@mixin theme {
4+
--background: #0d1017;
5+
--text_color: #bfbdb6;
6+
--directory_link_color: #e6b450;
7+
--directory_link_color_visited: #c99a3a;
8+
--file_link_color: #aad94c;
9+
--file_link_color_visited: #7fb032;
10+
--symlink_color: #73b8ff;
11+
--table_background: #131721;
12+
--table_text_color: #bfbdb6;
13+
--table_header_background: #1c2130;
14+
--table_header_text_color: #bfbdb6;
15+
--table_header_active_color: #e6b450;
16+
--active_row_color: #e6b45030;
17+
--odd_row_background: #111720;
18+
--even_row_background: #0f1219;
19+
--root_link_color: #39bae6;
20+
--download_button_background: #e6b450;
21+
--download_button_background_hover: #d9a53e;
22+
--download_button_link_color: #0d1017;
23+
--download_button_link_color_hover: #0d1017;
24+
--back_button_background: #e6b450;
25+
--back_button_background_hover: #d9a53e;
26+
--back_button_link_color: #0d1017;
27+
--back_button_link_color_hover: #0d1017;
28+
--date_text_color: #39bae6;
29+
--at_color: #39bae6;
30+
--switch_theme_background: #131721;
31+
--switch_theme_link_color: #bfbdb6;
32+
--switch_theme_active: #e6b450;
33+
--switch_theme_border: #1c2130;
34+
--change_theme_link_color: #bfbdb6;
35+
--change_theme_link_color_hover: #e6b450;
36+
--upload_text_color: #bfbdb6;
37+
--upload_form_border_color: #1c2130;
38+
--upload_form_background: #131721;
39+
--upload_button_background: #e6b450;
40+
--upload_button_text_color: #0d1017;
41+
--rm_button_background: #f26d78;
42+
--rm_button_text_color: #0d1017;
43+
--drag_background: #0d10178f;
44+
--drag_border_color: #e6b450;
45+
--drag_text_color: #bfbdb6;
46+
--size_background_color: #1c2130;
47+
--size_text_color: #bfbdb6;
48+
--error_color: #d95757;
49+
--footer_color: #39bae6;
50+
--success_color: #7fd962;
51+
--upload_modal_header_background: #1c2130;
52+
--upload_modal_header_color: #bfbdb6;
53+
--upload_modal_sub_header_background: #0d1017;
54+
--upload_modal_file_item_background: #bfbdb6;
55+
--upload_modal_file_item_color: #0d1017;
56+
--upload_modal_file_upload_complete_background: #636a72;
57+
--progress_bar_background: #e6b450;
58+
};
59+
60+
@if $generate_default {
61+
body {
62+
@include theme;
63+
}
64+
}

src/renderer.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ const THEME_PICKER_CHOICES: &[(&str, &str)] = &[
383383
("Default (light/dark)", "default"),
384384
("Squirrel (light)", "squirrel"),
385385
("Arch Linux (dark)", "archlinux"),
386+
("Ayu Dark (dark)", "ayu_dark"),
386387
("Zenburn (dark)", "zenburn"),
387388
("Monokai (dark)", "monokai"),
388389
];
@@ -393,6 +394,8 @@ pub enum ThemeSlug {
393394
Squirrel,
394395
#[strum(serialize = "archlinux")]
395396
Archlinux,
397+
#[strum(serialize = "ayu_dark")]
398+
AyuDark,
396399
#[strum(serialize = "zenburn")]
397400
Zenburn,
398401
#[strum(serialize = "monokai")]
@@ -404,6 +407,7 @@ impl ThemeSlug {
404407
match self {
405408
Self::Squirrel => grass::include!("data/themes/squirrel.scss"),
406409
Self::Archlinux => grass::include!("data/themes/archlinux.scss"),
410+
Self::AyuDark => grass::include!("data/themes/ayu_dark.scss"),
407411
Self::Zenburn => grass::include!("data/themes/zenburn.scss"),
408412
Self::Monokai => grass::include!("data/themes/monokai.scss"),
409413
}

0 commit comments

Comments
 (0)