<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head-fragment" th:with="
    hasPost=${post != null},
    isLock=${hasPost && !PostPassJar.validFromSession(request.session, post)}">
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
        
    <meta th:if="${!hasPost}" name="description" th:content="${@siteConfig.description}">
    <meta th:if="${hasPost && isLock}" name="description" th:content="${'该' + post.type.note + '已加密，请输入密码查看'}">
    <meta th:if="${hasPost &&!isLock}" name="description" th:content="${@markdownService.getSeoDescription(post)}">
    
    <meta th:if="${!hasPost || isLock}" name="keywords" th:content="${@siteConfig.keywords}">
    <meta th:if="${hasPost && !isLock}" name="keywords" th:content="${#strings.isEmpty(post.keywords) ? @siteConfig.keywords : post.keywords}">
    
    <meta http-equiv="Window-target" content="_top" />
    <meta name="base" th:content="@{/}"/>
    <title th:text="${title != null ? title : @siteConfig.name}"></title>
    <link rel="shortcut icon" th:href="@{/favicon.ico}" />
    <link th:if="${canonical != null}" rel="canonical" th:href="@{${canonical}}">
    <link rel="sitemap" type="application/xml" th:title="${@siteConfig.name + ' 的站点地图'}" th:href="@{/sitemap.xml}">
    <link th:if="${@siteConfig.rssOn}" rel="alternate" type="application/atom+xml" th:title="${@siteConfig.name + ' 的 Atom 订阅'}" th:href="@{/feed.xml}">
    <link rel="stylesheet" th:href="@{/blog/bleaching/css/index.css}">
    <link rel="stylesheet" th:href="@{/blog/bleaching/css/has.css}">
    <link rel="stylesheet" th:href="@{/blog/bleaching/css/post-list.css}">
    <link rel="stylesheet" th:href="@{/blog/bleaching/css/footer.css}">
    <link rel="prefetch" th:href="@{/blog/bleaching/css/prism/navy.css}" as="style" onload="this.rel='stylesheet'">
    <link rel="prefetch" th:href="@{/blog/plugins/katex/0.15.2/katex.min.css}" as="style" onload="this.rel='stylesheet'">
    <link rel="prefetch" th:href="@{/blog/bleaching/css/dogbox.css}" as="style" onload="this.rel='stylesheet'">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://npm.elemecdn.com">
    <link rel="lazy-js" for="katex" th:href="@{/blog/plugins/katex/0.15.2/katex.min.js}">
    <link rel="lazy-js" for="prism" th:href="@{/blog/bleaching/js/prism.js}">
    <link rel="lazy-js" for="prism" th:href="@{/blog/plugins/clipboard/clipboard.min.js}">
    <link rel="lazy-js" for="mermaid" th:href="@{/blog/plugins/mermaid/9/mermaid.min.js}">
    <script th:src="@{/blog/plugins/doghouse/js/doghouse.js}"></script>
    <script defer th:src="@{/blog/plugins/doghouse/js/scrollLock/doghouse-scrollLock.js}"></script>
    <script defer th:src="@{/blog/bleaching/js/dogbox.js}"></script>
    <script defer th:src="@{/blog/bleaching/js/index.js}"></script>
</head>
<div th:fragment="sidebar-container" class="sidebar">
    <div th:replace="~{blog/bleaching/side::side-fragment('POST')}"></div>
</div>
<header th:fragment="header">
    <div class="header">
        <div class="logo-and-site-name">
            <a th:href="@{/}" class="doghouse-logo" title="回到首页"></a>
            <div class="site-name-and-desc">
                <a class="site-name" th:href="@{/}"
                    th:text="${@siteConfig.name}" title="回到首页"></a>
                <p
                    class="description" 
                    th:text="${@siteConfig.description}"></p>
            </div>
        </div>
        <p th:if="${pageQuery != null && pageQuery.type!=null}" class="archive-title">
            <th:block th:if="${pageQuery.type=='tag'}">
                标签 <span th:text="${pageQuery.displayName}"></span> 下的文章
            </th:block>
            <th:block th:if="${pageQuery.type=='category'}">
                分类 <span th:text="${pageQuery.displayName}"></span> 下的文章
            </th:block>
            <th:block th:if="${pageQuery.type=='search'}">
                包含关键字 <span th:text="${pageQuery.displayName}"></span> 的文章
            </th:block>
        </p>
        <ul class="header-nav" th:with="uri=${request.requestURI}">
            <li><i class="theme-icon"></i></li>
            <li>
                <a class="nav-icon icon-subway" href="https://www.travellings.cn/go.html"
                title="开往 - 友链接力" target="_blank"></a>
                <a class="nav-link" href="https://www.travellings.cn/go.html"
                title="开往 - 友链接力" target="_blank">开往</a>
            </li>
            <li th:if="${@tweetConfig.tweetMode}">
                <a class="nav-icon icon-tweet" href="/tweet"
                th:title="${@tweetConfig.name}"></a>
                <a class="nav-link" href="/tweet"
                th:title="${@tweetConfig.name}">说说</a>
            </li>
            <li th:if="${@wikiConfig.wikiMode}">
                <a class="nav-icon icon-wiki" href="/wiki"
                th:title="${@wikiConfig.name}"></a>
                <a class="nav-link" href="/wiki"
                th:title="${@wikiConfig.name}">Wiki</a>
            </li>
            <li>
                <a href="/archives.html"
                   class="nav-icon icon-archives"
                   th:classappend="${uri == '/archives.html' || uri.startsWith('/archives.html/') ? 'current':''}"
                   title="归档"></a>
                <a href="/archives.html"
                   class="nav-link"
                   th:classappend="${uri == '/archives.html' || uri.startsWith('/archives.html/') ? 'current':''}"
                   title="归档">归档</a></li>
            <li>
                <a href="/about.html"
                   class="nav-icon icon-about"
                   th:classappend="${uri == '/about.html' || uri.startsWith('/about.html/') ? 'current':''}"
                   title="关于"></a>
                <a href="/about.html"
                   class="nav-link"
                   th:classappend="${uri == '/about.html' || uri.startsWith('/about.html/') ? 'current':''}"
                   title="关于">关于</a>
            </li>
            <li class="burger">
                <div class="x"></div>
                <div class="y"></div>
                <div class="z"></div>
            </li>
        </ul>
    </div>
    <p class="back-to-top"><a href="#" title="Back to top">Back to top</a></p>
</header>
</html>