-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.html
318 lines (292 loc) · 19.9 KB
/
layout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" th:content="${#servletContext.getAttribute('configMap')['blog_author']}">
<meta name="description" th:content="${#servletContext.getAttribute('configMap')['description']}" />
<meta name="keywords" th:content="${#servletContext.getAttribute('configMap')['keywords']}" />
<meta name="referrer" content="no-referrer" />
<link th:href="@{${prefix} + '/source/lib/pace/pace-theme-minimal.min.css?v=1.0.2'}" rel="stylesheet">
<script th:src="@{${prefix} + '/source/lib/pace/pace.min.js?v=1.0.2'}"></script>
<link th:href="@{${prefix} + '/source/lib/fancybox/source/jquery.fancybox.css?v=2.1.5'}" rel="stylesheet" type="text/css">
<link th:href="@{${prefix} + '/source/lib/font-awesome/css/font-awesome.min.css?v=4.6.2'}" rel="stylesheet" type="text/css">
<link rel="stylesheet" th:href="@{'/admin/assets/custom/jquery-search/jquery.search.css'}"/>
<link th:href="@{${prefix} + '/source/css/' + ${activeTheme.configMap['scheme']} + '_main.css?v=5.1.4'}" rel="stylesheet" type="text/css">
<link th:href="@{${prefix} + '/source/css/style.css?v=1.0.2'}" rel="stylesheet">
<link rel="stylesheet" th:href="@{${prefix} + '/source/js/highlightjs/styles/github-gist.min.css'}"/>
<link rel="stylesheet" th:href="@{${prefix} + '/source/js/overshare/css/share.min.css'}"/>
<link th:href="@{${prefix} + '/source/images/apple-touch-icon-next.png?v=5.1.4'}" rel="apple-touch-icon" sizes="180x180" >
<link th:href="@{${prefix} + '/source/images/favicon-32x32-next.png?v=5.1.4'}" rel="icon" type="image/png" sizes="32x32" >
<link th:href="@{${prefix} + '/source/images/favicon-16x16-next.png?v=5.1.4'}" rel="icon" type="image/png" sizes="16x16" >
<link th:href="@{${prefix} + '/source/images/logo.svg?v=5.1.4'}" color="#222" rel="mask-icon" >
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Pisces',
version: '5.1.4',
sidebar: {
"position": "left",
"display": "post",
"offset": 12,
"b2t": false,
"scrollpercent": false,
"onmobile": false
},
fancybox: true,
tabs: true,
motion: {
"enable": true,
"async": false,
"transition": {
"post_block": "fadeIn",
"post_header": "slideDownIn",
"post_body": "slideDownIn",
"coll_header": "slideLeftIn",
"sidebar": "slideUpIn"
}
},
};
</script>
<link rel="canonical" th:href="@{${activeTheme.configMap['homePage']}}">
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div th:class="${isDetail == true ? 'container sidebar-position-left page-post-detail' : 'container sidebar-position-left page-home'}">
<div class="headband"></div>
<!-- header start -->
<div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner">
<div class="site-brand-wrapper">
<div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title" th:text="${#servletContext.getAttribute('configMap')['blog_name']}"></span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<h1 class="site-subtitle" itemprop="description"></h1>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li th:each="nav : ${#servletContext.getAttribute('firstNav')}" th:class="${currentNav.code eq nav.code ? 'menu-item menu-item-active' : 'menu-item'}">
<a th:href="@{${#lists.isEmpty(nav.children) ? nav.link : '#'}}" th:class="${#lists.isEmpty(nav.children) ? '' : 'open'}">
<i th:class="${nav.icon}"></i> [[${nav.name}]]
<span th:if="${#lists.isEmpty(nav.children) == false}" class="menu-arrow">
<i class="fa fa-caret-down"></i>
</span>
</a>
<ul class="second-menu" th:if="${#lists.isEmpty(nav.children) == false}">
<li class="item" th:each="child : ${nav.children}">
<a th:href="@{${child.link}}"><i th:class="${child.icon}"></i> [[${child.name}]]</a>
</li>
</ul>
</li>
<li class="menu-item menu-item-search">
<a href="javascript:void(0)" rel="section" data-real-time-search>
<i class="menu-item-icon fa fa-fw fa-search"></i> 搜索
</a>
</li>
</ul>
</nav>
</div>
</header>
</div>
<!-- header end -->
<!-- sidebar start -->
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div layout:fragment="content"></div>
</div>
<div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element" th:if="${isDetail == true}">
<li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
文章目录
</li>
<li class="sidebar-nav-overview" data-target="site-overview-wrap">
站点概览
</li>
</ul>
<section th:class="${isDetail == false ? 'site-overview-wrap sidebar-panel sidebar-panel-active' : 'site-overview-wrap sidebar-panel'}">
<div class="site-overview">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image" th:src="@{${#strings.isEmpty(#servletContext.getAttribute('configMap')['logo_url']) != true ? #servletContext.getAttribute('configMap')['logo_url'] : prefix + '/source/images/logo.png'}}" th:alt="${#servletContext.getAttribute('configMap')['blog_author']}">
<p class="site-author-name" itemprop="name" th:text="${#servletContext.getAttribute('configMap')['blog_author']}"></p>
<p class="site-description motion-element" itemprop="description"></p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives">
<span class="site-state-item-count" th:text="${#servletContext.getAttribute('postNum')}">0</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/index.html">
<span class="site-state-item-count" th:text="${#servletContext.getAttribute('categoryNum')}">0</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/index.html">
<span class="site-state-item-count" th:text="${#servletContext.getAttribute('tagNum')}">0</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="links-of-author motion-element">
<span class="links-of-author-item" th:if="${#strings.isEmpty(#servletContext.getAttribute('configMap')['git_hub_account']) != true}">
<a th:href="@{${#servletContext.getAttribute('configMap')['git_hub_account']}}" target="_blank" title="GitHub">
<i class="fa fa-fw fa-github"></i>GitHub
</a>
</span>
<span class="links-of-author-item" th:if="${#strings.isEmpty(#servletContext.getAttribute('configMap')['email']) != true}">
<a th:href="@{'mailto:' + ${#servletContext.getAttribute('configMap')['email']}}" target="_blank" title="E-Mail">
<i class="fa fa-fw fa-envelope"></i>E-Mail
</a>
</span>
<span class="links-of-author-item" th:if="${#strings.isEmpty(#servletContext.getAttribute('configMap')['qq_account']) != true}">
<a th:href="@{'javascript:' + ${#servletContext.getAttribute('configMap')['qq_account']}}" target="_blank" th:title="QQ">
<i class="fa fa-fw fa-globe"></i>QQ
</a>
</span>
<span class="links-of-author-item" th:if="${#strings.isEmpty(#servletContext.getAttribute('configMap')['wx_account']) != true}">
<a th:href="@{'javascript:' + ${#servletContext.getAttribute('configMap')['wx_account']}}" target="_blank" th:title="微信">
<i class="fa fa-fw fa-twitter"></i>微信
</a>
</span>
</div>
<div class="links-of-blogroll motion-element links-of-blogroll-block">
<div class="links-of-blogroll-title">
<i class="fa fa-fw fa-link"></i>
友链
</div>
<ul class="links-of-blogroll-list">
<li class="links-of-blogroll-item" th:each="friendLink : ${#servletContext.getAttribute('friendLinkList')}">
<a th:href="@{${friendLink.homeUrl}}" th:title="${friendLink.title}" target="_blank" th:text="${friendLink.title}"></a>
</li>
</ul>
</div>
</div>
</section>
<!--noindex-->
<section th:if="${isDetail == true}" class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
<div class="post-toc-content" id="postTocContent"></div>
</div>
</section>
<!--/noindex-->
</div>
</aside>
</div>
</div>
</main>
<!-- sidebar end -->
<!-- footer start -->
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright"><span itemprop="copyrightYear" th:utext="${#servletContext.getAttribute('configMap')['power_by']}"></span>
<span class="author" itemprop="copyrightHolder" th:utext="${#servletContext.getAttribute('configMap')['anchor']}"></span>
</div>
<div class="theme-info">主题来自
<a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Muse</a>
v5.1.4
</div>
</div>
</footer>
<!-- footer end -->
<div class="real-time-search-container" id="real-time-search-container"></div>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/jquery/index.js?v=2.1.3'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/fastclick/lib/fastclick.min.js?v=1.0.6'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/velocity/velocity.min.js?v=1.2.1'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/velocity/velocity.ui.min.js?v=1.2.1'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/utils.js?v=5.1.4'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/motion.js?v=5.1.4'}"></script>
<span th:if="${activeTheme.configMap['scheme'] == 'Pisces' || activeTheme.configMap['scheme'] == 'Gemini'}">
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/affix.js?v=5.1.4'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/schemes/pisces.js?v=5.1.4'}"></script>
</span>
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/bootstrap.js?v=5.1.4'}"></script>
<script type='text/javascript' th:src="@{'/admin/assets/custom/jquery-search/jquery.hideseek.min.js'}" ></script>
<script type='text/javascript' th:src="@{'/admin/assets/custom/jquery-search/jquery.search.js'}" ></script>
<script type='text/javascript'>
$("#real-time-search-container").RealTimeSearch({
listUrl: "/postList.json"
});
$("a.open").on("click", function () {
$(this).next("ul.second-menu").toggleClass("show");
});
</script>
<span th:if="${isDetail}">
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/scrollspy.js?v=5.1.4'}"></script>
<script type="text/javascript" th:src="@{${prefix} + '/source/js/src/post-details.js?v=5.1.4'}"></script>
<script type='text/javascript' th:src="@{${prefix} + '/source/js/highlightjs/highlight.pack.js'}"></script>
<script type='text/javascript' th:src="@{${prefix} + '/source/js/overshare/js/social-share.min.js'}"></script>
<script type='text/javascript' th:src="@{${prefix} + '/source/js/layer/layer.js'}"></script>
<script type='text/javascript' th:src="@{${prefix} + '/source/js/toc.js'}"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
document.querySelectorAll('figure span').forEach(function(block) {
hljs.highlightBlock(block);
});
});
$("#postTocContent").html(tocHelper("post-content", "nav"));
$("#priseBtn").on("click",function () {
let postId = $(this).data("id");
let key = "post-hasPrize" + postId;
if (sessionStorage.getItem(key)) {
layer.msg("已点赞");
return;
}
$.post("/praisePost/" + postId, null, function (resp) {
if (resp.success) {
$("#prizeCount").text(resp.data);
sessionStorage.setItem(key, "y");
layer.msg("谢谢点赞");
}
},"json");
});
$("#shareOpenBtn").on("click",function () {
let shareBtns = $("#shareBtns");
if (shareBtns.hasClass("share-open")) {
shareBtns.removeClass("share-open");
} else {
shareBtns.addClass("share-open");
}
});
</script>
</span>
</body>
</html>