From cfafbb43bf6910c7480653b946641339979ad811 Mon Sep 17 00:00:00 2001 From: XPoet Date: Mon, 26 Sep 2022 14:19:12 +0800 Subject: [PATCH] perf(config): change the position of the logo configuration item --- _config.yml | 8 ++++---- layout/_partial/header.ejs | 12 ++++++------ source/css/layout/_partial/header.styl | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/_config.yml b/_config.yml index 782b68c..bee6c31 100644 --- a/_config.yml +++ b/_config.yml @@ -11,10 +11,6 @@ base_info: # Your blog website url url: https://keep.xpoet.cn/ - # Your blog website logo image - # You can use local image, image external link or don’t fill - logo: /images/logo.svg - # --------------------------------------------------------------------------------------- # Theme style settings # --------------------------------------------------------------------------------------- @@ -22,6 +18,10 @@ style: # Theme primary color primary_color: "#0066CC" + # Your blog website logo image + # You can use local image, image external link or don’t fill + logo: /images/logo.svg + # Avatar (You can use local image or image external link) avatar: /images/avatar.svg diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 6c241dd..9d2f1d8 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -1,19 +1,19 @@
- <% - const { title, logo, logo_img } = theme.base_info - const { title: configTitle } = config + const { title: bi_title, logo_img: bi_logo_img } = theme.base_info + const { logo: s_logo } = theme.style + const { title: config_title } = config %>
diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index bb4ab0a..67c0a31 100644 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -50,7 +50,7 @@ $logo-image-box-width = 46px; } - if (hexo-config('base_info.logo_img') || hexo-config('base_info.logo')) { + if (hexo-config('base_info.logo_img') || hexo-config('style.logo')) { .logo-image { width: $logo-image-box-width; height: $logo-image-box-width;