// ================================== // THEME VARIABLE // ================================== // =============================== // layout // =============================== if (hexo-config('magic.enable') == true) { $header-height = 80px; // 头部默认高度 } else { $header-height = 100px; // 头部默认高度 } if (hexo-config('magic.enable') == true && hexo-config('magic.sidebar.enable') == true ) { $main-content-width = 80%; $sidebar-width = 280px; // 侧边栏宽度 } else { $main-content-width = 66%; } $header-shrink-height = 60px; // 头部收缩高度 $media-max-width = 760px; // 媒体查询最大宽度 $tool-button-width = 36px; // 方形工具按钮宽度 // =============================== // z-index // =============================== $z-index-1 = 1001; $z-index-2 = 1002; $z-index-3 = 1003; $z-index-4 = 1004; $z-index-5 = 1005; $z-index-6 = 1006; // =============================== // color // =============================== // normal mode color $primary-color = #1b65ea; // 主题颜色 $background-color = #fff; // 背景颜色 $magic-background-color = #f5f5f5; // MAGIC 主题背景颜色 $normal-text-color = #393749; // 通用文本颜色(默认字体颜色) $first-text-color = darken($normal-text-color, 15%); // 第一文本颜色 $second-text-color = darken($normal-text-color, 5%); // 第二文本颜色 $third-text-color = lighten($normal-text-color, 35%); // 第三文本颜色 $fourth-text-color = lighten($normal-text-color, 50%); // 第四文本颜色 $border-color = darken($background-color, 30%); // 边框颜色 $selection-color = lighten($primary-color, 20%); // 文字选中的颜色 // dark mode color $dark-primary-color = $primary-color; $dark-background-color = #3a3a3a; $dark-magic-background-color = #2a2a2a; $dark-normal-text-color = #bbb; $dark-first-text-color = lighten($dark-normal-text-color, 30%); $dark-second-text-color = lighten($dark-normal-text-color, 20%); $dark-third-text-color = darken($dark-normal-text-color, 20%); $dark-fourth-text-color = lighten($dark-normal-text-color, 30%); $dark-border-color = lighten($dark-background-color, 20%); $dark-selection-color = $selection-color; // =============================== // font // =============================== //$default-font-family = 'PingHei', 'PingFang SC', 'Microsoft YaHei'; //$default-font-family = 'PingFang SC', 'Hiragino Sans GB', 'STHeiti Light'; //$default-font-family = 'Microsoft YaHei', 'SimHei', 'WenQuanYi Micro Hei', sans-serif; //$default-font-family = "Exo 2", "Trebuchet MS", "Helvetica", "Arial"; $default-font-family = Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif; $default-font-size = 15px; $default-font-line-height = 20px; $default-font-weight = 400; :root { --background-color: $background-color; --magic-background-color: $magic-background-color; --primary-color: $primary-color; --first-text-color: $first-text-color; --fourth-text-color: $fourth-text-color; --second-text-color: $second-text-color; --third-text-color: $third-text-color; --normal-text-color: $normal-text-color; --border-color: $border-color; --selection-color: $selection-color; } @media (prefers-color-scheme: dark) { :root { --background-color: $dark-background-color; --magic-background-color: $dark-magic-background-color; --primary-color: $dark-primary-color; --first-text-color: $dark-first-text-color; --second-text-color: $dark-second-text-color; --third-text-color: $dark-third-text-color; --fourth-text-color: $dark-fourth-text-color; --normal-text-color: $dark-normal-text-color; --border-color: $dark-border-color; --selection-color: $dark-selection-color; } } .dark-mode { --background-color: $dark-background-color; --magic-background-color: $dark-magic-background-color; --primary-color: $dark-primary-color; --first-text-color: $dark-first-text-color; --second-text-color: $dark-second-text-color; --third-text-color: $dark-third-text-color; --fourth-text-color: $dark-fourth-text-color; --normal-text-color: $dark-normal-text-color; --border-color: $dark-border-color; --selection-color: $dark-selection-color; } .light-mode { --background-color: $background-color; --magic-background-color: $magic-background-color; --primary-color: $primary-color; --first-text-color: $first-text-color; --second-text-color: $second-text-color; --third-text-color: $third-text-color; --fourth-text-color: $fourth-text-color; --normal-text-color: $normal-text-color; --border-color: $border-color; --selection-color: $selection-color; }