feat(config): added font size and font family settings (#68)
This commit is contained in:
parent
bfcde2c571
commit
e885fdfbcb
|
@ -34,6 +34,14 @@ style:
|
||||||
# Avatar (You can use local image or image external link)
|
# Avatar (You can use local image or image external link)
|
||||||
avatar: /images/avatar.svg
|
avatar: /images/avatar.svg
|
||||||
|
|
||||||
|
# Font size, customize font size. (you don't usually have to fill)
|
||||||
|
# e.g. font_size: 18px
|
||||||
|
font_size:
|
||||||
|
|
||||||
|
# Font family, customize font family. (you don't usually have to fill)
|
||||||
|
# e.g. font_family: STKaiti, STSong, STHeiti
|
||||||
|
font_family:
|
||||||
|
|
||||||
# Left side TOC width (you don't usually have to change it)
|
# Left side TOC width (you don't usually have to change it)
|
||||||
left_side_width: 260px
|
left_side_width: 260px
|
||||||
|
|
||||||
|
|
|
@ -111,10 +111,13 @@ $dark-pjax-progress-bar-color = linear-gradient(45deg, #ea404a, #ea722f, #e9a71f
|
||||||
|
|
||||||
|
|
||||||
// ==============================================================================================
|
// ==============================================================================================
|
||||||
// font
|
// font settings
|
||||||
// ==============================================================================================
|
// ==============================================================================================
|
||||||
$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
|
$preset-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
|
||||||
$default-font-size = 15.2px
|
$custom-font-family = hexo-config('style.font_family')
|
||||||
|
$default-font-family = $custom-font-family ? convert($custom-font-family) : $preset-font-family
|
||||||
|
$custom-font-size = hexo-config('style.font_size')
|
||||||
|
$default-font-size = $custom-font-size ? convert($custom-font-size) : 15.2px
|
||||||
$default-font-line-height = 22px
|
$default-font-line-height = 22px
|
||||||
$default-font-weight = 400
|
$default-font-weight = 400
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue