2021-02-19 23:33:19 +08:00
|
|
|
|
@require('_defines/const')
|
|
|
|
|
|
|
|
|
|
// 通用主题色
|
2021-03-13 13:32:45 +08:00
|
|
|
|
$color-theme = #1BCDFC
|
2021-02-19 23:33:19 +08:00
|
|
|
|
$color-link = #2196f3
|
|
|
|
|
$color-button = #1BCDFC
|
|
|
|
|
$color-hover = #ff5722
|
2022-01-04 23:34:21 +08:00
|
|
|
|
$color-highlight = #ff5722
|
2021-02-19 23:33:19 +08:00
|
|
|
|
$color-inner = #fff
|
|
|
|
|
$color-cat = #FF7844
|
|
|
|
|
$color-cat-hover = darken($color-cat, 20)
|
|
|
|
|
|
2021-04-02 20:24:16 +08:00
|
|
|
|
// 浅色
|
2021-06-23 13:41:05 +08:00
|
|
|
|
$light-site-bg = convert(hexo-config('style.theme.light'))
|
2021-04-02 20:24:16 +08:00
|
|
|
|
$light-block = #f2f2f2
|
|
|
|
|
$light-title = #000
|
2021-08-23 23:47:12 +08:00
|
|
|
|
$light-text = #333
|
2021-06-23 13:41:05 +08:00
|
|
|
|
$light-code = #111
|
2021-04-02 20:24:16 +08:00
|
|
|
|
$light-card = white
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
2021-04-02 20:24:16 +08:00
|
|
|
|
// 深色
|
2021-06-23 13:41:05 +08:00
|
|
|
|
$dark-site-bg = convert(hexo-config('style.theme.dark'))
|
2021-08-29 02:21:25 +08:00
|
|
|
|
$dark-block = darken(saturate($dark-site-bg, 40%), 2)
|
2021-04-02 20:24:16 +08:00
|
|
|
|
$dark-title = #fff
|
2021-07-29 00:25:37 +08:00
|
|
|
|
$dark-text = #eee
|
2021-06-23 13:41:05 +08:00
|
|
|
|
$dark-code = #ff7043
|
2021-08-29 02:21:25 +08:00
|
|
|
|
$dark-card = lighten(saturate($dark-site-bg, 50%), 10)
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
2021-04-02 20:24:16 +08:00
|
|
|
|
// 移动端深色背景(OLED调成纯黑可以省电)
|
|
|
|
|
$dark-site-bg-mobile = black
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @font-face
|
|
|
|
|
// font-family: 'Dosis'
|
2022-05-27 00:55:31 +08:00
|
|
|
|
// src: url('https://fastly.jsdelivr.net/gh/volantis-x/cdn-fonts@20.5.30/Dosis/Dosis-Medium.ttf')
|
2021-02-19 23:33:19 +08:00
|
|
|
|
// font-weight: normal
|
|
|
|
|
// font-style: normal
|
|
|
|
|
|
2021-03-05 21:37:28 +08:00
|
|
|
|
$ff-body = system-ui, "Microsoft Yahei", "Segoe UI", -apple-system, Roboto, Ubuntu, "Helvetica Neue", Arial, "WenQuanYi Micro Hei", sans-serif
|
2021-07-03 13:21:54 +08:00
|
|
|
|
$ff-code = Menlo, Monaco, Consolas, system-ui, "Courier New", monospace, sans-serif
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
|
|
|
|
$ff-logo = $ff-body
|
|
|
|
|
|
|
|
|
|
// font size
|
|
|
|
|
$fs-root = 16px
|
2021-03-05 21:37:28 +08:00
|
|
|
|
$fs-15 = .9375rem
|
|
|
|
|
$fs-14 = .875rem
|
|
|
|
|
$fs-13 = .8125rem
|
|
|
|
|
$fs-12 = .75rem
|
|
|
|
|
|
2021-12-12 16:24:33 +08:00
|
|
|
|
$fs-h1 = 1.75rem // 32px
|
2021-03-05 21:37:28 +08:00
|
|
|
|
$fs-h2 = 1.5rem // 24px
|
2021-02-19 23:33:19 +08:00
|
|
|
|
$fs-h3 = 1.375rem // 22px
|
|
|
|
|
$fs-h4 = 1.125rem // 18px
|
2021-03-05 21:37:28 +08:00
|
|
|
|
$fs-h5 = $fs-15
|
|
|
|
|
$fs-h6 = $fs-12
|
2021-07-26 22:26:46 +08:00
|
|
|
|
$fs-p = $fs-15
|
2021-03-05 21:37:28 +08:00
|
|
|
|
$fs-code = $fs-13
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
|
|
|
|
$border-card = 12px
|
2021-07-26 22:26:46 +08:00
|
|
|
|
$border-block = 6px
|
|
|
|
|
$border-image = 6px
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
2021-03-05 21:37:28 +08:00
|
|
|
|
// 可以动态变化的属性
|
|
|
|
|
:root
|
2021-04-02 20:24:16 +08:00
|
|
|
|
--width-left: 256px
|
2021-12-12 16:24:33 +08:00
|
|
|
|
--width-main: 720px
|
2021-03-05 21:37:28 +08:00
|
|
|
|
--gap-l: 16px
|
2022-01-04 23:34:21 +08:00
|
|
|
|
--gap-p: .75rem // gap for paragraph
|
2021-03-05 21:37:28 +08:00
|
|
|
|
// desktop 2k or larger
|
|
|
|
|
@media screen and (min-width: $device-2k)
|
2021-07-26 22:26:46 +08:00
|
|
|
|
--gap-l: 32px
|
2021-03-11 23:19:41 +08:00
|
|
|
|
--width-left: 320px
|
2021-12-12 16:24:33 +08:00
|
|
|
|
--width-main: 780px
|
2021-03-05 21:37:28 +08:00
|
|
|
|
// desktop 4k or larger
|
|
|
|
|
@media screen and (min-width: $device-4k)
|
|
|
|
|
--width-main: 860px
|
|
|
|
|
--gap-l: 64px
|
2022-10-12 20:09:40 +08:00
|
|
|
|
// iPad 竖屏
|
|
|
|
|
@media screen and (max-width: $device-tablet)
|
|
|
|
|
--width-left: 220px
|
|
|
|
|
// iPad 竖屏
|
|
|
|
|
@media screen and (max-width: $device-mobile-max)
|
|
|
|
|
--width-left: 256px
|
|
|
|
|
|
2021-03-05 21:37:28 +08:00
|
|
|
|
|
2021-02-19 23:33:19 +08:00
|
|
|
|
|
|
|
|
|
// shadow
|
|
|
|
|
$boxshadow-card = 0 1px 2px 0px rgba(0, 0, 0, 0.1)
|
|
|
|
|
$boxshadow-float = 0 4px 8px 0px rgba(0, 0, 0, 0.1)
|
|
|
|
|
$boxshadow-card-float = 0 2px 4px 0px rgba(0, 0, 0, 0.1), 0 4px 8px 0px rgba(0, 0, 0, 0.1), 0 8px 16px 0px rgba(0, 0, 0, 0.1)
|
2021-07-09 21:18:14 +08:00
|
|
|
|
$boxshadow-button = 0 0 2px 0px rgba(0, 0, 0, 0.04), 0 0 8px 0px rgba(0, 0, 0, 0.04)
|
2021-07-09 22:41:09 +08:00
|
|
|
|
$boxshadow-block = 0 1px 4px 0px rgba(0, 0, 0, 0.02), 0 2px 8px 0px rgba(0, 0, 0, 0.02)
|