<th:block th:fragment="content-moment(moments)">
    <div th:each="moment,iStat : ${moments}" th:id="${'post-'+moment.metadata.name}"
        class="loop_content p_item moment_item">
        <div class="p_item_inner">
            <!-- 帖子控制按钮（编辑/删除） -->
            <div th:if="${roleName == 'super-role' || moment.owner.name == user.name}" class="post_control">
                <a class="post_control_btn"><i class="ri-menu-3-line"></i></a>
                <div class="post_control_box">
                    <div class="post_control_list round8 shadow uk-animation-slide-bottom-small  uk-animation-fast"
                        th:pid="${moment.metadata.name}">
                        <a class="control_edit_post control_type" uk-toggle="target: #create_post_box">编辑瞬间</a>
                        <a class="control_delete_post control_type">删除瞬间</a>
                    </div>
                </div>
            </div>
            <!-- 用户信息（头像/名称/时间） -->
            <div class="list_user_meta">
                <div class="avatar">
                    <img th:src="@{${moment.owner.avatar}}">
                </div>
                <div class="name">
                    [[${moment.owner.displayName}]]
                    <time itemprop="datePublished"
                        th:datetime="${#dates.format(moment.spec.releaseTime, 'yyyy-MM-dd HH:mm')}">
                        <th:block th:replace="~{modules/widgets/time :: time(${moment.spec.releaseTime})}"></th:block>
                    </time>
                </div>
            </div>
            <!-- 内容区域 -->
            <div class="blog_content">
                <div class="entry-content" th:with="content=${moment.spec.content}">
                    <div class="p_title"></div>
                    <!-- 内容容器（仅新增moment-collapse-container类） -->
                    <div class="t_content moment-collapse-container" th:utext="${content.html}">
                        <th:block th:utext="${content.html}"></th:block>
                    </div>
                    <th:block th:replace="~{'macro/tpl/moment-medium'}" />
                </div>
                <!-- IP地址显示 -->
                <span class="ip_loca" th:if="${not #strings.isEmpty(moment.metadata.annotations.mylocal)}">
                    <i class="ri-map-pin-2-line"></i>
                    [[${moment.metadata.annotations.mylocal}]]
                </span>
                <!-- 底部操作栏 -->
                <div class="entry-footer">
                    <div class="post_footer_meta">
                        <!-- 左侧（点赞/分享） -->
                        <div class="left">
                            <a class="up_like " data-action="up" data-key="moment" th:data-id="${moment.metadata.name}">
                                <i class="ri-heart-2-line"></i>
                                <span th:text="${moment.stats.upvote}"></span>
                            </a>
                            <div class="pix_share_btn"
                                th:with="_cover = ${not #strings.isEmpty(theme.config.moments.banner) ? theme.config.moments.banner : '/themes/theme-pix/assets/img/banner-all.webp'}">
                                <a class="pix_icon share_btn_icon cr_poster" th:poster-data="${moment.metadata.name}"
                                    th:banner="${_cover}" th:uk-toggle="|target: #share_modal_${moment.metadata.name}|"
                                    uk-tooltip="title: 瞬间分享; pos: top;" tabindex="0" title=""
                                    aria-describedby="uk-tooltip-250" aria-expanded="false"><i
                                        class="ri-share-forward-box-line"></i></a>
                                <div th:id="|share_modal_${moment.metadata.name}|"
                                    class="uk-flex-top poster_modal uk-modal" uk-modal>
                                    <div class="uk-modal-dialog uk-modal-body uk-margin-auto-vertical">
                                        <button class="uk-modal-close-outside uk-icon uk-close" type="button"
                                            uk-close></button>
                                        <div class="poster_box_ap"></div>
                                        <div class="post_share_box hide">
                                            <a th:onclick="handleShare('wb','[(${_cover})]','[(${site.title+'-瞬间'})]','[(${'/moments/'+moment.metadata.name})]')"
                                                uk-tooltip="title: 微博分享; pos: top;" target="_blank">
                                                <i class="ri-weibo-line"></i></a>
                                            <a th:onclick="handleShare('qzone','[(${_cover})]','[(${site.title+'-瞬间'})]','[(${'/moments/'+moment.metadata.name})]')"
                                                uk-tooltip="title: QQ分享; pos: top;" target="_blank">
                                                <i class="ri-chrome-line"></i>
                                            </a>
                                            <a th:onclick="handleShare('qq','[(${_cover})]','[(${site.title+'-瞬间'})]','[(${'/moments/'+moment.metadata.name})]')"
                                                uk-tooltip="title: QQ好友分享; pos: top;" target="_blank">
                                                <i class="ri-qq-line"></i>
                                            </a>
                                            <a th:onclick="handleShare('copy','','','[(${'/moments/'+moment.metadata.name})]')"
                                                uk-tooltip="title: 复制链接; pos: top;">
                                                <i class="ri-file-copy-line"></i>
                                            </a>
                                            <a class="poster_download" uk-tooltip="title: 下载海报; pos: top;">
                                                <i class="ri-download-line"></i></a>
                                        </div>
                                        <img id="twoCode" style="display: none;" />
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 右侧（评论数 + 新增标签显示） -->
                        <div class="right" th:if="${(not theme.config.com.com_close) && haloCommentEnabled}">
                            <!-- 新增：标签显示（样式与分类一致） -->
                            <th:block th:if="${not #lists.isEmpty(moment.spec.tags)}">
                                <div class="normal_cat"># [[${moment.spec.tags[0]}]]</div>
                            </th:block>
                            <span class="moment_tag_gap"></span>
                            <span class="comnum show_comment" th:pid="${moment.metadata.name}"><i
                                    class="ri-message-3-line"></i>[[${moment.stats.totalComment}]]</span>
                        </div>
                    </div>
                </div>
                <!-- 评论区 -->
                <div th:if="${(not theme.config.com.com_close) && haloCommentEnabled}"
                    th:id="${'halo-comment-'+moment.metadata.name}" class="topic_comments_wrap" style="display: none">
                    <div class="topic_comments comments comments-area" data="moment">
                        <div class="toi_comments_main halo-comment">
                            <th:block
                                th:replace="~{modules/widgets/halo-comment :: halo-comment(name=${moment.metadata.name},kind='Moment',group='moment.halo.run')}">
                            </th:block>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</th:block>