<!DOCTYPE html>
<html xmlns:th="https://www.thymeleaf.org"
  th:replace="~{modules/layouts/layout :: layout(_head = null,_content = ~{::content},_title=null)}">

<th:block th:fragment="content">

  <div class="page_main uk-width-2-3@m">

    <th:block th:replace="~{modules/header}"/>



    <div id="pjax-container" th:with="
      page = ${#lists.isEmpty(param.page) ? 1 : param.page[0]},
      tag = ${#lists.isEmpty(param.tag) ? null : param.tag[0]}
    ">

      <th:block th:if="${theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments')}"
        th:with="momentPage = ${#strings.isEmpty(tag) ? momentFinder.list(page, site.post.postPageSize) : momentFinder.listByTag(page, site.post.postPageSize, tag)}">
        <th:block
          th:replace="~{macro/home-moment :: home-moment(${momentPage},${momentFinder.listAllTags()},'/')}">
        </th:block>
      </th:block>

      <th:block th:if="${theme.config.style.home_post_type=='post' || (not (theme.config.style.home_post_type=='moment' && pluginFinder.available('PluginMoments'))) }">
        <th:block th:replace="~{macro/home-blog :: home-blog(${posts},'/',null,null)}"></th:block>
      </th:block>

    </div>


    <th:block th:replace="~{modules/footer-main}"/>

  </div>
</th:block>

</html>
