54 lines
3.7 KiB
HTML
Raw Normal View History

2023-03-24 20:25:04 +08:00
<head xmlns:th="https://www.thymeleaf.org" th:fragment="head"
th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}">
2023-03-25 16:28:00 +08:00
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
2023-03-24 20:25:04 +08:00
<script th:if="${(theme.config.enhance.enable_sw != 'false')}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/assets/js/sw.min.js') + '?mew=0.0.1' : '/sw.min.js?mew=0.0.1' + theme.config.enhance.enable_sw}"></script>
2023-03-22 10:08:39 +08:00
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="x-dns-prefetch-control" content="on">
2023-03-24 20:25:04 +08:00
<meta name="keywords" th:content="${site.seo.keywords}"/>
<meta name="description" th:content="${description}">
<meta name="author" th:content="${site.title}">
<meta name="site" th:content="${site.url}">
2023-03-22 10:08:39 +08:00
<meta property="og:type" content="website">
2023-03-24 20:25:04 +08:00
<meta property="og:title" th:content="${site.title}">
<meta property="og:url" th:content="${canonical}">
<meta property="og:site_name" th:content="${title}">
<meta property="og:description" th:content="${description}">
2023-03-22 10:08:39 +08:00
<meta property="og:locale" content="zh">
2023-03-24 20:25:04 +08:00
<meta property="og:image" th:content="${site.logo}">
2023-03-22 10:08:39 +08:00
<meta name="twitter:card" content="summary">
2023-03-24 20:25:04 +08:00
<meta name="twitter:title" th:content="${title}">
<meta name="twitter:description" th:content="${description}">
<meta name="twitter:image" th:content="${site.logo}">
<link rel="canonical" th:href="${canonical}"/>
2023-03-22 10:08:39 +08:00
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/theme.min.css(mew=${theme.spec.version})}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/font-awesome@4.7.0/css/font-awesome.min.css}">
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/style.min.css(mew=${theme.spec.version})}">
2023-03-24 20:25:04 +08:00
<th:block th:if="${isPost}">
<link data-pjax rel="preload stylesheet" as="style"
th:href="@{'/assets/lib/highlightjs@11.5.1/styles/' + ${theme.config.post.code_pretty} + '.min.css'}"/>
<link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/>
2023-07-12 17:16:03 +08:00
<link th:if="${enableKatex}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/lib/katex@0.12.0/katex.min.css}"/>
2023-03-24 20:25:04 +08:00
<link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}">
</th:block>
2023-03-22 10:08:39 +08:00
2023-03-22 11:57:40 +08:00
<link rel="stylesheet" th:href="@{/assets/css/mew-custom.min.css(mew=${theme.spec.version})}">
2023-03-24 20:25:04 +08:00
<link th:if="${isPost}" data-pjax rel="stylesheet" th:href="@{/assets/lib/fancybox@5.3.7/jquery.fancybox.min.css}">
2023-03-22 11:57:40 +08:00
<link rel="stylesheet" th:href="@{/assets/lib/qmsg/qmsg.min.css}">
2023-03-22 10:08:39 +08:00
2023-03-24 20:25:04 +08:00
<link th:if="${theme.config.enhance.cursor_style != 'none'}" rel="stylesheet" th:href="@{'/assets/css/cursor/' + ${theme.config.enhance.cursor_style} + '.min.css'(mew=${theme.spec.version})}">
2023-03-22 10:08:39 +08:00
2023-03-25 12:46:08 +08:00
<th:block th:replace="~{common/config}"/>
2023-03-22 10:08:39 +08:00
2023-03-23 18:25:48 +08:00
<script th:src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script>
2023-03-22 10:08:39 +08:00
2023-03-22 11:57:40 +08:00
<script th:if="${theme.config.enhance.enable_patch}" src="//cdn.jsdelivr.net/gh/nineya/halo-theme-dream@master/src/patch.js"></script>
2023-03-23 18:25:48 +08:00
<link th:if="${!#strings.isEmpty(theme.config.custom.external_css)}" rel="stylesheet" th:href="${theme.config.custom.external_css}">
<style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:text="${theme.config.custom.inline_css}"></style>
[(${theme.config.custom.external_js_head})]
<script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:text="${theme.config.custom.inline_js_head}">
</script>
2023-03-22 10:08:39 +08:00
</head>