...
 
Commits (2)
    https://gitcode.net/u011197448/oneblog/-/commit/b4f789397e1e30d526653ef8cfba5f2057d89977 :alien: admin 端首页的弹窗支持关闭后不再显示 2021-06-03T20:39:37+08:00 yadong.zhang yadong.zhang0415@gmail.com https://gitcode.net/u011197448/oneblog/-/commit/ce7f0978086dc136b96433e0a57e2eabba8592fb :alien: 适配 csdn 平台 spider 规则 2021-06-03T20:40:46+08:00 yadong.zhang yadong.zhang0415@gmail.com
......@@ -20,22 +20,21 @@
"domain": "blog.csdn.net",
"titleRegex": "//h1[@class=title-article]/html()",
"authorRegex": "//a[@class=follow-nickName]/html()",
"releaseDateRegex": "//div[@class=article-bar-top]/span[@class=time]/html()",
"releaseDateRegex": "//div[@class=article-bar-top]/div[@class='bar-content']/span[@class=time]/html()",
"contentRegex": "//div[@id=content_views]/html()",
"tagRegex": "//span[@class=artic-tag-box]/a[@class=tag-link]/html()",
"targetLinksRegex": ".*blog\\.csdn\\.net/{uid}/article/details/[0-9a-zA-Z]{1,15}",
"targetLinksRegex": "(((http|ftp|https):\\/\\/[0-9a-zA-Z]{1,15}.blog.csdn.net/article/details/[0-9a-zA-Z]{1,15})|((http|ftp|https):\\/\\/blog.csdn.net/{uid}/article/details/[0-9a-zA-Z]{1,15}))",
"header": [
"Host=blog.csdn.net",
"Referer=https://blog.csdn.net/{uid}/article/list/1"
],
"cookie": "",
"entryUrls": [
"https://blog.csdn.net/{uid}/article/list/1"
]
},
"iteye": {
"domain": "{uid}.iteye.com",
"titleRegex": "//div[@class=blog_title]/h3/a/html()",
"titleRegex": "//div[@class=blog_title]/h3/text()",
"authorRegex": "//div[@id=blog_owner_name]/html()",
"releaseDateRegex": "//div[@class=blog_bottom]/ul/li[1]/html()",
"contentRegex": "//div[@class=iteye-blog-content-contain]/html()",
......@@ -98,5 +97,46 @@
"entryUrls": [
"https://www.v2ex.com/member/{uid}"
]
},
"oschina": {
"domain": "oschina.net",
"titleRegex": "//h1[@class=article-box__title]/a/text()",
"authorRegex": "//div[@class=article-box__meta]/div[@class=item-list]/div[2]/a/html()",
"releaseDateRegex": "//div[@class=article-box__meta]/div[@class=item-list]/div[4]/html()",
"contentRegex": "//div[@class=content]/html()",
"tagRegex": "//div[@class=tags-box]/div[@class=tags-box__inner]/a/html()",
"targetLinksRegex": "https://my.oschina.net/.*/blog/[0-9]{1,10}",
"header": [
"Host=my.oschina.net",
"Referer=https://my.oschina.net"
],
"entryUrls": [
"https://my.oschina.net/{uid}",
"https://my.oschina.net/u/{uid}"
]
},
"jianshu": {
"resolver": {
"releaseDate": {
"type": "regex",
"clazz": "java.lang.Long",
"operator": "* 1000"
}
},
"domain": "jianshu.com",
"titleRegex": "//h1[@class=_1RuRku]/text()",
"authorRegex": "//span[@class=_22gUMi]/html()",
"releaseDateRegex": ".*\"first_shared_at\":([0-9]+),.*",
"contentRegex": "//article[@class=_2rhmJa]/html()",
"tagRegex": "//div",
"targetLinksRegex": "/p/[0-9a-zA-Z]{1,15}",
"header": [
"Host=www.jianshu.com",
"Referer=https://www.jianshu.com/p/{uid}"
],
"entryUrls": [
"https://www.jianshu.com/p/{uid}",
"https://www.jianshu.com/u/{uid}"
]
}
}
\ No newline at end of file
}
......@@ -343,6 +343,7 @@
</div>
<div class="modal-footer">
<span class="pull-left">tips: 如不想显示该弹窗,可在 <code>index.ftl</code> 中搜索 <code>aboutOneBlog</code> 后删掉相关代码</span>
<button type="button" class="btn btn-danger" data-dismiss="modal" id="neverShowNoticeModal"><i class="fa fa-close"> 不再显示</i></button>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-close"> 关闭</i></button>
</div>
</div>
......
......@@ -68,8 +68,6 @@
}
</style>
</@header>
<#-- 网站首页的项目介绍内容 -->
<@aboutOneBlog></@aboutOneBlog>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12 top_tiles">
<#-- 文章 -->
......@@ -250,9 +248,21 @@
</div>
</div>
</div>
<#-- 网站首页的项目介绍内容 -->
<@aboutOneBlog></@aboutOneBlog>
<@footer>
<script src="https://cdn.jsdelivr.net/npm/echarts@4.1.0/dist/echarts.min.js"></script>
<script src="/assets/js/zhyd.echarts.js"></script>
<#-- 显示或者关闭首页的弹窗,当点击“不再显示后”,如果清缓存,这个弹窗仍然会再次显示 -->
<script type="text/javascript">
var neverShowNoticeModal = localStorage.getItem("neverShowNoticeModal");
if(!neverShowNoticeModal) {
$("#noticeModal").modal('show');
}
$("#neverShowNoticeModal").click(function (){
localStorage.setItem("neverShowNoticeModal", 1);
})
</script>
<script>
/* 顶部卡片统计 */
$.post("/statistics/siteInfo", function (json) {
......@@ -300,6 +310,5 @@
return resultArr;
}
init_echarts();
$("#noticeModal").modal('show');
</script>
</@footer>
\ No newline at end of file
</@footer>