提交 cece2587 编写于 作者: EvanOne(文一)'s avatar EvanOne(文一)

refactor: Modify the configuration item for body background image

上级 4855eeab
......@@ -164,9 +164,13 @@ body:
repeat: false
# Mask effect of the background image.
mask:
enable: false
enable: true
# Opacity of mask (value: 0 ~ 1).
opacity: 0.5
opacity:
# Opacity of the mask for the body background image by default.
default: 0.1
# Opacity of the mask for the body background image in night mode.
night_mode: 0.6
# Footer of your site.
footer:
......
......@@ -21,7 +21,7 @@ if (hexo-config('body.bg_image.enable')) {
&::before {
bodyBgSet();
z-index: $z-index-1;
background-color: alpha(#000, hexo-config('body.mask.opacity'));
background-color: alpha(#000, hexo-config('body.mask.opacity.default'));
}
}
......@@ -36,6 +36,16 @@ if (hexo-config('body.bg_image.enable')) {
}
}
}
if (hexo-config('body.mask.enable')) {
.nightmode {
body {
&::before {
background-color: alpha(#000, hexo-config('body.mask.opacity.night_mode'));
}
}
}
}
}
.container {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册