From fb027d7eed698df8d5563ea56a42b362a6626ffb Mon Sep 17 00:00:00 2001 From: XPoet Date: Thu, 6 Aug 2020 10:44:29 +0800 Subject: [PATCH] style: pull out the Scale and Shadow configuration items --- _config.yml | 3 ++- source/css/layout/common/magic-theme.styl | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/_config.yml b/_config.yml index 8312303..8dd1222 100644 --- a/_config.yml +++ b/_config.yml @@ -93,7 +93,8 @@ toc: # magic theme magic: enable: true - transform: true + scale: false + shadow: true sidebar: enable: false fixed: true diff --git a/source/css/layout/common/magic-theme.styl b/source/css/layout/common/magic-theme.styl index 877bf98..68c9c8a 100644 --- a/source/css/layout/common/magic-theme.styl +++ b/source/css/layout/common/magic-theme.styl @@ -6,13 +6,17 @@ magic-style(scaleX, scaleY) { box-shadow: 0 0 2px var(--border-color); transition(); - if (hexo-config('magic.transform')) { - &:hover { - transition(); - box-shadow: 0 0 6px var(--border-color); + &:hover { + + transition(); + + if (hexo-config('magic.scale')) { transform: scaleX(scaleX) scaleY(scaleY); } + if (hexo-config('magic.shadow')) { + box-shadow: 0 0 8px var(--border-color); + } } }