feat: 修改配置
This commit is contained in:
parent
1558d0a669
commit
a1fedc0e8f
|
@ -22,6 +22,7 @@
|
|||
*.less text
|
||||
*.sql text
|
||||
*.properties text
|
||||
*.md text
|
||||
|
||||
# unix style
|
||||
*.sh text eol=lf
|
||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x]
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
# 使用的动作。格式:userName/repoName。作用:检出仓库,获取源码。 官方actions库:https://github.com/actions
|
||||
|
|
|
@ -53,6 +53,7 @@ bundle*.js
|
|||
Thumbs.db
|
||||
db.json
|
||||
book.pdf
|
||||
package-lock.json
|
||||
|
||||
|
||||
# ------------------------------- intellij -------------------------------
|
||||
|
|
|
@ -12,7 +12,10 @@ module.exports = {
|
|||
// 注入到页面<head> 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?]
|
||||
['link', { rel: 'icon', href: '/img/favicon.ico' }], //favicons,资源放在public文件夹
|
||||
['meta', { name: 'keywords', content: 'vuepress,theme,blog,vdoing' }],
|
||||
['meta', { name: 'theme-color', content: '#11a8cd' }] // 移动浏览器主题颜色
|
||||
['meta', { name: 'theme-color', content: '#11a8cd' }], // 移动浏览器主题颜色
|
||||
|
||||
['meta', { name: 'wwads-cn-verify', content: 'mxqWx62nfQQ9ocT4e5DzISHzOWyF4s' }], // 广告相关,你可以去掉
|
||||
['script', { src: 'https://cdn.wwads.cn/js/makemoney.js', type: 'text/javascript' }], // 广告相关,你可以去掉
|
||||
],
|
||||
markdown: {
|
||||
// lineNumbers: true,
|
||||
|
|
|
@ -20,11 +20,28 @@
|
|||
|
||||
module.exports = {
|
||||
// 万维广告
|
||||
pageB: `
|
||||
<div class="wwads-cn wwads-horizontal pageB" data-id="136" style="width:100%;max-height:80px;min-height:auto;"></div>
|
||||
<style>
|
||||
.pageB img{width:80px!important;}
|
||||
.wwads-horizontal .wwads-text, .wwads-content .wwads-text{line-height:1;}
|
||||
pageT: `
|
||||
<div class="wwads-cn wwads-horizontal page-wwads" data-id="136"></div>
|
||||
<style>
|
||||
.page-wwads{
|
||||
width:100%!important;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.page-wwads .wwads-img img{
|
||||
width:80px!important;
|
||||
}
|
||||
.page-wwads .wwads-poweredby{
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
bottom: 3px;
|
||||
}
|
||||
.wwads-content .wwads-text, .page-wwads .wwads-text{
|
||||
height: 100%;
|
||||
padding-top: 5px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
`,
|
||||
windowRB: `
|
||||
|
@ -38,7 +55,7 @@ module.exports = {
|
|||
display: none;
|
||||
}
|
||||
</style>
|
||||
`
|
||||
`,
|
||||
}
|
||||
|
||||
// module.exports = {
|
||||
|
|
|
@ -1,9 +1,59 @@
|
|||
// import vue from 'vue/dist/vue.esm.browser'
|
||||
/**
|
||||
* to主题使用者:你可以去掉本文件的所有代码
|
||||
*/
|
||||
export default ({
|
||||
Vue, // VuePress 正在使用的 Vue 构造函数
|
||||
options, // 附加到根实例的一些选项
|
||||
router, // 当前应用的路由实例
|
||||
siteData // 站点元数据
|
||||
Vue, // VuePress 正在使用的 Vue 构造函数
|
||||
options, // 附加到根实例的一些选项
|
||||
router, // 当前应用的路由实例
|
||||
siteData, // 站点元数据
|
||||
isServer // 当前应用配置是处于 服务端渲染 还是 客户端
|
||||
}) => {
|
||||
// window.Vue = vue // 使页面中可以使用Vue构造函数 (使页面中的vue demo生效)
|
||||
|
||||
// 用于监控在路由变化时检查广告拦截器 (to主题使用者:你可以去掉本文件的所有代码)
|
||||
if (!isServer) {
|
||||
router.afterEach(() => {
|
||||
//check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading)
|
||||
docReady(function () {
|
||||
setTimeout(function () {
|
||||
if (window._AdBlockInit === undefined) {
|
||||
ABDetected();
|
||||
}
|
||||
}, 3000);
|
||||
});
|
||||
|
||||
// 删除事件改为隐藏事件
|
||||
setTimeout(() => {
|
||||
const pageAD = document.querySelector('.page-wwads');
|
||||
if (!pageAD) return;
|
||||
const btnEl = pageAD.querySelector('.wwads-hide');
|
||||
if (btnEl) {
|
||||
btnEl.onclick = () => {
|
||||
pageAD.style.display = 'none';
|
||||
}
|
||||
}
|
||||
// 显示广告模块
|
||||
if (pageAD.style.display === 'none') {
|
||||
pageAD.style.display = 'flex';
|
||||
}
|
||||
}, 900);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function ABDetected() {
|
||||
const h = "<style>.wwads-horizontal,.wwads-vertical{background-color:#f4f8fa;padding:5px;min-height:120px;margin-top:20px;box-sizing:border-box;border-radius:3px;font-family:sans-serif;display:flex;min-width:150px;position:relative;overflow:hidden;}.wwads-horizontal{flex-wrap:wrap;justify-content:center}.wwads-vertical{flex-direction:column;align-items:center;padding-bottom:32px}.wwads-horizontal a,.wwads-vertical a{text-decoration:none}.wwads-horizontal .wwads-img,.wwads-vertical .wwads-img{margin:5px}.wwads-horizontal .wwads-content,.wwads-vertical .wwads-content{margin:5px}.wwads-horizontal .wwads-content{flex:130px}.wwads-vertical .wwads-content{margin-top:10px}.wwads-horizontal .wwads-text,.wwads-content .wwads-text{font-size:14px;line-height:1.4;color:#0e1011;-webkit-font-smoothing:antialiased}.wwads-horizontal .wwads-poweredby,.wwads-vertical .wwads-poweredby{display:block;font-size:11px;color:#a6b7bf;margin-top:1em}.wwads-vertical .wwads-poweredby{position:absolute;left:10px;bottom:10px}.wwads-horizontal .wwads-poweredby span,.wwads-vertical .wwads-poweredby span{transition:all 0.2s ease-in-out;margin-left:-1em}.wwads-horizontal .wwads-poweredby span:first-child,.wwads-vertical .wwads-poweredby span:first-child{opacity:0}.wwads-horizontal:hover .wwads-poweredby span,.wwads-vertical:hover .wwads-poweredby span{opacity:1;margin-left:0}.wwads-horizontal .wwads-hide,.wwads-vertical .wwads-hide{position:absolute;right:-23px;bottom:-23px;width:46px;height:46px;border-radius:23px;transition:all 0.3s ease-in-out;cursor:pointer;}.wwads-horizontal .wwads-hide:hover,.wwads-vertical .wwads-hide:hover{background:rgb(0 0 0 /0.05)}.wwads-horizontal .wwads-hide svg,.wwads-vertical .wwads-hide svg{position:absolute;left:10px;top:10px;fill:#a6b7bf}.wwads-horizontal .wwads-hide:hover svg,.wwads-vertical .wwads-hide:hover svg{fill:#3E4546}</style><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-img' target='_blank' rel='nofollow'><img src='https://fastly.jsdelivr.net/gh/xugaoyi/image_store@master/blog/wwads.2a3pidhlh4ys.webp' width='130'></a><div class='wwads-content'><a href='https://wwads.cn/page/whitelist-wwads' class='wwads-text' target='_blank' rel='nofollow'>为了本站的长期运营,请将我们的网站加入广告拦截器的白名单,感谢您的支持!<span style='color: #11a8cd'>如何添加白名单?</span></a><a href='https://wwads.cn/page/end-user-privacy' class='wwads-poweredby' title='万维广告 ~ 让广告更优雅,且有用' target='_blank'><span>广告</span></a></div><a class='wwads-hide' onclick='parentNode.remove()' title='隐藏广告'><svg xmlns='http://www.w3.org/2000/svg' width='6' height='7'><path d='M.879.672L3 2.793 5.121.672a.5.5 0 11.707.707L3.708 3.5l2.12 2.121a.5.5 0 11-.707.707l-2.12-2.12-2.122 2.12a.5.5 0 11-.707-.707l2.121-2.12L.172 1.378A.5.5 0 01.879.672z'></path></svg></a>";
|
||||
const wwadsEl = document.getElementsByClassName("wwads-cn");
|
||||
const wwadsContentEl = document.querySelector('.wwads-content');
|
||||
if (wwadsEl[0] && !wwadsContentEl) {
|
||||
wwadsEl[0].innerHTML = h;
|
||||
}
|
||||
};
|
||||
|
||||
//check document ready
|
||||
function docReady(t) {
|
||||
"complete" === document.readyState ||
|
||||
"interactive" === document.readyState
|
||||
? setTimeout(t, 1)
|
||||
: document.addEventListener("DOMContentLoaded", t);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export default () => {
|
||||
if (typeof window !== 'undefined') {
|
||||
;(function(e, t, a) {
|
||||
;(function (e, t, a) {
|
||||
function r() {
|
||||
for (var e = 0; e < s.length; e++)
|
||||
s[e].alpha <= 0
|
||||
|
@ -27,12 +27,12 @@ export default () => {
|
|||
function n() {
|
||||
var t = 'function' == typeof e.onclick && e.onclick
|
||||
|
||||
e.onclick = function(e) {
|
||||
e.onclick = function (e) {
|
||||
// 过滤指定元素
|
||||
let mark = true
|
||||
EXCLUDECLASS &&
|
||||
e.path &&
|
||||
e.path.forEach(item => {
|
||||
e.path.forEach((item) => {
|
||||
if (item.nodeType === 1) {
|
||||
typeof item.className === 'string' && item.className.indexOf(EXCLUDECLASS) > -1 ? (mark = false) : ''
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export default () => {
|
|||
e.mozRequestAnimationFrame ||
|
||||
e.oRequestAnimationFrame ||
|
||||
e.msRequestAnimationFrame ||
|
||||
function(e) {
|
||||
function (e) {
|
||||
setTimeout(e, 1e3 / 60)
|
||||
}),
|
||||
i(
|
||||
|
|
|
@ -145,3 +145,27 @@ footer: CC-BY-SA-4.0 Licensed | Copyright © 2018-Now Dunwu
|
|||
## 🚪 传送
|
||||
|
||||
◾ 💧 [钝悟的 IT 知识图谱](https://dunwu.github.io/waterdrop/) ◾ 🎯 [钝悟的博客](https://dunwu.github.io/blog/) ◾
|
||||
|
||||
<!-- AD -->
|
||||
<div class="wwads-cn wwads-horizontal page-wwads" data-id="136"></div>
|
||||
<style>
|
||||
.page-wwads{
|
||||
width:100%!important;
|
||||
min-height: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.page-wwads .wwads-img img{
|
||||
width:80px!important;
|
||||
}
|
||||
.page-wwads .wwads-poweredby{
|
||||
width: 40px;
|
||||
position: absolute;
|
||||
right: 25px;
|
||||
bottom: 3px;
|
||||
}
|
||||
.wwads-content .wwads-text, .page-wwads .wwads-text{
|
||||
height: 100%;
|
||||
padding-top: 5px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4,8 +4,8 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"clean": "rimraf docs/.temp",
|
||||
"start": "vuepress dev docs",
|
||||
"build": "vuepress build docs",
|
||||
"start": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js dev docs",
|
||||
"build": "node --max_old_space_size=4096 ./node_modules/vuepress/cli.js build docs",
|
||||
"deploy": "bash scripts/deploy.sh",
|
||||
"updateTheme": "yarn remove vuepress-theme-vdoing && rm -rf node_modules && yarn && yarn add vuepress-theme-vdoing -D",
|
||||
"editFm": "node utils/editFrontmatter.js",
|
||||
|
@ -22,7 +22,7 @@
|
|||
"markdownlint-rule-emphasis-style": "^1.0.1",
|
||||
"rimraf": "^4.1.2",
|
||||
"vue-toasted": "^1.1.25",
|
||||
"vuepress": "^1.9.8",
|
||||
"vuepress": "1.9.9",
|
||||
"vuepress-plugin-baidu-tongji": "^1.0.1",
|
||||
"vuepress-plugin-comment": "^0.7.3",
|
||||
"vuepress-plugin-demo-block": "^0.7.2",
|
||||
|
@ -31,7 +31,7 @@
|
|||
"vuepress-plugin-one-click-copy": "^1.0.2",
|
||||
"vuepress-plugin-thirdparty-search": "^1.0.2",
|
||||
"vuepress-plugin-zooming": "^1.1.7",
|
||||
"vuepress-theme-vdoing": "^1.10.3",
|
||||
"vuepress-theme-vdoing": "^1.12.9",
|
||||
"yamljs": "^0.3.0"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue