Skip to content

Commit 83fda79

Browse files
committed
feat(style): add default value of page Style
add default value of border-radius,blur,opacity,the themeConfig options is - defaultBorderRadius - defaultOpacity - defaultBlur
1 parent 959cf58 commit 83fda79

File tree

4 files changed

+31
-7
lines changed

4 files changed

+31
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# [1.0.0](https://github.com/qsyyke/vuepress-theme-aurora/compare/v1.3.6...v1.0.0) (2021-10-18)
1+
# [1.0.0](https://github.com/qsyyke/vuepress-theme-aurora/compare/v1.3.6...v1.0.0) (2021-10-20)
2+
3+
4+
### Bug Fixes
5+
6+
* **router:** fix the new page router ([959cf58](https://github.com/qsyyke/vuepress-theme-aurora/commit/959cf58b2cdd4a203eebc4324ebaf0363d15ea22))
27

38

49

docs/.vuepress/theme/lib/client/components/child/home/StyleMenu.vue

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
<div style="flex: 3" class="custom-bottom-span custom-common-span">
5959
<div class="input-range">
6060
<div class="input-left">
61-
6261
<input min="0" max="70" v-model="blur" step="0.1" type="range">
6362
</div>
6463
<div class="input-right">
@@ -139,6 +138,21 @@ export default {
139138
this.fontFamilyArr = this.fontArr.slice(0,this.maxFontColorArr)
140139
}
141140
141+
console.log(this.themeProperty)
142+
143+
//获取主题配置默认圆角,模糊度,透明度
144+
if (this.themeProperty.defaultBorderRadius !== undefined) {
145+
this.borderRadius = this.themeProperty.defaultBorderRadius
146+
}
147+
148+
if (this.themeProperty.defaultOpacity !== undefined) {
149+
this.opacity = this.themeProperty.defaultOpacity
150+
}
151+
152+
if (this.themeProperty.defaultBlur !== undefined) {
153+
this.blur = this.themeProperty.defaultBlur
154+
}
155+
142156
this.$store.commit('setVarFilterBlur',{
143157
varFilterBlur: this.blur
144158
})

docs/.vuepress/theme/lib/client/styles/vars.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
/*伪元素测试*/
2020
--homeIcoCode: '\e924';
2121

22-
23-
24-
25-
2622
// brand colors
2723
--c-brand: #42a5f5;
2824
--c-brand-light: #4abf8a;

docs/.vuepress/themeConfig.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ module.exports = {
127127
keyword: "vuepress主题,vuepress theme,生活琐事,二次元博客,简约博客,博客主题,静态主题",
128128

129129
//样式控制面板打开之后,休眠多长时间自动关闭面板,单位毫秒
130-
slideTime: 3000,
130+
slideTime: 300000,
131131

132132
//随机一言接口
133133
randomSaw: "https://international.v1.hitokoto.cn/?c=b&max_length=45",
@@ -479,6 +479,15 @@ module.exports = {
479479
//默认打开网站时的毛玻璃状态,TRUE表示默认开启毛玻璃效果
480480
isFitter: true,
481481

482+
//默认的圆角,传入数字
483+
defaultBorderRadius: 10,
484+
485+
//默认的透明度,传入0到1之间的小数,0表示全透明
486+
defaultOpacity: 0,
487+
488+
//默认模糊度
489+
defaultBlur: 1,
490+
482491
//tag页面,标签分割符 请不要传入一个空字符串,默认值就是' ' 一个空格
483492
split: "~",
484493

0 commit comments

Comments
 (0)