From 7a9f4170a8469c53691f1380f2fe81f1fa267852 Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 29 Apr 2021 10:51:17 +0800 Subject: [PATCH 1/5] ui(animation): update fade-in-down-animation --- source/css/common/animated.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/css/common/animated.styl b/source/css/common/animated.styl index 0377eb6..1c8b318 100644 --- a/source/css/common/animated.styl +++ b/source/css/common/animated.styl @@ -36,7 +36,7 @@ transition-t(property, delay, duration, function) { .fade-in-down-animation { animation-fill-mode: both; - animation-duration: 0.8s; + animation-duration: 1s; animation-name: fade-in-down; } @@ -44,7 +44,7 @@ transition-t(property, delay, duration, function) { @keyframes fade-in-down { 0% { opacity: 0; - transform: translateY(-20px); + transform: translateY(-50px); } 100% { From 68df908550f6c81f22ee9b891f07f72eb6beff79 Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 29 Apr 2021 10:53:39 +0800 Subject: [PATCH 2/5] ui(layout): modified header height --- source/css/common/variables.styl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/css/common/variables.styl b/source/css/common/variables.styl index 6a36379..fd7a018 100644 --- a/source/css/common/variables.styl +++ b/source/css/common/variables.styl @@ -6,8 +6,8 @@ // ======================================================================================== // layout // ======================================================================================== -$header-height = 68px; // header height -$header-shrink-height = 50px; // header shrink height +$header-height = 70px; // header height +$header-shrink-height = $header-height * 0.7; // header shrink height $scroll-progress-bar-height = 2px; // scroll progress bar height $main-content-width = 80%; // main content width (PC) $main-content-width-tablet = 86%; // main content width (tablet) From 48177df3fba713109152785d8e477f79700077d3 Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 29 Apr 2021 11:41:20 +0800 Subject: [PATCH 3/5] feat: added LOGO image configuration item --- _config.yml | 2 ++ layout/_partial/header.ejs | 7 ++++++- source/css/common/variables.styl | 2 +- source/css/layout/_partial/header.styl | 29 +++++++++++++++++++++++++- 4 files changed, 37 insertions(+), 3 deletions(-) diff --git a/_config.yml b/_config.yml index 31b0e0a..a71e436 100644 --- a/_config.yml +++ b/_config.yml @@ -5,6 +5,8 @@ base_info: title: Keep Theme author: Keep Team url: https://keep.xpoet.cn/ + # Logo image (You can use local image, image external link or don’t fill) + logo_img: # --------------------------------------------------------------------------------------- diff --git a/layout/_partial/header.ejs b/layout/_partial/header.ejs index 52e43d8..93c5b75 100644 --- a/layout/_partial/header.ejs +++ b/layout/_partial/header.ejs @@ -2,8 +2,13 @@
diff --git a/source/css/common/variables.styl b/source/css/common/variables.styl index fd7a018..e437da9 100644 --- a/source/css/common/variables.styl +++ b/source/css/common/variables.styl @@ -7,7 +7,7 @@ // layout // ======================================================================================== $header-height = 70px; // header height -$header-shrink-height = $header-height * 0.7; // header shrink height +$header-shrink-height = $header-height * 0.72; // header shrink height $scroll-progress-bar-height = 2px; // scroll progress bar height $main-content-width = 80%; // main content width (PC) $main-content-width-tablet = 86%; // main content width (tablet) diff --git a/source/css/layout/_partial/header.styl b/source/css/layout/_partial/header.styl index bb06f16..444bf6b 100644 --- a/source/css/layout/_partial/header.styl +++ b/source/css/layout/_partial/header.styl @@ -1,6 +1,7 @@ $logo-title-font-size = 2rem; $pc-search-icon-font-size = 1.5rem; $menu-bar-line-height = 2.5px; +$logo-image-box-width = 46px; .header-wrapper { width: 100%; @@ -44,8 +45,33 @@ $menu-bar-line-height = 2.5px; transition-t("transform", "0", "0.2", "linear"); .header-shrink & { - transform: scale(0.8); + transform: scale(0.72); transform-origin: left; + } + + + if (hexo-config('base_info.logo_img') && hexo-config('base_info.logo_img') != '') { + .logo-image { + width: $logo-image-box-width; + height: $logo-image-box-width; + margin-right: 8px; + + + +keep-tablet() { + width: $logo-image-box-width * 0.9; + height: $logo-image-box-width * 0.9; + } + + +keep-mobile() { + width: $logo-image-box-width * 0.8; + height: $logo-image-box-width * 0.8; + } + + img { + border-radius: 6px; + width: 100%; + } + } } @@ -64,6 +90,7 @@ $menu-bar-line-height = 2.5px; font-size: $logo-title-font-size * 0.8; } } + } From 18776091ff82513280c9db4865ff7c54777ea16b Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 29 Apr 2021 11:48:45 +0800 Subject: [PATCH 4/5] docs: update README --- README.md | 6 ++++++ README_zh-CN.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index f721066..15aa500 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,12 @@ Or update to latest master branch: ```sh $ cd themes/keep +$ git pull +``` + +_If you modified theme source code:_ + +```sh $ git add . $ git stash $ git pull diff --git a/README_zh-CN.md b/README_zh-CN.md index b367afa..91016e8 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -70,6 +70,12 @@ $ npm update hexo-theme-keep ```sh $ cd themes/keep +$ git pull +``` + +_如果你修改了主题源码:_ + +```sh $ git add . $ git stash $ git pull From d233120290a277dfad96e7683a5733e3603bd85f Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 29 Apr 2021 11:49:30 +0800 Subject: [PATCH 5/5] chore(release): v3.4.3 --- _config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_config.yml b/_config.yml index a71e436..d7a94b1 100644 --- a/_config.yml +++ b/_config.yml @@ -236,4 +236,4 @@ footer: # --------------------------------------------------------------------------------------- # Keep version (Please don't modify) # --------------------------------------------------------------------------------------- -version: 3.4.2 +version: 3.4.3 diff --git a/package.json b/package.json index 914d745..aa319b6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-keep", - "version": "3.4.2", + "version": "3.4.3", "private": false, "description": "A simple and elegant theme for Hexo.", "scripts": {