style: pull out the Scale and Shadow configuration items

This commit is contained in:
XPoet 2020-08-06 10:44:29 +08:00
parent 6db1d0c0ca
commit fb027d7eed
2 changed files with 10 additions and 5 deletions

View File

@ -93,7 +93,8 @@ toc:
# magic theme # magic theme
magic: magic:
enable: true enable: true
transform: true scale: false
shadow: true
sidebar: sidebar:
enable: false enable: false
fixed: true fixed: true

View File

@ -6,13 +6,17 @@ magic-style(scaleX, scaleY) {
box-shadow: 0 0 2px var(--border-color); box-shadow: 0 0 2px var(--border-color);
transition(); transition();
if (hexo-config('magic.transform')) { &:hover {
&:hover {
transition(); transition();
box-shadow: 0 0 6px var(--border-color);
if (hexo-config('magic.scale')) {
transform: scaleX(scaleX) scaleY(scaleY); transform: scaleX(scaleX) scaleY(scaleY);
} }
if (hexo-config('magic.shadow')) {
box-shadow: 0 0 8px var(--border-color);
}
} }
} }