91 lines
6.4 KiB
HTML
Raw Normal View History

2023-04-28 16:55:00 +08:00
<!DOCTYPE html>
<th:block xmlns:th="https://www.thymeleaf.org"
th:insert="~{common/layout :: layout (title = ${#strings.defaultString(linksTitle, '友链')} + ' - ' + ${site.title}, canonical = @{/links}, content = ~{::content}, isPost = false)}"
th:with="baseEnableComment = ${theme.config.page_config.link_enable_comment == true || (!#strings.isEmpty(theme.config.page_config.link_comment_id) && theme.config.page_config.link_enable_comment == 'custom')}">
2023-04-28 16:55:00 +08:00
<th:block th:fragment="content"
th:with="defaultAvatar = ${#strings.defaultString(theme.config.page_config.links_default_avatar, #theme.assets('/img/avatar.svg'))}">
<div class="card">
<div th:if="${!#strings.isEmpty(theme.config.page_config.links_thumbnail)}" class="card-image cover-image" th:style="'background-image: url(' + ${theme.config.page_config.links_thumbnail} + ')'">
</div>
<div class="card-content main">
<h1 class="title" th:text="${#strings.defaultString(linksTitle, '友链')} + ' - ' + ${contributor.displayName} + '的小伙伴们'"></h1>
<div class="main-content">
2023-04-28 16:55:00 +08:00
<th:block th:each="group : ${groups}">
<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>
<hr th:if="${theme.config.page_config.show_exchange_info || !#strings.isEmpty(theme.config.page_config.links_info)}"/>
<th:block th:if="${theme.config.page_config.show_exchange_info}"
th:with="bloggerAvatar= ${#strings.defaultString(theme.config.page_config.links_blogger_avatar, contributor.avatar)}">
<p style="margin-bottom: 4px">申请友链的方法:</p>
2023-04-28 16:55:00 +08:00
<ul>
<li>名称:[[${site.title}]]</li>
<li>地址:<a th:href="${site.url}" target="_blank" th:text="${site.url}"></a></li>
<li>图标:<a th:href="${bloggerAvatar}" target="_blank" th:text="${bloggerAvatar}"></a></li>
2023-04-28 16:55:00 +08:00
<li>描述:[[${contributor.bio}]]</li>
<li th:if="${!#strings.isEmpty(theme.config.page_config.links_rss_address)}">订阅:<a th:href="${theme.config.page_config.links_rss_address}" target="_blank" th:text="${theme.config.page_config.links_rss_address}"></a></li>
2023-04-28 16:55:00 +08:00
</ul>
</th:block>
<div th:if="${!#strings.isEmpty(theme.config.page_config.links_info)}" th:utext="${theme.config.page_config.links_info}"></div>
2023-04-28 16:55:00 +08:00
</div>
</div>
</div>
2024-03-09 10:57:53 +08:00
<div class="card card-content comment-wrapper-z-index" id="comment-wrapper" th:if="${enableComment}">
2023-04-28 16:55:00 +08:00
<h3 class="comment-title">评论</h3>
<th:block th:unless="${theme.config.enhance.enable_comment_type}">
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
<comment-widget
group="content.halo.run"
kind="SinglePage"
version="v1alpha1"
th:name="${theme.config.page_config.link_comment_id}"
with-replies="false"
></comment-widget>
</th:block>
<th:block th:if="${theme.config.page_config.link_enable_comment != 'custom'}">
<comment-widget
group="plugin.halo.run"
kind="Plugin"
version="v1alpha1"
th:name="${pluginName}"
with-replies="false"
></comment-widget>
</th:block>
2024-05-07 13:01:30 +08:00
</th:block>
<th:block th:if="${theme.config.enhance.enable_comment_type}">
<th:block th:if="${theme.config.page_config.link_enable_comment == 'custom'}">
<halo:comment
group="content.halo.run"
kind="SinglePage"
th:attr="name=${theme.config.page_config.link_comment_id}"
/>
</th:block>
<th:block th:if="${theme.config.page_config.link_enable_comment != 'custom'}">
<halo:comment
group="plugin.halo.run"
kind="Plugin"
th:attr="name=${pluginName}"
/>
</th:block>
2024-05-07 13:01:30 +08:00
</th:block>
2023-04-28 16:55:00 +08:00
</div>
</th:block>
</th:block>