Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
智布道
OneBlog
提交
884b7ea8
O
OneBlog
项目概览
智布道
/
OneBlog
9 个月 前同步成功
通知
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 搜索 >>
提交
884b7ea8
编写于
7月 05, 2019
作者:
智布道
👁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
👽
新增动态标题,可配置切换标题后的显示内容、去掉默认的页面压缩
上级
1749173f
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
24 addition
and
10 deletion
+24
-10
blog-admin/src/main/resources/templates/config.ftl
blog-admin/src/main/resources/templates/config.ftl
+6
-0
blog-core/src/main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
.../main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
+5
-0
blog-web/src/main/resources/static/js/zhyd.js
blog-web/src/main/resources/static/js/zhyd.js
+3
-1
blog-web/src/main/resources/templates/about.ftl
blog-web/src/main/resources/templates/about.ftl
+1
-1
blog-web/src/main/resources/templates/archives.ftl
blog-web/src/main/resources/templates/archives.ftl
+1
-1
blog-web/src/main/resources/templates/disclaimer.ftl
blog-web/src/main/resources/templates/disclaimer.ftl
+1
-1
blog-web/src/main/resources/templates/guestbook.ftl
blog-web/src/main/resources/templates/guestbook.ftl
+1
-1
blog-web/src/main/resources/templates/index.ftl
blog-web/src/main/resources/templates/index.ftl
+1
-1
blog-web/src/main/resources/templates/layout/footer.ftl
blog-web/src/main/resources/templates/layout/footer.ftl
+2
-1
blog-web/src/main/resources/templates/links.ftl
blog-web/src/main/resources/templates/links.ftl
+1
-1
blog-web/src/main/resources/templates/recommended.ftl
blog-web/src/main/resources/templates/recommended.ftl
+1
-1
blog-web/src/main/resources/templates/updateLog.ftl
blog-web/src/main/resources/templates/updateLog.ftl
+1
-1
未找到文件。
blog-admin/src/main/resources/templates/config.ftl
浏览文件 @
884b7ea8
...
...
@@ -502,6 +502,12 @@
</div>
</div>
</div>
<div class="item form-group">
<label class="control-label col-md-3 col-sm-3 col-xs-12" for="dynamicTitle">动态标题 <i class="fa fa-question-circle" title="当切换浏览器tab时,在原tab上的标题。比如https://www.zhyd.me上的“麻溜儿回来~~~”"></i></label>
<div class="col-md-6 col-sm-6 col-xs-12">
<input type='text' class="form-control" id="dynamicTitle" name="dynamicTitle" placeholder="请输入切换窗口时想要显示的标题,如:麻溜儿回来~~~"/>
</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-core/src/main/java/com/zyd/blog/business/enums/ConfigKeyEnum.java
浏览文件 @
884b7ea8
...
...
@@ -186,6 +186,11 @@ public enum ConfigKeyEnum {
* 网站安装时间,默认为执行init_data.sql的时间
*/
INSTALLDATE
(
"installdate"
),
/**
* 当切换浏览器tab时,在原tab上的标题。比如https://www.zhyd.me上的“麻溜儿回来~~~”
*/
DYNAMIC_TITLE
(
"dynamicTitle"
),
;
private
String
key
;
...
...
blog-web/src/main/resources/static/js/zhyd.js
浏览文件 @
884b7ea8
...
...
@@ -10,7 +10,9 @@
// 动态切换浏览器窗口title https://zhangge.net/
jQuery
(
document
).
ready
(
function
()
{
function
c
()
{
document
.
title
=
document
[
a
]
?
"
麻溜儿回来~~~ |
"
+
d
+
""
:
d
var
dynamicTitle
=
appConfig
.
dynamicTitle
;
dynamicTitle
=
dynamicTitle
?
dynamicTitle
+
"
|
"
:
""
;
document
.
title
=
document
[
a
]
?
dynamicTitle
+
d
+
""
:
d
}
var
a
,
b
,
d
=
document
.
title
;
"
undefined
"
!=
typeof
document
.
hidden
?
(
a
=
"
hidden
"
,
b
=
"
visibilitychange
"
)
:
"
undefined
"
!=
typeof
document
.
mozHidden
?
(
a
=
"
mozHidden
"
,
b
=
"
mozvisibilitychange
"
)
:
"
undefined
"
!=
typeof
document
.
webkitHidden
&&
(
a
=
"
webkitHidden
"
,
b
=
"
webkitvisibilitychange
"
);
...
...
blog-web/src/main/resources/templates/about.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="关于 | ${config.siteName}" description="关于${config.siteName}" canonical="/about"></@header>
<div class="container custome-container">
...
...
blog-web/src/main/resources/templates/archives.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="归档目录 | ${config.siteName}" description="归档目录" canonical="/archives"></@header>
<div class="container custome-container">
...
...
blog-web/src/main/resources/templates/disclaimer.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="免责声明 | ${config.siteName}" keywords="" description="免责声明" canonical="/disclaimer"></@header>
<div class="container custome-container">
...
...
blog-web/src/main/resources/templates/guestbook.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="留言板 | ${config.siteName}" canonical="/guestbook" hasEditor=true>
</@header>
...
...
blog-web/src/main/resources/templates/index.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="${config.siteName!} | 一个程序员的个人博客"
keywords="${config.homeKeywords!}"
description="${config.homeDesc!}"
...
...
blog-web/src/main/resources/templates/layout/footer.ftl
浏览文件 @
884b7ea8
...
...
@@ -160,7 +160,8 @@
zfbPraiseCode: '${config.zfbPraiseCode}',
anonymous: '${config.anonymous}',
editorPlaceholder: '${config.editorPlaceholder}',
editorAlert: '${config.editorAlert}'
editorAlert: '${config.editorAlert}',
dynamicTitle: '${config.dynamicTitle}'
};
var oauthConfig = {
...
...
blog-web/src/main/resources/templates/links.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="友情链接 | ${config.siteName}"
description="${config.siteName},友情链接交换"
canonical="/links">
...
...
blog-web/src/main/resources/templates/recommended.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="站长推荐 | ${config.siteName}"
description="站长推荐"
canonical="/recommended">
...
...
blog-web/src/main/resources/templates/updateLog.ftl
浏览文件 @
884b7ea8
<#include "include/macros.ftl">
<@compress single_line=
tru
e>
<@compress single_line=
fals
e>
<@header title="网站更新记录 | ${config.siteName!}"
description="网站更新维护日志"
canonical="/updateLog">
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录