<!DOCTYPE html>
<html lang="en" th:replace="~{modules/layouts/layout :: layout(content = ~{::content}, htmlType = 'moments')}"
      xmlns:th="http://www.thymeleaf.org">

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

    <div class="page" id="body-wrap">

        <!-- 头部导航栏 -->
        <header class="not-top-img" id="page-header">
            <nav th:replace="~{modules/nav :: nav(title = null)}"></nav>
        </header>
        <main class="layout hide-aside" id="content-inner">
            <div id="page">
                <th:div th:replace="~{macro/author-content :: author-content(background = ${theme.config.moment.backgroundImg},
                        smallTitle = ${theme.config.moment.smallTitle},
                        bigTitle = ${theme.config.moment.bigTitle},
                        detail = ${theme.config.moment.detail},
                        buttonUrl = ${theme.config.moment.buttonUrl},
                        buttonTitle = ${theme.config.moment.buttonTitle})}" />
                <div id="bber">
                    <section class="timeline page-1">
                        <ul class="list" id="waterfall">
                            <li class="item" th:each="moment : ${moments.items}"
                                th:with="content=${moment.spec.content}">
                                <div class="bber-content">
                                    <p class="datacont" th:if="${not #strings.isEmpty(content.html)}"
                                       th:utext="${content.html}"></p>
                                </div>
                                <th:block th:each="momentItem : ${content.medium}"
                                          th:if="${not #lists.isEmpty(content.medium)}">

                                    <div class="bber-content-img" th:if="${momentItem.type.name == 'PHOTO'}">
                                        <img class="bber-content-image-self entered loaded" data-ll-status="loaded"
                                             th:src="${momentItem.url}" title="瞬间配图">
                                    </div>
                                    <div class="bber-music" th:if="${momentItem.type.name == 'VIDEO'}">
                                        <video th:src="${momentItem.url}"></video>
                                    </div>

                                </th:block>
                                <hr>
                                <div class="bber-bottom">
                                    <div class="bber-info">
                                        <div class="bber-info-time"><i class="fas fa-calendar-days"></i>
                                            <time class="datatime"
                                                  th:text="${#dates.format(moment.spec.releaseTime,'yyyy-MM-dd')}"></time>
                                        </div>
                                    </div>
                                    <a class="bber-reply"
                                       th:onclick="rm.rightMenuCommentText([[${content.html}]]);"
                                       data-pjax-state=""> <i class="fa-solid fa-message"></i>
                                    </a>
                                </div>
                            </li>

                        </ul>
                    </section>
                    <!--  分页还没写 -->
                </div>
                <script>heo.reflashEssayWaterFall();</script>
                <hr/>
                <!--/* 评论组件 */-->
                <th:block
                        th:replace="~{modules/comment :: comment(group = 'content.halo.run',
                  kind = 'SinglePage',
                  name = 'moments',
                  allowComment = true)}"/>

            </div>


        </main>
        <!-- 底部 -->
        <footer th:replace="~{modules/footer :: footer}"></footer>
        <!-- 卡片顶部气泡效果 -->
        <script th:if="${theme.config.other.bubbleEnable}" async data-pjax th:src="${assets_link + '/libs/canvas/bubble.js'}"></script>
    </div>

</th:block>

</html>