From 928529f4d807910b612679f9362be910b8c999d5 Mon Sep 17 00:00:00 2001 From: daya0576 Date: Sun, 4 Aug 2019 22:38:59 +0800 Subject: [PATCH 1/3] fix: checking if font global setting is disabled --- source/css/_variables/base.styl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index 4fdf9fd0ca..fc380f152c 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -85,7 +85,7 @@ $font-weight-bolder = 700; // Font size $font-size-base = 1em; -$font-size-base = unit(hexo-config('font.global.size'), em) if hexo-config('font.global.size') is a 'unit'; +$font-size-base = unit(hexo-config('font.global.size'), em) if hexo-config('font.enable') and hexo-config('font.global.size') is a 'unit'; $font-size-smallest = .75em; $font-size-smaller = .8125em; $font-size-small = .875em; @@ -98,7 +98,7 @@ $font-size-largest = 1.375em; // Headings font size $font-size-headings-step = .125em; $font-size-headings-base = 1.875em; -$font-size-headings-base = unit(hexo-config('font.headings.size'), em) if hexo-config('font.headings.size') is a 'unit'; +$font-size-headings-base = unit(hexo-config('font.headings.size'), em) if hexo-config('font.enable') and hexo-config('font.headings.size') is a 'unit'; // Global line height @@ -200,7 +200,7 @@ $brand-hover-color = white; $brand-bg = $black-deep; $title-font-size = $font-size-largest; -$title-font-size = unit(hexo-config('font.title.size'), em) if hexo-config('font.title.size') is a 'unit'; +$title-font-size = unit(hexo-config('font.title.size'), em) if hexo-config('font.enable') and hexo-config('font.title.size') is a 'unit'; $subtitle-font-size = $font-size-smaller; $subtitle-color = $grey-dark; $site-subtitle-color = $grey-dark; From 038ec2206e96695477e2803792316ed8194adb00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=C9=AA=E1=B4=8D=C9=AA?= <1119186082@qq.com> Date: Mon, 14 Oct 2019 20:46:53 +0800 Subject: [PATCH 2/3] Update _config.yml --- _config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/_config.yml b/_config.yml index 734270f900..e724ffc37b 100644 --- a/_config.yml +++ b/_config.yml @@ -456,8 +456,6 @@ github_banner: # --------------------------------------------------------------- font: - # Use custom fonts families or not. - # Depended options: `external` and `family`. enable: false # Uri of fonts host, e.g. //fonts.googleapis.com (Default). From f0c9ab7ac66cf26d1c19fa115607b1d4ed5b7c8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=8D=C9=AA=E1=B4=8D=C9=AA?= <1119186082@qq.com> Date: Mon, 14 Oct 2019 20:50:16 +0800 Subject: [PATCH 3/3] Update base.styl --- source/css/_variables/base.styl | 1 + 1 file changed, 1 insertion(+) diff --git a/source/css/_variables/base.styl b/source/css/_variables/base.styl index 66f7261f28..915a825147 100644 --- a/source/css/_variables/base.styl +++ b/source/css/_variables/base.styl @@ -197,6 +197,7 @@ $site-meta-text-align = center; $brand-color = white; $brand-hover-color = white; $brand-bg = $black-deep; + $font-size-title = $font-size-largest; $font-size-title = unit(hexo-config('font.title.size'), em) if hexo-config('font.enable') and hexo-config('font.title.size') is a 'unit'; $font-size-subtitle = $font-size-smaller;