mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-15 20:09:41 +08:00
52 lines
4.2 KiB
HTML
52 lines
4.2 KiB
HTML
<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}">
|
|
<meta charset="utf-8"/>
|
|
<title th:text="${title + (#strings.isEmpty(site.subtitle) ? '' : '|' + site.subtitle)}"></title>
|
|
<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=1.3.0' : '/sw.min.js?mew=1.3.0' + theme.config.enhance.enable_sw + '&cdn=' + theme.config.enhance.sw_cdn_source.replaceAll('\n', ',')}"></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<meta name="applicable-device" content="pc,mobile">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<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}">
|
|
<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)}">
|
|
|
|
<link rel="canonical" th:href="${#strings.isEmpty(canonical) ? '' : #strings.startsWith(canonical,'http') ? canonical : (#strings.endsWith(canonical,'/') ? #strings.substringBefore(site.url, '/') : site.url + canonical)}"/>
|
|
|
|
<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/remixicon@4.6.0/remixicon.min.css}">
|
|
<link rel="preload stylesheet" as="style" th:href="@{/assets/css/style.min.css(mew=${theme.spec.version})}">
|
|
<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})}">
|
|
|
|
<th:block th:if="${isPost}">
|
|
<link data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/post.min.css(mew=${theme.spec.version})}"/>
|
|
<link th:if="${enableShare}" data-pjax rel="preload stylesheet" as="style" th:href="@{/assets/css/dshare.min.css(mew=${theme.spec.version})}">
|
|
</th:block>
|
|
|
|
<link rel="stylesheet" th:href="@{/assets/css/mew-custom.min.css(mew=${theme.spec.version})}">
|
|
<link th:if="${isPost == true || isPhotos == true}" data-pjax rel="stylesheet" th:href="@{/assets/lib/fancybox@5.3.7/jquery.fancybox.min.css}">
|
|
<link rel="stylesheet" th:href="@{/assets/lib/qmsg/qmsg.min.css}">
|
|
|
|
<link th:if="${theme.config.enhance.cursor_style != 'none'}" rel="stylesheet" th:href="@{/assets/css/cursor.min.css(mew=${theme.spec.version})}">
|
|
|
|
<th:block th:replace="~{common/config}"/>
|
|
|
|
<script th:src="@{/assets/lib/jquery@3.5.1/jquery.min.js}"></script>
|
|
|
|
<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:utext="${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:utext="${theme.config.custom.inline_js_head}">
|
|
</script>
|
|
</head> |