mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
146 lines
7.2 KiB
HTML
146 lines
7.2 KiB
HTML
<div xmlns:th="https://www.thymeleaf.org"
|
|
th:fragment="article (post, commentType)">
|
|
|
|
<div th:if="${!#strings.isEmpty(post.spec.cover)}" class="card widget">
|
|
<div class="cover-image" th:style="'background-image: url(' + ${post.spec.cover} + ')'">
|
|
<div th:if="${!#lists.isEmpty(post.categories)}" class="category">
|
|
<a th:each="cy : ${post.categories}" th:href="${cy.status.permalink}" th:text="${cy.spec.displayName}"></a>
|
|
</div>
|
|
<div class="details">
|
|
<h1 class="title" th:text="${post.spec.title}"></h1>
|
|
<ul class="breadcrumb">
|
|
<li th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd HH:mm')}"></li>
|
|
<li><i class="fa fa-eye"></i>[[${post.stats.visit}]]</li>
|
|
<li th:if="${post.spec.allowComment}" class="is-hidden-mobile"><i class="fa fa-comments-o"></i>[[${post.stats.comment}]]
|
|
</li>
|
|
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
|
<li><i class="fa fa-pencil"></i>[[${#strings.length(#strings.trim(post.content.content))}]]</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div th:if="${post.metadata.annotations.containsKey('tips')}" class="card tips brightness"><i
|
|
class="fa fa-times click-close" data-close=".tips"></i>[[${post.metadata.annotations.tips}]]
|
|
</div>
|
|
|
|
<div class="card">
|
|
<div class="card-content main">
|
|
<th:block th:if="${!#strings.isEmpty(post.spec.cover)}">
|
|
<h1 class="title" th:text="${post.spec.title}"></h1>
|
|
<div class="meta">
|
|
<ul class="breadcrumb">
|
|
<li th:text="${#dates.format(post.spec.publishTime, 'yyyy-MM-dd HH:mm')}"></li>
|
|
<li><i class="fa fa-eye"></i>[[${post.stats.visit}]]</li>
|
|
<li th:if="${post.spec.allowComment}" class="is-hidden-mobile"><i class="fa fa-comments-o"></i>[[${post.stats.comment}]]
|
|
</li>
|
|
<li><i class="fa fa-thumbs-o-up"></i>[[${post.stats.upvote}]]</li>
|
|
<li><i class="fa fa-pencil"></i>[[${#strings.length(#strings.trim(post.content.content))}]]</li>
|
|
</ul>
|
|
<div th:if="${!#lists.isEmpty(post.categories)}" class="level-item">
|
|
<a th:each="cy : ${post.categories}" th:href="${cy.status.permalink}" th:text="${cy.spec.displayName}"></a>
|
|
</div>
|
|
</div>
|
|
<hr/>
|
|
</th:block>
|
|
|
|
<div th:data-id="${post.metadata.name}" th:data-target="${commentType}" class="main-content article"
|
|
th:utext="${post.content.content}">
|
|
</div>
|
|
|
|
<!-- <#include "templates/main/admire.html">-->
|
|
|
|
|
|
<div th:if="${!#lists.isEmpty(post.tags)}" class="article-operation">
|
|
<div class="level-item">
|
|
<a th:each=" tag : ${post.tags}" th:href="${tag.status.permalink}" th:text="${tag.spec.displayName}"></a>
|
|
</div>
|
|
</div>
|
|
<th:bolck th:if="${enableCopyright || enableShare}">
|
|
<hr/>
|
|
<th:block th:if="${enableCopyright}">
|
|
<th:block th:replace="~{main/copyright}"></th:block>
|
|
</th:block>
|
|
<div th:if="${enableShare}" class="dshare"></div>
|
|
</th:bolck>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card card-content" id="comment-wrapper" th:if="${pluginFinder.available('PluginCommentWidget')}">
|
|
<h3 class="comment-title">评论</h3>
|
|
<halo:comment colorScheme="window.dataTheme" group="content.halo.run" th:kind="${commentType}"
|
|
th:attr="name=${post.metadata.name}"/>
|
|
</div>
|
|
</div>
|
|
<!--<#macro article post,commentType>-->
|
|
<!-- <#assign updateInterval = ((.now?long - post.updateTime?long)/86400000)?floor >-->
|
|
<!-- <#if updateInterval gt (settings.invalid_tips_day!'99999999')?number >-->
|
|
<!-- <div class="card tips brightness"><i class="fa fa-times click-close" data-close=".tips"></i>本文最后更新于 ${post.updateTime?string('yyyy-MM-dd')},距今已有 ${updateInterval} 天,若文章内容或图片链接失效,请留言反馈。</div>-->
|
|
<!-- </#if>-->
|
|
<!-- <div class="card">-->
|
|
<!-- <div class="card-content main">-->
|
|
<!-- <#if !post.thumbnail?? || post.thumbnail==''>-->
|
|
<!-- <h1 class="title">${post.title!}</h1>-->
|
|
<!-- <div class="meta">-->
|
|
<!-- <ul class="breadcrumb">-->
|
|
<!-- <li><@global.timeline datetime=post.createTime/></li>-->
|
|
<!-- <li><i class="fa fa-eye"></i>${post.visits?c}</li>-->
|
|
<!-- <#if !post.disallowComment!false><li><i class="fa fa-comments-o"></i>${post.commentCount?c}</li></#if>-->
|
|
<!-- <#if !is_sheet??><li><i class="fa fa-thumbs-o-up"></i>${post.likes?c}</li></#if>-->
|
|
<!-- <li><i class="fa fa-pencil"></i>${post.wordCount?c}</li>-->
|
|
<!-- </ul>-->
|
|
<!-- <#if post.categories?? && post.categories?size gt 0>-->
|
|
<!-- <div class="level-item">-->
|
|
<!-- <#list post.categories as category>-->
|
|
<!-- <a href="${category.fullPath!}">${category.name!}</a> -->
|
|
<!-- </#list>-->
|
|
<!-- </div>-->
|
|
<!-- </#if>-->
|
|
<!-- </div>-->
|
|
<!-- <hr/>-->
|
|
<!-- </#if>-->
|
|
<!-- <div data-id="${post.id?c}" data-target="${commentType}s" class="main-content article">${post.formatContent!}</div>-->
|
|
|
|
<!-- <#include "templates/main/admire.html">-->
|
|
|
|
<!-- <#if tags?? && (tags?size gt 0)>-->
|
|
<!-- <div class="article-operation">-->
|
|
<!-- <div class="level-item">-->
|
|
<!-- <#list tags as tag>-->
|
|
<!-- <a href="${tag.fullPath!}">${tag.name!}</a> -->
|
|
<!-- </#list>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- </#if>-->
|
|
<!-- <#assign enable_copyright = (metas?? && metas.enable_copyright?? && metas.enable_copyright?trim!='')?then(metas.enable_copyright?trim, (settings.enable_copyright!true)?c)>-->
|
|
<!-- <#if enable_copyright == 'true' || enable_share>-->
|
|
<!-- <hr/>-->
|
|
<!-- <#if enable_copyright == 'true'>-->
|
|
<!-- <#include "copyright.ftl">-->
|
|
<!-- </#if>-->
|
|
<!-- <#if enable_share>-->
|
|
<!-- <div class="dshare"></div>-->
|
|
<!-- </#if>-->
|
|
<!-- </#if>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
|
|
<!-- <#if nextPost?? || prevPost??>-->
|
|
<!-- <div class="card">-->
|
|
<!-- <div class="level post-navigation card-content">-->
|
|
<!-- <#if prevPost??>-->
|
|
<!-- <a class="level-item" href="${prevPost.fullPath!}">-->
|
|
<!-- <i class="fa fa-angle-left"></i>-->
|
|
<!-- <span>${prevPost.title!}</span>-->
|
|
<!-- </a>-->
|
|
<!-- </#if>-->
|
|
<!-- <#if nextPost??>-->
|
|
<!-- <a class="level-item" href="${nextPost.fullPath!}">-->
|
|
<!-- <span>${nextPost.title!}</span>-->
|
|
<!-- <i class="fa fa-angle-right"></i>-->
|
|
<!-- </a>-->
|
|
<!-- </#if>-->
|
|
<!-- </div>-->
|
|
<!-- </div>-->
|
|
<!-- </#if>-->
|
|
<!--</#macro>--> |