2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
|
|
|
// KEEP THEME VARIABLE //
|
|
|
|
// ==============================================================================================
|
2020-04-01 23:03:38 +08:00
|
|
|
|
2021-01-06 11:51:39 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-04-02 11:01:24 +08:00
|
|
|
// layout
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2021-04-29 10:53:39 +08:00
|
|
|
$header-height = 70px; // header height
|
2021-04-29 11:41:20 +08:00
|
|
|
$header-shrink-height = $header-height * 0.72; // header shrink height
|
2021-01-08 16:07:54 +08:00
|
|
|
$scroll-progress-bar-height = 2px; // scroll progress bar height
|
2021-01-07 15:42:25 +08:00
|
|
|
$main-content-width = 80%; // main content width (PC)
|
|
|
|
$main-content-width-tablet = 86%; // main content width (tablet)
|
2021-01-07 15:15:39 +08:00
|
|
|
$main-content-width-mobile = 90%; // main content width (mobile)
|
2021-01-07 15:42:25 +08:00
|
|
|
$post-tool-button-width = 38px; // post tool button width
|
2021-03-16 17:34:02 +08:00
|
|
|
$component-spacing-value = 38px; // component-spacing-value (PC)
|
2021-01-07 15:15:39 +08:00
|
|
|
|
|
|
|
// main content max width
|
2020-11-25 23:39:24 +08:00
|
|
|
$temp-content-max-width = hexo-config('style.content_max_width');
|
|
|
|
$content-max-width = $temp-content-max-width ? convert($temp-content-max-width) : 1000px;
|
|
|
|
|
2020-04-29 18:41:29 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2021-01-07 15:15:39 +08:00
|
|
|
// media query
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2021-01-07 15:15:39 +08:00
|
|
|
$media-max-width = 780px; // media query max width (tablet)
|
|
|
|
$media-max-width-mobile = 500px; // media query max width (mobile)
|
2020-06-04 22:11:27 +08:00
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
keep-tablet()
|
2020-06-04 22:11:27 +08:00
|
|
|
@media (max-width: $media-max-width)
|
2021-03-29 10:33:37 +08:00
|
|
|
{ block }
|
2020-06-04 22:11:27 +08:00
|
|
|
|
2020-11-20 12:02:22 +08:00
|
|
|
keep-mobile()
|
2020-06-04 22:11:27 +08:00
|
|
|
@media (max-width: $media-max-width-mobile)
|
2021-03-29 10:33:37 +08:00
|
|
|
{ block }
|
2020-04-29 18:41:29 +08:00
|
|
|
|
2020-04-24 22:49:10 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-04-01 23:03:38 +08:00
|
|
|
// z-index
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-04-02 11:01:24 +08:00
|
|
|
$z-index-1 = 1001;
|
|
|
|
$z-index-2 = 1002;
|
|
|
|
$z-index-3 = 1003;
|
|
|
|
$z-index-4 = 1004;
|
|
|
|
$z-index-5 = 1005;
|
|
|
|
$z-index-6 = 1006;
|
2020-09-05 22:41:10 +08:00
|
|
|
$z-index-7 = 1007;
|
|
|
|
$z-index-8 = 1008;
|
2020-10-25 10:48:07 +08:00
|
|
|
$z-index-9 = 1009;
|
2020-04-01 22:42:24 +08:00
|
|
|
|
2020-03-21 23:04:01 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
|
|
|
// theme primary color
|
|
|
|
// ==============================================================================================
|
2020-11-17 10:50:55 +08:00
|
|
|
$temp-color = hexo-config('style.primary_color');
|
2020-11-18 11:15:03 +08:00
|
|
|
$primary-color = $temp-color ? convert($temp-color) : #0066CC;
|
|
|
|
|
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
|
|
|
// theme light mode color set
|
|
|
|
// ==============================================================================================
|
2020-11-18 11:15:03 +08:00
|
|
|
$background-color = #fff;
|
2020-11-18 18:45:45 +08:00
|
|
|
$second-background-color = darken($background-color, 3%);
|
2021-01-21 18:59:22 +08:00
|
|
|
$default-text-color = #50505c;
|
2020-11-18 11:15:03 +08:00
|
|
|
$first-text-color = darken($default-text-color, 10%);
|
|
|
|
$second-text-color = darken($default-text-color, 5%);
|
2020-11-20 12:02:22 +08:00
|
|
|
$third-text-color = lighten($default-text-color, 30%);
|
2020-11-18 11:15:03 +08:00
|
|
|
$fourth-text-color = lighten($default-text-color, 90%);
|
|
|
|
$border-color = darken($background-color, 30%);
|
|
|
|
$selection-color = lighten($primary-color, 10%);
|
2020-11-15 22:06:32 +08:00
|
|
|
$shadow-color = rgba(0, 0, 0, 0.2);
|
|
|
|
$shadow-hover-color = rgba(0, 0, 0, 0.28);
|
2021-04-01 10:08:10 +08:00
|
|
|
$scrollbar-color = lighten($default-text-color, 6%);
|
2021-03-29 10:33:37 +08:00
|
|
|
$scroll-bar-bg-color = darken($background-color, 10%);
|
2020-11-18 18:45:45 +08:00
|
|
|
$link-color = darken($default-text-color, 10%);
|
2020-11-19 15:14:53 +08:00
|
|
|
$copyright-info-color = #CC0033;
|
2021-01-05 18:08:41 +08:00
|
|
|
$avatar-background-color = #0066CC;
|
2022-09-27 17:52:45 +08:00
|
|
|
$header-transparent-background-1 = alpha($background-color, 0.58);
|
|
|
|
$header-transparent-background-2 = alpha($background-color, 0.38);
|
2021-01-11 00:10:59 +08:00
|
|
|
$pjax-progress-bar-color = linear-gradient(45deg, #f10006, #ef5b00, #e59c01, #19ca05, #00cab5, #0264c8, #c303c3);
|
2020-03-21 23:04:01 +08:00
|
|
|
|
2021-01-06 11:51:39 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
|
|
|
// theme dark mode color set
|
|
|
|
// ==============================================================================================
|
2020-04-03 18:18:42 +08:00
|
|
|
$dark-primary-color = $primary-color;
|
2021-01-21 18:59:22 +08:00
|
|
|
$dark-background-color = #383940;
|
2020-11-19 15:14:53 +08:00
|
|
|
$dark-second-background-color = darken($dark-background-color, 10%);
|
2021-01-21 18:59:22 +08:00
|
|
|
$dark-default-text-color = #bebec6;
|
2020-11-18 11:15:03 +08:00
|
|
|
$dark-first-text-color = lighten($dark-default-text-color, 30%);
|
|
|
|
$dark-second-text-color = lighten($dark-default-text-color, 20%);
|
|
|
|
$dark-third-text-color = darken($dark-default-text-color, 20%);
|
|
|
|
$dark-fourth-text-color = darken($dark-default-text-color, 80%);
|
2020-04-07 11:57:53 +08:00
|
|
|
$dark-border-color = lighten($dark-background-color, 20%);
|
2020-04-03 18:18:42 +08:00
|
|
|
$dark-selection-color = $selection-color;
|
2020-11-15 22:06:32 +08:00
|
|
|
$dark-shadow-color = rgba(128, 128, 128, 0.2);
|
|
|
|
$dark-shadow-hover-color = rgba(128, 128, 128, 0.28);
|
2021-03-17 11:31:50 +08:00
|
|
|
$dark-scrollbar-color = darken($dark-background-color, 10%);
|
|
|
|
$dark-scroll-bar-bg-color = lighten($dark-background-color, 20%);
|
2020-11-18 18:45:45 +08:00
|
|
|
$dark-link-color = lighten($dark-default-text-color, 10%);
|
2020-11-19 15:14:53 +08:00
|
|
|
$dark-copyright-info-color = darken($copyright-info-color, 20%);
|
2021-01-06 18:36:28 +08:00
|
|
|
$dark-avatar-background-color = darken($avatar-background-color, 10%);
|
2022-09-27 17:52:45 +08:00
|
|
|
$dark-header-transparent-background-1 = alpha($dark-background-color, 0.58);
|
|
|
|
$dark-header-transparent-background-2 = alpha($dark-background-color, 0.38);
|
2021-01-08 16:07:54 +08:00
|
|
|
$dark-pjax-progress-bar-color = linear-gradient(45deg, #ea404a, #ea722f, #e9a71f, #67e559, #18ecec, #1b85f1, #ee1dee);
|
2020-04-01 22:42:24 +08:00
|
|
|
|
2021-01-06 11:51:39 +08:00
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-04-02 11:01:24 +08:00
|
|
|
// font
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-11-17 11:50:11 +08:00
|
|
|
$default-font-family = Optima-Regular, Optima, -apple-system, system-ui, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial;
|
2020-09-09 16:30:18 +08:00
|
|
|
$default-font-size = 15.2px;
|
2020-11-13 14:43:22 +08:00
|
|
|
$default-font-line-height = 22px;
|
2020-04-02 11:01:24 +08:00
|
|
|
$default-font-weight = 400;
|
2020-03-21 23:04:01 +08:00
|
|
|
|
|
|
|
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-11-17 18:21:16 +08:00
|
|
|
// light/dark mode color
|
2022-09-27 17:52:45 +08:00
|
|
|
// ==============================================================================================
|
2020-11-17 18:21:16 +08:00
|
|
|
root-color(mode) {
|
|
|
|
--background-color: mode == 'light' ? $background-color : $dark-background-color;
|
|
|
|
--second-background-color: mode == 'light' ? $second-background-color : $dark-second-background-color;
|
|
|
|
--primary-color: mode == 'light' ? $primary-color : $dark-primary-color;
|
|
|
|
--first-text-color: mode == 'light' ? $first-text-color : $dark-first-text-color;
|
|
|
|
--second-text-color: mode == 'light' ? $second-text-color : $dark-second-text-color;
|
|
|
|
--third-text-color: mode == 'light' ? $third-text-color : $dark-third-text-color;
|
|
|
|
--fourth-text-color: mode == 'light' ? $fourth-text-color : $dark-fourth-text-color;
|
2020-11-18 11:56:47 +08:00
|
|
|
--default-text-color: mode == 'light' ? $default-text-color : $dark-default-text-color;
|
2020-11-17 18:21:16 +08:00
|
|
|
--border-color: mode == 'light' ? $border-color : $dark-border-color;
|
|
|
|
--selection-color: mode == 'light' ? $selection-color : $dark-selection-color;
|
|
|
|
--shadow-color: mode == 'light' ? $shadow-color : $dark-shadow-color;
|
|
|
|
--shadow-hover-color: mode == 'light' ? $shadow-hover-color : $dark-shadow-hover-color;
|
2021-01-08 16:07:54 +08:00
|
|
|
--scrollbar-color: mode == 'light' ? $scrollbar-color : $dark-scrollbar-color;
|
2020-11-18 11:15:03 +08:00
|
|
|
--scroll-bar-bg-color: mode == 'light' ? $scroll-bar-bg-color : $dark-scroll-bar-bg-color;
|
2020-11-18 18:45:45 +08:00
|
|
|
--link-color: mode == 'light' ? $link-color : $dark-link-color;
|
2020-11-19 15:14:53 +08:00
|
|
|
--copyright-info-color: mode == 'light' ? $copyright-info-color : $dark-copyright-info-color;
|
2021-01-05 18:08:41 +08:00
|
|
|
--avatar-background-color: mode == 'light' ? $avatar-background-color : $dark-avatar-background-color;
|
2022-09-27 17:52:45 +08:00
|
|
|
--header-transparent-background-1: mode == 'light' ? $header-transparent-background-1 : $dark-header-transparent-background-1;
|
|
|
|
--header-transparent-background-2: mode == 'light' ? $header-transparent-background-2 : $dark-header-transparent-background-2;
|
2021-01-08 16:07:54 +08:00
|
|
|
--pjax-progress-bar-color : mode == 'light' ? $pjax-progress-bar-color : $dark-pjax-progress-bar-color;
|
2020-11-15 22:06:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-01-24 19:54:44 +08:00
|
|
|
:root {
|
|
|
|
root-color('light');
|
|
|
|
}
|
|
|
|
|
2021-01-24 20:04:04 +08:00
|
|
|
@media (prefers-color-scheme: light) {
|
|
|
|
:root {
|
|
|
|
root-color('light');
|
|
|
|
}
|
|
|
|
}
|
2021-01-24 19:54:44 +08:00
|
|
|
|
2020-11-15 22:06:32 +08:00
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
:root {
|
2020-11-17 18:21:16 +08:00
|
|
|
root-color('dark');
|
2020-11-15 22:06:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-23 22:31:20 +08:00
|
|
|
|
2020-11-17 18:21:16 +08:00
|
|
|
.light-mode {
|
|
|
|
root-color('light');
|
2020-04-02 20:37:34 +08:00
|
|
|
}
|
|
|
|
|
2021-01-24 19:54:44 +08:00
|
|
|
|
2020-11-17 18:21:16 +08:00
|
|
|
.dark-mode {
|
|
|
|
root-color('dark');
|
2020-07-09 18:24:13 +08:00
|
|
|
}
|