67 lines
4.3 KiB
HTML
67 lines
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<th:block xmlns:th="https://www.thymeleaf.org"
|
|
th:insert="~{common/layout :: layout (title = ${singlePage.spec.title + ' - ' + site.title}, canonical = @{/links}, content = ~{::content (${singlePage})}, isPost = false)}">
|
|
<th:block th:fragment="content (post)" th:with="defaultAvatar = ${#strings.defaultString(post.metadata.annotations.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
|
|
<!--头部图片-->
|
|
<div th:if="${!#strings.isEmpty(post.spec.cover)}" class="card widget">
|
|
<div class="cover-image" th:style="'background-image: url(' + ${post.spec.cover} + ')'">
|
|
<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 class="card">
|
|
<div class="card-content main">
|
|
<h1 class="title" th:text="${contributor.displayName} + '收藏栏'"></h1>
|
|
<div class="main-content">
|
|
<th:block th:each="group : ${linkFinder.groupBy()}">
|
|
<div th:if="${!#lists.isEmpty(group.links)}" class="links">
|
|
<h3 class="link-title"
|
|
th:text="${#strings.defaultString(group.spec.displayName, '秘密')}"
|
|
th:id="'toc' + ${groupStat.index}"></h3>
|
|
<ul class="link-items">
|
|
<li th:each="link : ${group.links}">
|
|
<a class="links-item" th:href="${link.spec.url}" rel="noopener noreferrer"
|
|
target="_blank"
|
|
th:title="${link.spec.description}">
|
|
<img th:if="${#strings.isEmpty(link.spec.logo)}" class="not-gallery"
|
|
th:title="${link.spec.displayName}" th:src="${defaultAvatar}"
|
|
th:alt="${link.spec.displayName}">
|
|
<img th:unless="${#strings.isEmpty(link.spec.logo)}" class="not-gallery"
|
|
th:title="${link.spec.displayName}" th:src="${defaultAvatar}"
|
|
th:data-url="${link.spec.logo}"
|
|
th:data-default="${defaultAvatar}"
|
|
onload="if(!this.finish){this.finish=true;this.src=this.getAttribute('data-url')}"
|
|
onerror="this.onerror='';if (this.finish) {this.src=this.getAttribute('data-default')} else {this.finish=true;this.src=this.getAttribute('data-url')}"
|
|
th:alt="${link.spec.displayName}">
|
|
<span class="link-name" th:text="${link.spec.displayName}"></span>
|
|
<div class="link-desc"
|
|
th:text="${#strings.defaultString(link.spec.description, '暂无介绍')}"></div>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</th:block>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card card-content" id="comment-wrapper"
|
|
th:if="${pluginFinder.available('PluginCommentWidget') && enableComment}">
|
|
<h3 class="comment-title">评论</h3>
|
|
<div class="widget-comment" th:data-id="${theme.config.page_config.link_comment_id}"
|
|
data-target="SinglePage"></div>
|
|
</div>
|
|
</th:block>
|
|
|
|
</th:block> |