<!doctype html>
<html
  xmlns:th="https://www.thymeleaf.org"
  th:replace="~{modules/layout :: html(content = ~{::content}, showAside = true, pageTitle = null, head = ~{::head})}"
>
  <th:block th:fragment="content">
    <div class="clarity-header mobile-only">
      <div th:if="${theme.config.header.emoji_tail}" class="emoji-tail">
        <span
          th:each="emoji,iterStat : ${#strings.arraySplit(theme.config.header.emoji_tail, ',')}"
          class="split-char"
          th:style="'--delay: ' + ${iterStat.index * 0.6 - 3} + 's'"
          th:text="${emoji}"
        >
        </span>
      </div>

      <a href="/">
        <img
          th:if="${theme.config.header.logo}"
          th:src="${theme.config.header.logo}"
          class="clarity-logo"
          th:classappend="${theme.config.header.show_title} ? 'circle' : ''"
          th:alt="${site.title}"
        />
      </a>

      <div th:if="${theme.config.header.show_title}" class="clarity-text">
        <div class="header-title">
          <span
            th:each="char,iterStat : ${#strings.arraySplit(site.title, '')}"
            class="split-char"
            th:style="'--delay: ' + ${(iterStat.index + 1) * 0.1} + 's'"
            th:text="${char}"
          >
          </span>
        </div>
        <div class="header-subtitle" th:text="${theme.config.header.subtitle}"></div>
      </div>
    </div>

    <!-- 首页顶部小组件 -->
    <th:block th:replace="~{modules/home :: home}" />

    <th:block th:replace="~{modules/post-list :: list(posts=${posts}, caller='index')}" />
  </th:block>
</html>
