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:
enable: true
transform: true
scale: false
shadow: true
sidebar:
enable: false
fixed: true

View File

@ -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);
}
}
}