<!doctype html>
<th:block
  xmlns:th="https://www.thymeleaf.org"
  th:replace="~{components/base-layout/template :: html(
    title = ${#annotations.getOrDefault(singlePage, 'higan.howiehz.top/page-title', singlePage.spec?.title)},
    head = ~{:: head},
    content = ~{:: body},
    header = ~{components/header/template :: body},
    navbar = ~{},
    language = ${#annotations.get(singlePage, 'higan.howiehz.top/page-language')}
  )}"
>
  <head th:remove="tag">
    <link
      rel="canonical"
      th:if="${theme.config?.custom_page_styles?.is_enable_canonical_link}"
      th:href="${siteUrl} + @{${singlePage.status.permalink}}"
    />
    <th:block th:insert="~{components/header/template :: head}"></th:block>
    <th:block
      th:if="${theme.config?.custom_page_styles?.is_custom_page_comment_section_show
               and haloCommentEnabled}"
      th:insert="~{components/halo-comment-widget/template :: head}"
    ></th:block>
    <script type="module" crossorigin src="/themes/howiehz-higan/assets/1.65.0D1jNi1o.js" integrity="sha384-vexvxQYi9+TzDrkA1yKqOnEmksc0TAAuimikalCQIXMMndaSccHZYkzZPYX82C8l"></script>
    <link rel="modulepreload" crossorigin href="/themes/howiehz-higan/assets/1.65.0Bk5FHpu.js" integrity="sha384-cg6x7Pb77Zqih642wbHELBIb8vuQ0VeuH0Zb6tWgHC6J1oxIpFMgVUPeGS0CiGHV">
    <link rel="modulepreload" crossorigin href="/themes/howiehz-higan/assets/1.65.0BbV69jM.js" integrity="sha384-mhseGOVSTlahmPy3dNXz3VlLzY2uhhzQEwm9z2JWvCV/dsLBvRVIDV0olOspj/ma">
    <link rel="stylesheet" crossorigin href="/themes/howiehz-higan/assets/1.65.0Nu1u8yY.css" integrity="sha384-h6WHiBEsz55L9LeaTSvyYRiiYVLTekMvNJhG+VjwyKti556zI6k8M+nZTayAbuwQ">
    <link rel="stylesheet" crossorigin href="/themes/howiehz-higan/assets/1.65.0Bicc1e3.css" integrity="sha384-JZPOQ+7mdAeT6L3rX1fi/Xvhtbr+lZd0Wy165luHFqtcM5hQXidOHfpB5R/zc686">
  </head>
  <body th:remove="tag">
    <style th:if="${theme.config?.custom_page_styles?.is_optimize_content_paragraph_spacing}">.content>p{min-height:1.1em}</style>
    <th:block
      th:if="${theme.config?.custom_page_styles?.is_enable_paragraph_first_line_indent}"
      th:insert="~{components/paragraph-first-line-indent-style/template :: body(
        indentValue=${theme.config?.custom_page_styles?.paragraph_first_line_indent_value}
      )}"
    ></th:block>
    <th:block th:insert="~{components/heading-anchor-symbol-style/template :: body}"></th:block>
    <th:block th:insert="~{components/heading-anchor-svg/template :: body}"></th:block>
    <article class="post" itemscope itemtype="http://schema.org/BlogPosting">
      <header>
        <h1>
          <th:block th:text="${singlePage.spec?.title}">标题替换位</th:block>
        </h1>
        <div class="meta">
          <span
            class="tw-fa"
            th:if="${theme.config?.custom_page_styles?.is_show_post_estimated_reading_time}"
            th:with="wordCount = ${pluginFinder.available('extra-api', '3.*')
                                   ? extraApiStatsFinder.getContentWordCount(singlePage.content?.content)
                                   : #strings.length(singlePage.content?.content) / 2 }"
            th:title="#{page.post.estimated-reading-time(#{common.words(${wordCount})})}"
          >
            <span class="iconify mdi--clock-outline"></span>
            <span
              class="readtime"
              th:text="#{common.min(${#numbers.formatDecimal(wordCount * 1.0 / 450, 1, 1) + '~' + #numbers.formatDecimal(wordCount * 1.0 / 350, 1, 1)})}"
            >
              文章预计阅读时间替换位
            </span>
          </span>
          <span
            class="tw-fa"
            th:if="${theme.config?.custom_page_styles?.is_show_post_word_count}"
            th:with="wordCount = ${pluginFinder.available('extra-api', '3.*')
                                   ? extraApiStatsFinder.getContentWordCount(singlePage.content?.content)
                                   : #strings.length(singlePage.content?.content) / 2 }"
            th:title="|#{page.post.word-count} #{common.words(${wordCount})}|"
          >
            <span class="iconify fluent--text-edit-style-character-a-32-regular"></span>
            <span class="word-count" th:text="${wordCount}">文章字数替换位</span>
          </span>
        </div>
      </header>
      <div class="content tw-mb" itemprop="articleBody" th:utext="${singlePage.content?.content}">
        singlePage formatted content
      </div>
      <hr
        th:if="${theme.config?.custom_page_styles?.is_dividing_line_at_the_end_of_content_show}"
        class="divide tw-wc"
      />
      <div
        class="post-comment"
        th:if="${theme.config?.custom_page_styles?.is_custom_page_comment_section_show
                 and haloCommentEnabled}"
      >
        <halo:comment group="content.halo.run" kind="SinglePage" th:name="${singlePage.metadata?.name}"></halo:comment>
      </div>
    </article>
  </body>
</th:block>
