Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智布道
OneBlog
比较版本
ce7f0978086dc136b96433e0a57e2eabba8592fb...e796adeca4e59dafd22569c22c476821b5db555f
O
OneBlog
项目概览
智布道
/
OneBlog
8 个月 前同步成功
通知
11
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
OneBlog
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
源分支
e796adeca4e59dafd22569c22c476821b5db555f
选择Git版本
...
目标分支
ce7f0978086dc136b96433e0a57e2eabba8592fb
选择Git版本
比较
Commits (21)
https://gitcode.net/u011197448/oneblog/-/commit/af3e300cbcd4f96607b1107107abdbc14d4f83a8
issue :发布文章时,点击标签名,页面无法选择中对应的标签
2020-05-04T12:56:20+08:00
linxuhong
linxuhong_007@hotmail.com
修改内容:在Ajax 获取下拉框数据成功后,再给item增加事件绑定
https://gitcode.net/u011197448/oneblog/-/commit/dcaee854a39170babdd44c6d10204182b6a6ad3f
remove log
2020-05-04T13:25:05+08:00
linxuhong
linxuhong_007@hotmail.com
https://gitcode.net/u011197448/oneblog/-/commit/80d2ee985f069b3b4f57214e7cac49a35f845c38
:alien: 旧版宽屏的css
2021-06-06T02:10:59+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/e2d931cb1a498877693228b2e368be76e135b33e
:alien: 【请执行SQL】修改 sys_config 表中 config_value 的类型为 longtext,支持自定义 css
2021-06-06T02:12:01+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/366d4bad9e864b14be12dada756152d018799f02
:alien: 支持自定义的 web 端的 css
2021-06-06T02:12:49+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/bb782031fe2f865d06eedaf25b2c8193ec3bdee4
:alien: 解决 Gitee Issue [#I3PIH2]
2021-06-06T10:18:09+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/0b58dd9e353121f5ebff97c179667a6594484e94
:memo: 编写文档
2021-06-06T10:18:23+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/4e21ba927b8f93206142f6c8ffbd6c597bf43891
:alien: 解决 Gitee Issue [#I1G3XV]
2021-06-06T10:51:42+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/f43a43d9cadc280490a471b5c8906c713b3767b0
:alien: 解决 Gitee Issue [#I3I8KC]
2021-06-06T12:00:34+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/47891609e810d711bff92cdd2788598b5777bf6a
:alien: 将 footer 中的 Powered by 提出。自定义 footer 不会覆盖掉 "Powered by"。建议保留版权,谢谢!
2021-06-06T12:33:39+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/8bce17ae0c012b3212e4b9d69690c6f0946e2ff4
:alien: 将 footer 中的 “友情链接” 提出。自定义 footer 不会覆盖掉 “友情链接”。
2021-06-06T12:35:24+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/1bf9f570d54b202b3524e0ba9b975cd84f9cd64a
:alien: footer
2021-06-06T12:36:31+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/7ad6abcc78f7b9d704270e02bef1ff2d4ad94fae
1.后台管理员首页增加总访问量和总赞数选项卡。
2021-06-06T18:43:37+08:00
24519
2451999120@qq.com
2.点击总访问量,提示具体访问量数字,选项卡中只显示大概访问量,例如(2.3w,1.2k等)
https://gitcode.net/u011197448/oneblog/-/commit/cfd4d5d1131c144bfb537a0c8d82b81226deb3b1
:alien: 更新获取 qq 昵称的接口
2021-06-06T20:39:31+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/4ee3683a9d979ef405a45256d755eb09c6d47af3
:alien: +
2021-06-06T20:51:25+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/661afb0d8faaf7c0c1b3079804858e70686f8b08
Merge branch 'dev'
2021-06-06T20:52:17+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/96186a226dfe03a85b47b78b5785dc6ad7a97fb6
Merge branch 'master' into master
2021-06-06T07:55:18-05:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/dca4f27c100a0564bac3e49703c507f63541f680
Merge pull request #22 from linxuhong/master
2021-06-06T07:55:32-05:00
yadong.zhang
yadong.zhang0415@gmail.com
issue :发布文章时,点击标签名,页面无法选择中对应的标签
https://gitcode.net/u011197448/oneblog/-/commit/de97b941867d1de25b5c9c79246d18eb26c4cdf1
:alien: blog-hunter 的配置文件(文件搬运工),支持通过 admin 端在线配置
2021-06-06T21:43:16+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/672058f676ec1b23b5f8101eeb99e63cba7bd322
:memo: 编写文档
2021-06-06T21:43:27+08:00
yadong.zhang
yadong.zhang0415@gmail.com
https://gitcode.net/u011197448/oneblog/-/commit/e796adeca4e59dafd22569c22c476821b5db555f
:bookmark: 升级版本 2.2.5
2021-06-06T21:46:09+08:00
yadong.zhang
yadong.zhang0415@gmail.com
隐藏空白更改
内联
并排
Showing
24 changed file
with
936 addition
and
107 deletion
+936
-107
README.md
README.md
+1
-0
blog-admin/src/main/java/com/zyd/blog/controller/RenderController.java
...c/main/java/com/zyd/blog/controller/RenderController.java
+5
-5
blog-admin/src/main/java/com/zyd/blog/core/BlogHunterConfigProvider.java
...main/java/com/zyd/blog/core/BlogHunterConfigProvider.java
+36
-0
blog-admin/src/main/resources/static/assets/js/bootstrap-treetable.js
...rc/main/resources/static/assets/js/bootstrap-treetable.js
+3
-3
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
+10
-5
blog-admin/src/main/resources/static/assets/js/zhyd.echarts.js
...admin/src/main/resources/static/assets/js/zhyd.echarts.js
+445
-2
blog-admin/src/main/resources/templates/config.ftl
blog-admin/src/main/resources/templates/config.ftl
+25
-0
blog-admin/src/main/resources/templates/include/macros.ftl
blog-admin/src/main/resources/templates/include/macros.ftl
+10
-12
blog-admin/src/main/resources/templates/index.ftl
blog-admin/src/main/resources/templates/index.ftl
+120
-54
blog-admin/src/main/resources/templates/layout/footer.ftl
blog-admin/src/main/resources/templates/layout/footer.ftl
+1
-0
blog-core/src/main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
.../main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
+10
-0
blog-core/src/main/java/com/zyd/blog/business/service/impl/SysConfigServiceImpl.java
.../zyd/blog/business/service/impl/SysConfigServiceImpl.java
+1
-1
blog-core/src/main/resources/mybatis/SysConfigMapper.xml
blog-core/src/main/resources/mybatis/SysConfigMapper.xml
+52
-2
blog-web/src/main/java/com/zyd/blog/controller/RestApiController.java
.../main/java/com/zyd/blog/controller/RestApiController.java
+1
-1
blog-web/src/main/resources/static/css/zhyd.core.css
blog-web/src/main/resources/static/css/zhyd.core.css
+20
-1
blog-web/src/main/resources/static/js/zhyd.js
blog-web/src/main/resources/static/js/zhyd.js
+9
-0
blog-web/src/main/resources/templates/include/macros.ftl
blog-web/src/main/resources/templates/include/macros.ftl
+4
-0
blog-web/src/main/resources/templates/layout/footer.ftl
blog-web/src/main/resources/templates/layout/footer.ftl
+25
-16
blog-web/src/main/resources/templates/layout/header.ftl
blog-web/src/main/resources/templates/layout/header.ftl
+5
-3
docs/db/dblog.sql
docs/db/dblog.sql
+1
-1
docs/db/update.sql
docs/db/update.sql
+5
-0
docs/old_css.css
docs/old_css.css
+123
-0
pom.xml
pom.xml
+1
-1
update.md
update.md
+23
-0
未找到文件。
README.md
浏览文件 @
e796adec
...
...
@@ -65,6 +65,7 @@ ps: 虽然我知道,大部分人都是来了**直接下载源代码**后就潇
-
**文章搬运工**
:集成
[
blog-hunter
](
https://gitee.com/yadong.zhang/blog-hunter
)
实现“文章搬运工”功能,支持一键同步imooc、csdn、iteye或者cnblogs上的文章,可抓取列表和单个文章
-
**第三方授权登录**
:集成
[
JustAuthPlus(JAP)
](
https://gitee.com/fujieid/jap
)
实现第三方授权登录
-
**自定义网站内容**
:管理员可自定义“关于本站”、“留言板”、“友情链接”、“免责声明”、“Footer”、“鼠标点击时的气泡文字”、“热门搜索的待选项”等内容
-
**流控**
:针对异常IP的连续大量访问,系统会自动封禁该IP。
----
...
...
blog-admin/src/main/java/com/zyd/blog/controller/RenderController.java
浏览文件 @
e796adec
...
...
@@ -14,9 +14,9 @@ import com.zyd.blog.business.annotation.BussinessLog;
import
com.zyd.blog.business.entity.Article
;
import
com.zyd.blog.business.service.BizArticleService
;
import
com.zyd.blog.business.service.SysConfigService
;
import
com.zyd.blog.core.BlogHunterConfigProvider
;
import
com.zyd.blog.core.websocket.server.ZydWebsocketServer
;
import
com.zyd.blog.util.ResultUtil
;
import
me.zhyd.hunter.config.HunterConfigTemplate
;
import
me.zhyd.hunter.config.platform.Platform
;
import
me.zhyd.hunter.enums.ExitWayEnum
;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
...
...
@@ -45,9 +45,9 @@ public class RenderController {
@Autowired
private
BizArticleService
articleService
;
@Autowired
private
SysConfigService
configService
;
@Autowired
private
ZydWebsocketServer
websocketServer
;
@Autowired
private
BlogHunterConfigProvider
blogHunterConfigProvider
;
@RequiresAuthentication
@BussinessLog
(
"进入首页"
)
...
...
@@ -104,7 +104,7 @@ public class RenderController {
public
ModelAndView
edit
(
@PathVariable
(
"id"
)
Long
id
,
Model
model
)
{
model
.
addAttribute
(
"id"
,
id
);
Article
article
=
articleService
.
getByPrimaryKey
(
id
);
if
(
article
.
getIsMarkdown
())
{
if
(
article
.
getIsMarkdown
())
{
return
ResultUtil
.
view
(
"article/publish-md"
);
}
return
ResultUtil
.
view
(
"article/publish"
);
...
...
@@ -200,7 +200,7 @@ public class RenderController {
@GetMapping
(
"/remover"
)
public
ModelAndView
remover
(
Model
model
)
{
model
.
addAttribute
(
"exitWayList"
,
ExitWayEnum
.
values
());
model
.
addAttribute
(
"spiderConfig"
,
HunterConfigTemplate
.
configTemplate
.
toJSONStrin
g
());
model
.
addAttribute
(
"spiderConfig"
,
blogHunterConfigProvider
.
getBlogHunterConfi
g
());
model
.
addAttribute
(
"platforms"
,
Platform
.
values
());
return
ResultUtil
.
view
(
"laboratory/remover"
);
}
...
...
blog-admin/src/main/java/com/zyd/blog/core/BlogHunterConfigProvider.java
0 → 100644
浏览文件 @
e796adec
package
com.zyd.blog.core
;
import
com.alibaba.fastjson.JSON
;
import
com.zyd.blog.business.service.SysConfigService
;
import
lombok.extern.slf4j.Slf4j
;
import
me.zhyd.hunter.config.HunterConfigTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.StringUtils
;
/**
* @author yadong.zhang (yadong.zhang0415(a)gmail.com)
* @version 1.0.0
* @since 1.0.0
*/
@Slf4j
@Component
public
class
BlogHunterConfigProvider
{
@Autowired
private
SysConfigService
sysConfigService
;
public
String
getBlogHunterConfig
()
{
String
config
=
sysConfigService
.
getSpiderConfig
();
if
(
StringUtils
.
isEmpty
(
config
)
||
"{}"
.
equals
(
config
))
{
return
HunterConfigTemplate
.
configTemplate
.
toJSONString
();
}
try
{
return
JSON
.
parseObject
(
config
).
toJSONString
();
}
catch
(
Exception
e
)
{
log
.
error
(
"blog-hunter 的配置文件格式错误!将启用默认的 `src/main/resources/HunterConfig.json` 内容!"
,
e
);
}
return
"{}"
;
}
}
blog-admin/src/main/resources/static/assets/js/bootstrap-treetable.js
浏览文件 @
e796adec
...
...
@@ -24,7 +24,7 @@
target
.
data_list
=
null
;
//用于存放格式化后的数据-按父分组
target
.
data_obj
=
null
;
//用于存放格式化后的数据-按id存对象
// 在外层包装一下div,样式用的bootstrap-table的
var
_main_div
=
$
(
"
<div class='bootstrap-tree-table'></div>
"
);
var
_main_div
=
$
(
"
<div class='bootstrap-tree-table'
style='overflow: hidden;overflow-x: auto;'
></div>
"
);
target
.
before
(
_main_div
);
_main_div
.
append
(
target
);
target
.
addClass
(
"
table table-hover treetable-table
"
);
...
...
@@ -36,7 +36,7 @@
}
// 工具条在外层包装一下div,样式用的bootstrap-table的
if
(
options
.
toolbar
)
{
var
_tool_div
=
$
(
"
<div class='treetable-bars
pull-left
'></div>
"
);
var
_tool_div
=
$
(
"
<div class='treetable-bars'></div>
"
);
_tool_div
.
append
(
$
(
options
.
toolbar
));
_main_div
.
before
(
_tool_div
);
}
...
...
@@ -183,7 +183,7 @@
});
target
.
append
(
tbody
);
//动态设置表头宽度
thead
.
css
(
"
width
"
,
tbody
.
children
(
"
:first
"
).
css
(
"
width
"
)
);
thead
.
css
(
"
width
"
,
"
100%
"
);
registerExpanderEvent
();
registerRowClickEvent
();
};
...
...
blog-admin/src/main/resources/static/assets/js/zhyd.core.js
浏览文件 @
e796adec
...
...
@@ -12,7 +12,7 @@ var editor = null, simplemde = null;
var
zhyd
=
window
.
zhyd
||
{
combox
:
{
init
:
function
()
{
init
:
function
(
mockComboxCallback
)
{
$
(
'
select[target=combox]
'
).
each
(
function
(
e
)
{
var
$this
=
$
(
this
);
var
url
=
$this
.
data
(
"
url
"
);
...
...
@@ -47,6 +47,10 @@ var zhyd = window.zhyd || {
var
liTpl
=
'
{{#data}}<li data-value="{{id}}">{{name}}</li>{{/data}}
'
;
var
html
=
Mustache
.
render
(
liTpl
,
json
);
$this
.
html
(
html
);
if
(
$
.
isFunction
(
mockComboxCallback
))
{
mockComboxCallback
();
}
}
}
});
...
...
@@ -75,11 +79,13 @@ var zhyd = window.zhyd || {
function
add
()
{
var
thisId
=
$
(
this
).
data
(
"
value
"
);
var
thisText
=
$
(
this
).
text
().
trim
();
console
.
log
(
thisText
);
$this
.
tagsinput
(
'
add
'
,
{
"
id
"
:
thisId
,
"
name
"
:
thisText
},
{
add
:
false
});
}
$
(
$bindBox
).
find
(
"
li
"
).
each
(
function
()
{
var
$li
=
$
(
this
);
console
.
log
(
222222
)
$li
.
bind
(
'
click
'
,
add
);
});
$
(
"
.bootstrap-tagsinput input
"
).
bind
(
'
keydown
'
,
function
(
event
)
{
...
...
@@ -562,8 +568,7 @@ $(document).ready(function () {
});
}
});
zhyd
.
combox
.
init
();
zhyd
.
tagsInput
.
init
();
zhyd
.
combox
.
init
(
zhyd
.
tagsInput
.
init
);
zhyd
.
mask
.
init
();
/**
...
...
@@ -582,7 +587,7 @@ $(document).ready(function () {
});
var
notice
=
[
'
<strong
>Hi Boy!</strong> 前台首页的 “轮播”只会显示“推荐文章”哦
'
,
'
<strong
class="red">Hi Boy! 前台首页的 “轮播”只会显示“推荐文章”哦</strong>
'
,
'
要想百度搜索引擎快速收录文章,可以试试“推送”功能哦
'
,
'
批量推送文章到百度可以一次提交多篇文章哦
'
,
'
碰到页面显示和数据库内容不一致的情况,可以先考虑清下redis缓存哦
'
,
...
...
@@ -592,7 +597,7 @@ $(document).ready(function () {
];
var
$noticeBox
=
$
(
"
#notice-box
"
);
var
tpl
=
'
{{#data}}<li class="scrolltext-title">
'
+
'
<a href="javascript:void(0)" rel="bookmark">{{&.}}</a>
'
+
'
{{&.}}
'
+
'
</li>{{/data}}
'
;
var
html
=
Mustache
.
render
(
tpl
,
{
"
data
"
:
$
.
tool
.
shuffle
(
notice
)});
$noticeBox
.
html
(
html
);
...
...
blog-admin/src/main/resources/static/assets/js/zhyd.echarts.js
浏览文件 @
e796adec
...
...
@@ -5,7 +5,450 @@
* @since 1.0
*/
var
zhyd
=
window
.
zhyd
||
{};
//扩展echart图表样式
zhyd
.
chartConfig
=
{
"
color
"
:
[
"
#5470c6
"
,
"
#91cc75
"
,
"
#fac858
"
,
"
#ee6666
"
,
"
#73c0de
"
,
"
#3ba272
"
,
"
#fc8452
"
,
"
#9a60b4
"
,
"
#ea7ccc
"
,
"
#60c0dd
"
,
"
#d7504b
"
,
"
#c6e579
"
,
"
#f4e001
"
,
"
#f0805a
"
,
"
#26c0c0
"
],
// "backgroundColor": "rgba(254,248,239,1)",
"
textStyle
"
:
{},
"
title
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#27727b
"
},
"
subtextStyle
"
:
{
"
color
"
:
"
#aaaaaa
"
}
},
"
line
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
1
},
"
lineStyle
"
:
{
"
width
"
:
"
3
"
},
"
symbolSize
"
:
"
5
"
,
"
symbol
"
:
"
emptyCircle
"
,
"
smooth
"
:
false
},
"
radar
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
1
},
"
lineStyle
"
:
{
"
width
"
:
"
3
"
},
"
symbolSize
"
:
"
5
"
,
"
symbol
"
:
"
emptyCircle
"
,
"
smooth
"
:
false
},
"
bar
"
:
{
"
itemStyle
"
:
{
"
barBorderWidth
"
:
0
,
"
barBorderColor
"
:
"
#ccc
"
}
},
"
pie
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
scatter
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
boxplot
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
parallel
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
sankey
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
funnel
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
gauge
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
}
},
"
candlestick
"
:
{
"
itemStyle
"
:
{
"
color
"
:
"
#c1232b
"
,
"
color0
"
:
"
#b5c334
"
,
"
borderColor
"
:
"
#c1232b
"
,
"
borderColor0
"
:
"
#b5c334
"
,
"
borderWidth
"
:
1
}
},
"
graph
"
:
{
"
itemStyle
"
:
{
"
borderWidth
"
:
0
,
"
borderColor
"
:
"
#ccc
"
},
"
lineStyle
"
:
{
"
width
"
:
1
,
"
color
"
:
"
#aaaaaa
"
},
"
symbolSize
"
:
"
5
"
,
"
symbol
"
:
"
emptyCircle
"
,
"
smooth
"
:
false
,
"
color
"
:
[
"
#c1232b
"
,
"
#27727b
"
,
"
#fcce10
"
,
"
#e87c25
"
,
"
#b5c334
"
,
"
#fe8463
"
,
"
#9bca63
"
,
"
#fad860
"
,
"
#f3a43b
"
,
"
#60c0dd
"
,
"
#d7504b
"
,
"
#c6e579
"
,
"
#f4e001
"
,
"
#f0805a
"
,
"
#26c0c0
"
],
"
label
"
:
{
"
color
"
:
"
#eeeeee
"
}
},
"
map
"
:
{
"
itemStyle
"
:
{
"
normal
"
:
{
"
areaColor
"
:
"
#dddddd
"
,
"
borderColor
"
:
"
#eeeeee
"
,
"
borderWidth
"
:
0.5
},
"
emphasis
"
:
{
"
areaColor
"
:
"
#fe994e
"
,
"
borderColor
"
:
"
#444
"
,
"
borderWidth
"
:
1
}
},
"
label
"
:
{
"
normal
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#c1232b
"
}
},
"
emphasis
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
rgb(100,0,0)
"
}
}
}
},
"
geo
"
:
{
"
itemStyle
"
:
{
"
normal
"
:
{
"
areaColor
"
:
"
#dddddd
"
,
"
borderColor
"
:
"
#eeeeee
"
,
"
borderWidth
"
:
0.5
},
"
emphasis
"
:
{
"
areaColor
"
:
"
#fe994e
"
,
"
borderColor
"
:
"
#444
"
,
"
borderWidth
"
:
1
}
},
"
label
"
:
{
"
normal
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#c1232b
"
}
},
"
emphasis
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
rgb(100,0,0)
"
}
}
}
},
"
categoryAxis
"
:
{
"
axisLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#27727b
"
}
},
"
axisTick
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#27727b
"
}
},
"
axisLabel
"
:
{
"
show
"
:
true
,
"
textStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
splitLine
"
:
{
"
show
"
:
false
,
"
lineStyle
"
:
{
"
color
"
:
[
"
#ccc
"
]
}
},
"
splitArea
"
:
{
"
show
"
:
false
,
"
areaStyle
"
:
{
"
color
"
:
[
"
rgba(250,250,250,0.3)
"
,
"
rgba(200,200,200,0.3)
"
]
}
}
},
"
valueAxis
"
:
{
"
axisLine
"
:
{
"
show
"
:
false
,
"
lineStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
axisTick
"
:
{
"
show
"
:
false
,
"
lineStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
axisLabel
"
:
{
"
show
"
:
true
,
"
textStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
splitLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
[
"
#ccc
"
]
}
},
"
splitArea
"
:
{
"
show
"
:
false
,
"
areaStyle
"
:
{
"
color
"
:
[
"
rgba(250,250,250,0.3)
"
,
"
rgba(200,200,200,0.3)
"
]
}
}
},
"
logAxis
"
:
{
"
axisLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#27727b
"
}
},
"
axisTick
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
axisLabel
"
:
{
"
show
"
:
true
,
"
textStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
splitLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
[
"
#ccc
"
]
}
},
"
splitArea
"
:
{
"
show
"
:
false
,
"
areaStyle
"
:
{
"
color
"
:
[
"
rgba(250,250,250,0.3)
"
,
"
rgba(200,200,200,0.3)
"
]
}
}
},
"
timeAxis
"
:
{
"
axisLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#27727b
"
}
},
"
axisTick
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
axisLabel
"
:
{
"
show
"
:
true
,
"
textStyle
"
:
{
"
color
"
:
"
#333
"
}
},
"
splitLine
"
:
{
"
show
"
:
true
,
"
lineStyle
"
:
{
"
color
"
:
[
"
#ccc
"
]
}
},
"
splitArea
"
:
{
"
show
"
:
false
,
"
areaStyle
"
:
{
"
color
"
:
[
"
rgba(250,250,250,0.3)
"
,
"
rgba(200,200,200,0.3)
"
]
}
}
},
"
toolbox
"
:
{
"
iconStyle
"
:
{
"
normal
"
:
{
"
borderColor
"
:
"
#c1232b
"
},
"
emphasis
"
:
{
"
borderColor
"
:
"
#e87c25
"
}
}
},
"
legend
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#333333
"
}
},
"
tooltip
"
:
{
"
axisPointer
"
:
{
"
lineStyle
"
:
{
"
color
"
:
"
#27727b
"
,
"
width
"
:
1
},
"
crossStyle
"
:
{
"
color
"
:
"
#27727b
"
,
"
width
"
:
1
}
}
},
"
timeline
"
:
{
"
lineStyle
"
:
{
"
color
"
:
"
#293c55
"
,
"
width
"
:
1
},
"
itemStyle
"
:
{
"
normal
"
:
{
"
color
"
:
"
#27727b
"
,
"
borderWidth
"
:
1
},
"
emphasis
"
:
{
"
color
"
:
"
#72d4e0
"
}
},
"
controlStyle
"
:
{
"
normal
"
:
{
"
color
"
:
"
#27727b
"
,
"
borderColor
"
:
"
#27727b
"
,
"
borderWidth
"
:
0.5
},
"
emphasis
"
:
{
"
color
"
:
"
#27727b
"
,
"
borderColor
"
:
"
#27727b
"
,
"
borderWidth
"
:
0.5
}
},
"
checkpointStyle
"
:
{
"
color
"
:
"
#c1232b
"
,
"
borderColor
"
:
"
#c23531
"
},
"
label
"
:
{
"
normal
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#293c55
"
}
},
"
emphasis
"
:
{
"
textStyle
"
:
{
"
color
"
:
"
#293c55
"
}
}
}
},
"
visualMap
"
:
{
"
color
"
:
[
"
#c1232b
"
,
"
#fcce10
"
]
},
"
dataZoom
"
:
{
"
backgroundColor
"
:
"
rgba(0,0,0,0)
"
,
"
dataBackgroundColor
"
:
"
rgba(181,195,52,0.3)
"
,
"
fillerColor
"
:
"
rgba(181,195,52,0.2)
"
,
"
handleColor
"
:
"
#27727b
"
,
"
handleSize
"
:
"
100%
"
,
"
textStyle
"
:
{
"
color
"
:
"
#999999
"
}
},
"
markPoint
"
:
{
"
label
"
:
{
"
color
"
:
"
#eeeeee
"
},
"
emphasis
"
:
{
"
label
"
:
{
"
color
"
:
"
#eeeeee
"
}
}
}
}
/*初始化数据,这是原来的*/
/*zhyd.chartConfig = {
color: ["#26B99A", "#34495E", "#BDC3C7", "#3498DB", "#9B59B6", "#8abb6f", "#759c6a", "#bfd3b7"],
title: {
itemGap: 8,
...
...
@@ -208,7 +651,7 @@ zhyd.chartConfig = {
textStyle: {
fontFamily: "Arial, Verdana, sans-serif"
}
};
};
*/
zhyd
.
createChart
=
function
(
options
)
{
var
op
=
$
.
extend
({
id
:
''
,
...
...
@@ -312,4 +755,4 @@ function init_echarts() {
})
}
}
}
\ No newline at end of file
}
blog-admin/src/main/resources/templates/config.ftl
浏览文件 @
e796adec
...
...
@@ -47,6 +47,9 @@
<li role="presentation" class="">
<a href="#tab_custom" role="tab" id="custom-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-cog fa-fw"></i> 定制页面</a>
</li>
<li role="presentation" class="">
<a href="#tab_hunter" role="tab" id="hunter-tab" data-toggle="tab" aria-expanded="false"><i class="fa fa-bug fa-fw"></i> Hunter 配置</a>
</li>
</ul>
<div id="myTabContent" class="tab-content">
<div role="tabpanel" class="tab-pane fade active in" id="tab_basic"
...
...
@@ -605,6 +608,28 @@
<textarea class="form-control col-md-7 col-xs-12" id="customJs" name="customJs" placeholder="自定义 web 端 js,支持自定义百度统计等代码,不可包含 <script></script> 标签" rows="5"></textarea>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="customCss">自定义“CSS” <i class="fa fa-question-circle" title="自定义 web 端 CSS,不可包含 <style></style> 标签"></i></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<textarea class="form-control col-md-7 col-xs-12" id="customCss" name="customCss" placeholder="自定义 web 端 CSS,不可包含 <style></style> 标签" rows="5"></textarea>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="comment"></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<button type="button" class="btn btn-primary saveBtn"><i class="fa fa-save"> 保存</i></button>
</div>
</div>
</form>
</div>
<div role="tabpanel" class="tab-pane fade" id="tab_hunter" aria-labelledby="hunter-tab">
<form class="form-horizontal form-label-left" novalidate>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="blogHunterConfig">Hunter 配置文件 <i class="fa fa-question-circle" title="blog-hunter 配置文件,如果没有添加该配置,则默认取 src/main/resources/HunterConfig.json"></i></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<textarea class="form-control col-md-7 col-xs-12" id="blogHunterConfig" name="blogHunterConfig" placeholder="blog-hunter 配置文件,如果没有添加该配置,则默认取 src/main/resources/HunterConfig.json" rows="20"></textarea>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="comment"></label>
<div class="col-md-6 col-sm-6 col-xs-12">
...
...
blog-admin/src/main/resources/templates/include/macros.ftl
浏览文件 @
e796adec
...
...
@@ -89,19 +89,17 @@
<
#--
面包屑导航内容
+
系统通知
--
>
<
#macro
breadcrumb
>
<div
class=
"row"
>
<div
class=
"col col-md-8"
>
<nav
class=
"breadcrumb"
>
<div
class=
"notify"
><i
class=
"fa fa-bullhorn fa-fw"
></i></div>
<div
id=
"scrolldiv"
>
<div
class=
"scrolltext"
>
<ul
class=
"list-unstyled"
id=
"notice-box"
>
<li
class=
"scrolltext-title"
>
<a
href=
"javascript:void(0)"
rel=
"bookmark"
>
其实我们可以将所有的问题归结为两种:一种是没饭吃饿出来的;一种是吃饱了撑出来的。
</a>
</li>
</ul>
</div>
<div
class=
"col col-md-8 col-xs-12"
>
<div
class=
"notify"
><i
class=
"fa fa-bullhorn fa-fw"
></i></div>
<div
id=
"scrolldiv"
>
<div
class=
"scrolltext"
>
<ul
class=
"list-unstyled"
id=
"notice-box"
>
<li
class=
"scrolltext-title"
>
其实我们可以将所有的问题归结为两种:一种是没饭吃饿出来的;一种是吃饱了撑出来的。
</li>
</ul>
</div>
</
na
v>
</
di
v>
</div>
<div
class=
"col col-md-4 text-right"
>
<
#nested
>
...
...
blog-admin/src/main/resources/templates/index.ftl
浏览文件 @
e796adec
...
...
@@ -72,44 +72,67 @@
<div class="col-md-12 col-sm-12 col-xs-12 top_tiles">
<#-- 文章 -->
<a href="/articles" class="statistics-panel">
<div class="col-lg-
3 col-md-3
col-sm-6 col-xs-12 statistics-article" data-key="articleCount">
<div class="col-lg-
2 col-md-2
col-sm-6 col-xs-12 statistics-article" data-key="articleCount">
<div class="tile-stats statistics-box">
<div class="icon"><i class="fa fa-envira"></i></div>
<div class="count"></div>
<div class="icon"><i
style="color: #5470c6;"
class="fa fa-envira"></i></div>
<div class="count"
style="color: #9a60b4"
></div>
<h4>文章</h4>
</div>
</div>
</a>
<#-- 标签 -->
<a href="/article/tags" class="statistics-panel">
<div class="col-lg-
3 col-md-3
col-sm-6 col-xs-12 statistics-tag" data-key="tagCount">
<div class="col-lg-
2 col-md-2
col-sm-6 col-xs-12 statistics-tag" data-key="tagCount">
<div class="tile-stats statistics-box">
<div class="icon"><i class="fa fa-tags"></i></div>
<div class="count"></div>
<div class="icon"><i
style="color: #91cc75;"
class="fa fa-tags"></i></div>
<div class="count"
style="color: #ea7ccc"
></div>
<h4>标签</h4>
</div>
</div>
</a>
<#-- 分类 -->
<a href="/article/types" class="statistics-panel">
<div class="col-lg-
3 col-md-3
col-sm-6 col-xs-12 statistics-type" data-key="typeCount">
<div class="col-lg-
2 col-md-2
col-sm-6 col-xs-12 statistics-type" data-key="typeCount">
<div class="tile-stats statistics-box">
<div class="icon"><i class="fa fa-th"></i></div>
<div class="count"></div>
<div class="icon"><i
style="color: #fac858;"
class="fa fa-th"></i></div>
<div class="count"
style="color: #60c0dd"
></div>
<h4>分类</h4>
</div>
</div>
</a>
<#-- 评论 -->
<a href="/comments" class="statistics-panel">
<div class="col-lg-
3 col-md-3
col-sm-6 col-xs-12 statistics-comment" data-key="commentCount">
<div class="col-lg-
2 col-md-2
col-sm-6 col-xs-12 statistics-comment" data-key="commentCount">
<div class="tile-stats statistics-box">
<div class="icon"><i class="fa fa-comments-o"></i></div>
<div class="count"></div>
<div class="icon"><i
style="color: #ee6666;"
class="fa fa-comments-o"></i></div>
<div class="count"
style="color: #d7504b"
></div>
<h4>留言数</h4>
</div>
</div>
</a>
<#--总访问 量-->
<a id="fangwen" href="#" class="statistics-panel">
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12 statistics-lookCount" data-key="lookCount">
<#--隐藏域,放进去值,方便运算-->
<input type="hidden" id="fangwen_inp" value="">
<div class="tile-stats statistics-box">
<div class="icon"><i style="color: #73c0de;" class="fa fa-bar-chart"></i></div>
<div class="count" id="l_count_mxx" style="color: #c6e579;"></div>
<h4>访问量</h4>
</div>
</div>
</a>
<#--总赞数-->
<a href="/articles" class="statistics-panel">
<div class="col-lg-2 col-md-2 col-sm-6 col-xs-12 statistics-zanCount" data-key="zanCount">
<div class="tile-stats statistics-box">
<div class="icon"><i style="color: #FF6666;" class="fa fa-thumbs-o-up"></i></div>
<div class="count"></div>
<h4>总赞量</h4>
</div>
</div>
</a>
</div>
</div>
<div class="row">
...
...
@@ -263,52 +286,95 @@
localStorage.setItem("neverShowNoticeModal", 1);
})
</script>
<script>
/* 顶部卡片统计 */
$.post("/statistics/siteInfo", function (json) {
$.alert.ajaxSuccess(json);
if(json.status == 200){
var jsonData = json.data;
<script>
/* 顶部卡片统计 */
$.post("/statistics/siteInfo", function (json) {
$.alert.ajaxSuccess(json);
if (json.status == 200) {
//给隐藏域里面设置访问量,好让点击的时候能看到具体的数字,心理有个数
var $this = $(".statistics-lookCount");
var jsonData = json.data;
var jsonKey = $this.data("key");
$("#fangwen_inp").val(jsonData[jsonKey]);
function setValue(dom, value) {
var $dom = dom;
$dom.find("div.tile-stats .count").text(value);
//end
function setValue(dom, value) {
var $dom = dom;
$dom.find("div.tile-stats .count").text(value);
}
$(".statistics-tag, .statistics-type, .statistics-comment, .statistics-article, .statistics-lookCount, .statistics-zanCount").each(function () {
var $this = $(this);
var jsonKey = $this.data("key");
setValue($this, jsonData[jsonKey]);
});
}
//设置显示数字格式,k或者w
$(function () {
var num = $("#l_count_mxx").text();
// var num = 1209;
//点击显示访问量
$("#fangwen").click(function () {
layui.use('layer', function () {
var layer = layui.layer;
layer.msg("总访问量是:" + $("#fangwen_inp").val(), {
time: 2000 //20s后自动关闭
});
});
});
//转换数字格式,k或者w
if (num >= 10000) {
num = Math.round(num / 1000) / 10 + 'W';
} else if (num >= 1000) {
num = Math.round(num / 100) / 10 + 'K';
}
$("#l_count_mxx").text(num);
//点击显示详细的
$(".statistics-tag, .statistics-type, .statistics-comment, .statistics-article").each(function () {
var $this = $(this);
var jsonKey = $this.data("key");
setValue($this, jsonData[jsonKey]);
});
}
});
/* 分类文章数统计 */
$.post("/statistics/listType", function (json) {
$.alert.ajaxSuccess(json);
if(json.status == 200){
var jsonData = json.data;
zhyd.createChart({id:'echart_type', legendData: getNames(jsonData, 'name'), series:{name:'分类文章数统计', type: 'pie', seriesData: jsonData}});
}
});
/* 爬虫访问统计 */
$.post("/statistics/listSpider", function (json) {
$.alert.ajaxSuccess(json);
if(json.status == 200){
var jsonData = json.data || [{name: '暂无', value: 0}];
zhyd.createChart({id:'echart_spider', legendData: getNames(jsonData, 'name'), series:{name:'爬虫访问统计', type: 'pie', seriesData: jsonData}});
}
});
function getNames(arr, key) {
if(!arr){
return [];
}
var resultArr = [];
$.each(arr, function (i, v) {
resultArr.push(v[key]);
});
return resultArr;
}
init_echarts();
</script>
/* 分类文章数统计 */
$.post("/statistics/listType", function (json) {
$.alert.ajaxSuccess(json);
if (json.status == 200) {
var jsonData = json.data;
zhyd.createChart({
id: 'echart_type',
legendData: getNames(jsonData, 'name'),
series: {name: '分类文章数统计', type: 'pie', seriesData: jsonData}
});
}
});
/* 爬虫访问统计 */
$.post("/statistics/listSpider", function (json) {
$.alert.ajaxSuccess(json);
if (json.status == 200) {
var jsonData = json.data || [{name: '暂无', value: 0}];
zhyd.createChart({id:'echart_spider', legendData: getNames(jsonData, 'name'), series:{name:'爬虫访问统计', type: 'pie', seriesData: jsonData}});
}
});
function getNames(arr, key) {
if(!arr){
return [];
}
var resultArr = [];
$.each(arr, function (i, v) {
resultArr.push(v[key]);
});
return resultArr;
}
init_echarts();
</script>
</@footer>
blog-admin/src/main/resources/templates/layout/footer.ftl
浏览文件 @
e796adec
...
...
@@ -27,6 +27,7 @@
<script src="https://cdn.jsdelivr.net/npm/switchery-npm@0.8.2/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/wangeditor@3.1.1/release/wangEditor.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/@adactive/bootstrap-tagsinput@0.8.2/dist/bootstrap-tagsinput.min.js"></script>
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<#--
<script src="https://cdnjs.cloudflare.com/ajax/libs/pnotify/3.2.1/pnotify.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/pnotify/3.2.1/pnotify.buttons.js"></script>
...
...
blog-core/src/main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
浏览文件 @
e796adec
...
...
@@ -231,6 +231,16 @@ public enum ConfigKeyEnum {
* 自定义“js”脚本内容
*/
CUSTOM_JS
(
"customJs"
),
/**
* 自定义“CSS”内容
*/
CUSTOM_CSS
(
"customCss"
),
/**
* blog-hunter 配置文件,如果没有添加该配置,则默认取 src/main/resources/HunterConfig.json
*/
BLOG_HUNTER_CONFIG
(
"blogHunterConfig"
),
;
private
final
String
key
;
...
...
blog-core/src/main/java/com/zyd/blog/business/service/impl/SysConfigServiceImpl.java
浏览文件 @
e796adec
...
...
@@ -164,7 +164,7 @@ public class SysConfigServiceImpl implements SysConfigService {
@Override
@RedisCache
(
enable
=
false
)
public
String
getSpiderConfig
()
{
SysConfig
config
=
this
.
getByKey
(
"spiderConfig"
);
SysConfig
config
=
this
.
getByKey
(
ConfigKeyEnum
.
BLOG_HUNTER_CONFIG
.
getKey
()
);
if
(
config
==
null
)
{
return
"{}"
;
}
...
...
blog-core/src/main/resources/mybatis/SysConfigMapper.xml
浏览文件 @
e796adec
...
...
@@ -4,7 +4,7 @@
<mapper
namespace=
"com.zyd.blog.persistence.mapper.SysConfigMapper"
>
<select
id=
"getSiteInfo"
resultType=
"map"
>
SELECT
/*
SELECT
co.articleCount AS articleCount,
co.commentCount AS commentCount,
co.tagCount AS tagCount,
...
...
@@ -58,7 +58,57 @@
create_time DESC
LIMIT 1
) da
ON 1 = 1;
ON 1 = 1;*/
SELECT co.articleCount AS articleCount,
co.commentCount AS commentCount,
co.tagCount AS tagCount,
co.typeCount AS typeCount,
co.lookCount AS lookCount,
co.zanCount AS zanCount,
da.recorde_time AS lastUpdateTime
FROM (
SELECT a.article_count AS articleCount,
t.tag_count AS tagCount,
type.type_count AS typeCount,
c.comment_count AS commentCount,
look.look_count AS lookCount,
zan.zan_count AS zanCount
FROM (
SELECT COUNT(1) AS article_count
FROM biz_article
WHERE `status` = 1
) a,
(
SELECT COUNT(1) AS tag_count
FROM biz_tags
) t,
(
SELECT COUNT(1) AS type_count
FROM biz_type
WHERE available = 1
) TYPE,
(
SELECT COUNT(1) AS comment_count
FROM biz_comment
WHERE `status` = 'APPROVED'
) c,
(
SELECT COUNT(1) AS look_count
FROM biz_article_look
) look,
(
SELECT COUNT(1) AS zan_count
FROM biz_article_love
) zan
) co
LEFT JOIN (
SELECT DATE_FORMAT(recorde_time, '%Y年%m月%d日%H点') AS recorde_time
FROM sys_update_recorde
ORDER BY create_time DESC LIMIT 1
) da
ON 1 = 1;
</select>
</mapper>
blog-web/src/main/java/com/zyd/blog/controller/RestApiController.java
浏览文件 @
e796adec
...
...
@@ -81,7 +81,7 @@ public class RestApiController {
}
Map
<
String
,
String
>
resultMap
=
new
HashMap
<>(
4
);
String
nickname
=
"匿名"
;
String
json
=
RestClientUtil
.
get
(
"http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins="
+
qq
,
"GBK"
);
String
json
=
RestClientUtil
.
get
(
"http
s
://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins="
+
qq
,
"GBK"
);
if
(!
StringUtils
.
isEmpty
(
json
))
{
try
{
json
=
json
.
replaceAll
(
"portraitCallBack|\\\\s*|\\t|\\r|\\n"
,
""
);
...
...
blog-web/src/main/resources/static/css/zhyd.core.css
浏览文件 @
e796adec
...
...
@@ -442,7 +442,7 @@ a:-webkit-any-link {
/*background-color: #c40000;
color: #fff;*/
color
:
#333
!important
;
border-bottom
:
4px
solid
#333
!important
;
border-bottom
:
1px
solid
#a5a5a5
!important
;
font-weight
:
700
;
background-color
:
initial
!important
;
}
...
...
@@ -2151,6 +2151,9 @@ nav a:first-child .meta-nav {
.navbar-collapse
.pull-left
,
.jumbotron
,
#topmenu
,
.main-search
{
display
:
none
!important
;
}
.navbar-brand
{
display
:
unset
!important
;
}
.navbar-default
.menu-box
.navbar-collapse
ul
li
.menu_a
{
padding
:
4px
;
...
...
@@ -2196,6 +2199,9 @@ nav a:first-child .meta-nav {
float
:
right
;
margin
:
0
;
}
.navbar-brand
{
display
:
none
!important
;
}
.container
{
width
:
90%
;
...
...
@@ -3577,3 +3583,16 @@ img {
-webkit-transition
:
all
.35s
;
transition
:
all
.35s
;
}
.navbar-brand
{
line-height
:
2
;
vertical-align
:
middle
;
position
:
relative
;
margin-top
:
-8px
;
padding
:
15px
0
;
}
.navbar-brand
img
{
display
:
inline-block
}
blog-web/src/main/resources/static/js/zhyd.js
浏览文件 @
e796adec
...
...
@@ -414,4 +414,13 @@ $(function () {
$
.
comment
.
submit
(
$
(
this
));
});
}
/**
* 手机端无法 hover,所以针对app端,直接将菜单全部展开
*/
if
((
navigator
.
userAgent
.
toLowerCase
().
match
(
/
(
iphone|ipod|android|ios|symbianos
)
/i
))){
$
(
"
.nav.navbar-nav li.dropdown
"
).
addClass
(
"
open
"
)
$
(
"
.nav.navbar-nav li.dropdown a.menu_a span.dropdown-toggle
"
).
attr
(
"
aria-expanded
"
,
"
true
"
)
}
});
blog-web/src/main/resources/templates/include/macros.ftl
浏览文件 @
e796adec
...
...
@@ -29,6 +29,10 @@
<link
href=
"https://cdn.jsdelivr.net/npm/highlight.js@9.12.0/styles/github.min.css"
rel=
"stylesheet"
>
</
#
if>
<
#nested
>
<style
type=
"text/css"
>
$
{
config.customCss
}
</style>
</head>
<body>
<
#include
"/
layout
/
header.ftl
"
/>
...
...
blog-web/src/main/resources/templates/layout/footer.ftl
浏览文件 @
e796adec
...
...
@@ -121,28 +121,37 @@
</ul>
</p>
<p>托管于<a href="https://promotion.aliyun.com/ntms/act/ambassador/sharetouser.html?userCode=wylo59db" target="_blank" title="阿里云-为了无法计算的价值" data-toggle="tooltip" data-placement="bottom" rel="external nofollow">阿里云</a> & <a href="https://portal.qiniu.com/signup?code=3l8yx2v0f21ci" target="_blank" title="七牛云-国内领先的企业级云服务商" data-toggle="tooltip" data-placement="bottom" rel="external nofollow">七牛云</a><#if config.recordNumber!> · <a href="http://www.miitbeian.gov.cn/publish/query/indexFirst.action" target="_blank" title="查看备案信息" data-toggle="tooltip" data-placement="bottom" rel="external nofollow">${config.recordNumber}</a></#if></p>
<p><#if config.copyright!>${config.copyright} |</#if> Powered by <a href="https://gitee.com/yadong.zhang/DBlog" title="OneBlog是一款简洁美观、自适应的Java博客系统..." data-toggle="tooltip" data-placement="right" target="_blank"><i>OneBlog</i></a> </p>
<#if url?? && (url == "index")>
<div class="inline external-links">
<a>友情链接:</a>
<#if indexLinkList?? && (indexLinkList?size > 0)>
<#list indexLinkList as item>
<a href="${item.url}" target="_blank" title="${item.description!}" data-toggle="tooltip" data-placement="right">
${item.name!}
</a>
</#list>
<a href="${config.siteUrl}/links" title="更多链接" data-toggle="tooltip" data-placement="right"><i class="fa fa-plus"></i>更多链接</a>
<#else>
<a href="${config.siteUrl}/links" title="申请友链" data-toggle="tooltip" data-placement="right">申请友链</a>
</#if>
</div>
</#if>
</div>
<div class="col col-md-4"></div>
</div>
</div>
</footer>
</#if>
<footer class="footer">
<div class="container">
<div class="row">
<div class="col col-xs-12 col-md-12 col-lg-12">
<p><#if config.copyright!>${config.copyright} |</#if> Powered by <a href="https://gitee.com/yadong.zhang/DBlog" title="OneBlog是一款简洁美观、自适应的Java博客系统..." data-toggle="tooltip" data-placement="right" target="_blank"><i>OneBlog</i></a> </p>
<#if url?? && (url == "index")>
<div class="inline external-links">
<a>友情链接:</a>
<#if indexLinkList?? && (indexLinkList?size > 0)>
<#list indexLinkList as item>
<a href="${item.url}" target="_blank" title="${item.description!}" data-toggle="tooltip" data-placement="right">
${item.name!}
</a>
</#list>
<a href="${config.siteUrl}/links" title="更多链接" data-toggle="tooltip" data-placement="right"><i class="fa fa-plus"></i>更多链接</a>
<#else>
<a href="${config.siteUrl}/links" title="申请友链" data-toggle="tooltip" data-placement="right">申请友链</a>
</#if>
</div>
</#if>
</div>
</div>
</div>
</footer>
<a class="to-top" title="点击返回顶部" data-toggle="tooltip" data-placement="bottom"></a>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery@1.11.1/dist/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.0/dist/js/bootstrap.min.js"></script>
...
...
blog-web/src/main/resources/templates/layout/header.ftl
浏览文件 @
e796adec
...
...
@@ -77,7 +77,9 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand logo" href="#"></a>
<a class="navbar-brand" href="#">
<img alt="Brand" src="${config.siteFavicon}">${config.siteName}
</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<div class="pull-left site-desc">
...
...
@@ -93,8 +95,8 @@
<#list types as item>
<#if item.nodes?? && item.nodes?size gt 0>
<li class="dropdown">
<a href="
#" class="dropdown-toggle menu_a" data-toggle="dropdown" aria-expanded="false
">
<i class="${item.icon!}"></i>${item.name!} <span class="caret"></span>
<a href="
/type/${item.id?c}" class="menu_a
">
<i class="${item.icon!}"></i>${item.name!} <span class="caret
dropdown-toggle" data-toggle="dropdown" aria-expanded="false
"></span>
</a>
<ul class="dropdown-menu" role="menu">
<#list item.nodes as node>
...
...
docs/db/dblog.sql
浏览文件 @
e796adec
...
...
@@ -156,7 +156,7 @@ DROP TABLE IF EXISTS `sys_config`;
CREATE
TABLE
`sys_config`
(
`id`
int
(
20
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`config_key`
varchar
(
50
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'配置关键字'
,
`config_value`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'配置项内容'
,
`config_value`
long
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'配置项内容'
,
`create_time`
datetime
(
0
)
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'添加时间'
,
`update_time`
datetime
(
0
)
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
...
...
docs/db/update.sql
浏览文件 @
e796adec
...
...
@@ -38,3 +38,8 @@ CREATE TABLE `dblog`.`sys_social_config` (
`update_time`
datetime
(
0
)
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'记录更新时间'
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
4
CHARACTER
SET
=
utf8mb4
COLLATE
=
utf8mb4_general_ci
COMMENT
=
'社会化登录应用'
ROW_FORMAT
=
Dynamic
;
#
20210606
ALTER
TABLE
`dblog`
.
`sys_config`
MODIFY
COLUMN
`config_value`
longtext
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'配置项内容'
AFTER
`config_key`
;
docs/old_css.css
0 → 100644
浏览文件 @
e796adec
/**
此为原版宽屏的css,如果不喜欢最新版的窄屏风格,可以通过修改后台管理端的【右上角用户名 - 系统配置 - 定制页面 - 自定义“CSS”】的内容,自定义web端的css。
如需还原为原版宽屏,可以直接将下面的css复制到【自定义“CSS”】文本框中保存。
*/
.menu-box
{
padding-right
:
6%
;
padding-left
:
6%
;
}
.nav-search-box
.nav-search-btn
,
.nav-search
,
.link-info
.auto-link-btn
{
border-color
:
#008151
;
}
.nav-search-box
.nav-search-btn
:hover
,
.nav-search
:hover
,
.link-info
.auto-link-btn
:hover
{
border-color
:
#00432a
!important
;
}
.pager
>
li
>
a
.active
,
.pager
>
li
>
a
:hover
{
background-color
:
#009a61
;
border-color
:
#009a61
;
}
a
{
color
:
#009a61
;
}
.navbar-default
.menu-box
.navbar-collapse
ul
.active
a
{
color
:
#009a61
!important
;
border-bottom
:
unset
!important
;
}
.article-flag
.article-original
{
margin-left
:
20px
;
}
.breadcrumb
{
font-size
:
12px
;
color
:
gray
;
padding
:
0
;
background-color
:
#f5f5f500
;
}
::-webkit-scrollbar
{
width
:
7px
;
}
.sidebar-module
.sidebar-tabs
{
background-color
:
rgba
(
0
,
0
,
0
,
0
);
margin-left
:
unset
;
margin-right
:
unset
;
}
.sidebar-module
.sidebar-tabs
li
a
:hover
{
color
:
#008151
!important
;
font-weight
:
700
;
background-color
:
rgba
(
0
,
0
,
0
,
0
)
!important
;
border-color
:
rgba
(
0
,
0
,
0
,
0
)
!important
;
}
#article-menu
>
ul
>
li
:hover
,
#article-menu
>
ul
>
li
.active
{
color
:
#009a61
;
border-left
:
2px
solid
#009A61
;
}
#article-menu
>
ul
>
li
:hover
>
a
,
#article-menu
>
ul
>
li
.active
>
a
{
color
:
#009a61
;
}
article
.thumbnail
span
{
position
:
absolute
;
top
:
0
;
left
:
0
;
filter
:
alpha
(
opacity
=
70
);
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
);
background
:
#009a61
;
color
:
#fff
;
}
article
.thumbnail
span
a
{
color
:
#fff
!important
;
line-height
:
29px
;
padding
:
0
10px
;
}
article
.entry-content
.title-l
{
position
:
absolute
;
background
:
#017E66
;
top
:
20px
;
left
:
-1px
;
width
:
5px
;
height
:
30px
;
box-shadow
:
0
1px
1px
rgba
(
0
,
0
,
0
,
0.1
);
}
article
.entry-more
a
{
background-color
:
#009a61
;
}
article
.entry-more
a
:hover
,
.tag-li
a
:hover
{
background-color
:
#009a61
!important
;
border-color
:
#028103
!important
;
}
.tag-li
a
{
border-radius
:
2px
;
}
#loading
.filter
{
background
:
url(../img/loading.png)
no-repeat
fixed
;
}
.nav-tabs
>
li
>
a
:hover
{
background-color
:
#009a61
!important
;
border-color
:
#008151
!important
;
}
.c-label
:hover
{
background-color
:
#009a61
!important
;
border-color
:
#008151
!important
;
}
.rating
>
i
.active
{
color
:
#009a61
;
}
@media
(
min-width
:
1200px
)
{
.container
{
width
:
90%
;
}
}
.about-name
{
font-size
:
16px
;
font-weight
:
700
;
text-align
:
center
}
.comments
li
{
height
:
37px
;
}
.forbidden
a
{
color
:
#009a61
;
}
.zyd-carousel-caption
{
background
:
#07ad6f
;
}
pom.xml
浏览文件 @
e796adec
...
...
@@ -5,7 +5,7 @@
<groupId>
com.zyd
</groupId>
<artifactId>
blog
</artifactId>
<version>
2.2.
4
</version>
<version>
2.2.
5
</version>
<packaging>
pom
</packaging>
<modules>
<module>
blog-core
</module>
...
...
update.md
浏览文件 @
e796adec
...
...
@@ -3,6 +3,29 @@
----
### 2021-06-06
1.
处理了一批 Issue
-
解决 Gitee Issue [#I3PIH2]
-
解决 Gitee Issue [#I1G3XV]
-
解决 Gitee Issue [#I3I8KC]
-
等等一些老旧 Issue
2.
blog-hunter 的配置文件(文件搬运工),支持通过 admin 端在线配置
3.
更新后台首页统计面板
-
后台管理员首页增加总访问量和总赞数选项卡
-
点击总访问量,提示具体访问量数字,选项卡中只显示大概访问量,例如(2.3w,1.2k等)
4.
鼠标点击弹出气泡文字,默认不显示,只有在后台配置了弹出文字后才会显示
5.
将 jap-social 升级到 1.0.2
6.
增加自定义“JS”的配置项,可通过后台动态添加web端的js脚本,比如百度统计等
7.
admin 端首页的弹窗支持关闭后不再显示
8.
适配 csdn 平台 spider 规则
9.
支持自定义的 web 端的 css
10.
将 footer 中的 Powered by 提出。自定义 footer 不会覆盖掉 "Powered by"。建议保留版权,谢谢!
11.
将 footer 中的 “友情链接” 提出。自定义 footer 不会覆盖掉 “友情链接”
12.
更新获取 qq 昵称的接口
13.
合并 Github PR [#22],解决发布文章时,点击标签名,页面无法选择中对应的标签的问题
14.
修复一些其他问题
### 2021-04-27
1.
修改一言类型为诗词
...
...