2023-03-24 20:25:04 +08:00
|
|
|
<head xmlns:th="https://www.thymeleaf.org" th:fragment="head"
|
2023-07-12 10:32:28 +08:00
|
|
|
th:with="description=${isPost ? post != null ? post.status.excerpt : singlePage != null ? singlePage.status.excerpt : site.seo.description : site.seo.description}">
|
2024-03-30 20:30:01 +08:00
|
|
|
<meta charset="utf-8"/>
|
2023-03-25 16:28:00 +08:00
|
|
|
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
2024-12-28 13:09:58 +08:00
|
|
|
<script th:if="${theme.config.enhance.enable_sw}" th:src="${(theme.config.enhance.enable_sw == 'uninstall')? #theme.assets('/js/sw.min.js?uninstall=true') + '&mew='+theme.spec.version : '/sw.min.js?mew='+theme.spec.version + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script>
|
2024-03-30 20:30:01 +08:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
2024-09-06 11:48:28 +08:00
|
|
|
<meta name="applicable-device" content="pc,mobile">
|
2024-03-31 09:55:08 +08:00
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
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}">
|
2024-09-12 09:44:08 +08:00
|
|
|
<meta property="og:type" content="website">
|
|
|
|
<meta property="og:title" th:content="${site.title}">
|
|
|
|
<meta property="og:url" th:content="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}">
|
|
|
|
<meta property="og:site_name" th:content="${title}">
|
|
|
|
<meta property="og:description" th:content="${description}">
|
|
|
|
<meta property="og:locale" content="zh">
|
|
|
|
<meta property="og:image" th:content="${#strings.isEmpty(site.favicon) ? '' : #strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}">
|
|
|
|
<meta name="twitter:card" content="summary">
|
|
|
|
<meta name="twitter:title" th:content="${title}">
|
|
|
|
<meta name="twitter:description" th:content="${description}">
|
|
|
|
<meta name="twitter:image" th:content="${#strings.isEmpty(site.favicon) ? '' : #strings.startsWith(site.favicon,'http') ? site.favicon : (#strings.endsWith(site.url,'/') ? #strings.substringBefore(site.url, '/') : site.url + site.favicon)}">
|
2024-03-31 09:54:26 +08:00
|
|
|
|
2024-04-24 06:09:36 +08:00
|
|
|
<link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(canonical,'/') ? #strings.substringBefore(site.url, '/') : site.url + 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})}">
|
2024-12-24 09:40:28 +08:00
|
|
|
<link rel="preload stylesheet" as="style" th:href="@{/assets/lib/remixicon@4.6.0/remixicon.min.css}">
|
2023-03-22 10:08:39 +08:00
|
|
|
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/style.min.css(mew=${theme.spec.version})}">
|
2023-11-10 18:09:17 +08:00
|
|
|
<link th:if="${theme.config.basic_style.theme_style == 'celebration'}" rel="preload stylesheet" as="style" th:href="@{/assets/css/celebration.min.css(mew=${theme.spec.version})}">
|
2023-03-22 10:08:39 +08:00
|
|
|
|
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-08-28 15:54:12 +08:00
|
|
|
<link th:if="${isPost == true || isPhotos == true}" 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-11-13 11:53:50 +08:00
|
|
|
<link th:if="${theme.config.enhance.cursor_style != 'none'}" rel="stylesheet" th:href="@{/assets/css/cursor.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-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}">
|
2023-08-05 15:47:59 +08:00
|
|
|
<style th:if="${!#strings.isEmpty(theme.config.custom.inline_css)}" type="text/css" th:utext="${theme.config.custom.inline_css}"></style>
|
2023-03-23 18:25:48 +08:00
|
|
|
[(${theme.config.custom.external_js_head})]
|
2023-08-05 15:47:59 +08:00
|
|
|
<script th:if="${!#strings.isEmpty(theme.config.custom.inline_js_head)}" type="text/javascript" th:utext="${theme.config.custom.inline_js_head}">
|
2023-03-23 18:25:48 +08:00
|
|
|
</script>
|
2023-03-22 10:08:39 +08:00
|
|
|
</head>
|