工具栏弹出隐藏效果优化

This commit is contained in:
结发受长生
2019-05-19 08:08:20 +08:00
parent 83a464b2c2
commit ea0d83d9fa
9 changed files with 63 additions and 34 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ window.AV = require('leancloud-storage')
* 但是缺少一些新功能
*/
// 评论配置
const commentConfig = require("../config/comment.json")
const commentConfig = require('../config/comment.json')
import(/* webpackChunkName: "valine" */ '../lib/Valine.min').then(({default: Valine }) => {
commentConfig.valine.config.path = window.location.pathname
+17 -2
View File
@@ -21,8 +21,23 @@ Util.addLoadEvent(function() {
}
})
const commentConfig = require("../config/comment.json")
const commentConfig = require('../config/comment.json')
if(window.themeConfig.isPost && commentConfig.valine.enable) {
// 文章详情页面, 并且启用了评论, 则加载评论相关代码
import(/* webpackChunkName: "comment" */ './comment')
}
}
var hideWaifu = localStorage.getItem('hideWaifu')
if(!hideWaifu || !eval(hideWaifu)) {
import(/* webpackChunkName: "waifu" */ './waifu').then(waifuInit => {
waifuInit.default.init()
})
}
// 控制台
console.log(
'\n %c Silence %c https://www.colorfulsweet.site \n',
'color:#FFFFFB;background:#ffa628;padding:5px 0;border-radius:.5rem 0 0 .5rem;',
'background: #efefef;padding:5px 0;border-radius:0 .5rem .5rem 0;'
)
console.log(`页面加载消耗了 ${(Math.round(performance.now()*100)/100/1000).toFixed(2)}s`)
+2 -1
View File
@@ -19,7 +19,7 @@ new Vue({
el: '#container',
data: {
isCtnShow: false,
isShow: false,
isShow: undefined,
items: [],
innerArchive: false,
friends: false,
@@ -191,6 +191,7 @@ const waifuTools = {
// 隐藏看板娘
setTimeout(function() {
document.querySelector('.waifu').style.display = 'none'
localStorage.setItem('hideWaifu', true)
}, 1300)
},
"tools.eye"() {
+8 -15
View File
@@ -12,19 +12,12 @@ function isSupportWebGL() {
return webGL && webGL instanceof WebGLRenderingContext
}
if(!isMobile && isSupportWebGL()) {
// 加载live2d模型
loadlive2d('live2d', 'https://blog-cdn.nos-eastchina1.126.net/live2D/Kesshouban/model.json')
document.querySelector('.waifu').style.display = 'block'
export default {
init() {
if(!isMobile && isSupportWebGL()) {
// 加载live2d模型
loadlive2d('live2d', 'https://blog-cdn.nos-eastchina1.126.net/live2D/Kesshouban/model.json')
document.querySelector('.waifu').style.display = 'block'
}
}
}
// 控制台
console.log(
'\n %c Silence %c https://www.colorfulsweet.site \n',
'color:#FFFFFB;background:#ffa628;padding:5px 0;border-radius:.5rem 0 0 .5rem;',
'background: #efefef;padding:5px 0;border-radius:0 .5rem .5rem 0;'
)
console.log(`页面加载消耗了 ${(Math.round(performance.now()*100)/100/1000).toFixed(2)}s`)