146 lines
7.2 KiB
HTML
Raw Normal View History

2023-03-24 20:25:04 +08:00
<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>&nbsp;
</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>&nbsp;
</div>
2023-03-21 10:49:35 +08:00
</div>
2023-03-24 20:25:04 +08:00
<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">-->
2023-03-21 10:49:35 +08:00
2023-03-24 20:25:04 +08:00
<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>&nbsp;
2023-03-21 10:49:35 +08:00
</div>
2023-03-24 20:25:04 +08:00
</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>
2023-03-21 10:49:35 +08:00
</div>
2023-03-24 20:25:04 +08:00
</div>
2023-03-21 10:49:35 +08:00
2023-03-24 20:25:04 +08:00
<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>&nbsp;-->
<!-- </#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>&nbsp;-->
<!-- </#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>-->