mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-29 08:09:58 +09:00
Support automatic switching to dark skin in CKEditor and SimpleEditor
This commit is contained in:
parent
c80a80f986
commit
e7b49baf13
12 changed files with 41 additions and 4 deletions
|
|
@ -33,18 +33,23 @@
|
|||
}
|
||||
|
||||
.light_dark(@cs) when (@cs = moono-dark) {
|
||||
background-color: #494949;
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
.light_dark(@cs) when not (@cs = moono-dark) {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
&.color_scheme_dark {
|
||||
background-color: #333;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.light_dark_top(@cs) when (@cs = moono-dark) {
|
||||
border-bottom-color: #1b1b1b;
|
||||
}
|
||||
.light_dark_top(@cs) when not (@cs = moono-dark) {
|
||||
border-bottom-color: #555;
|
||||
}
|
||||
|
||||
html {
|
||||
|
|
|
|||
|
|
@ -92,11 +92,19 @@ var auto_saved_msg = "{$lang->msg_auto_saved}";
|
|||
return val + "/" + val + "px";
|
||||
}).join(";");
|
||||
|
||||
// Apply auto dark mode.
|
||||
var editor_skin = '{$colorset}';
|
||||
<!--@if($editor_auto_dark_mode)-->
|
||||
if (getColorScheme() === 'dark') {
|
||||
editor_skin = 'moono-dark';
|
||||
}
|
||||
<!--@endif-->
|
||||
|
||||
// Initialize CKEditor settings.
|
||||
var settings = {
|
||||
ckeconfig: {
|
||||
height: '{$editor_height}',
|
||||
skin: '{$colorset}',
|
||||
skin: editor_skin,
|
||||
contentsCss: {json_encode($css_file_list)},
|
||||
xe_editor_sequence: {$editor_sequence},
|
||||
font_defaultLabel: default_font_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue