feat: add option to show or hide the pin icon

This commit is contained in:
Erzbir
2025-11-18 11:30:55 +08:00
parent 6e0c498429
commit ad6f94ee5b
3 changed files with 34 additions and 0 deletions
+8
View File
@@ -16,6 +16,14 @@
<article class="post on-list" th:each="post : ${posts.items}">
<header>
<h1 class="post-title">
<span class="pin" th:classappend="${theme.config?.page?.pin_pos}" th:if="${post.spec.pinned} and ${theme.config?.page?.show_pin}">
<svg class="icon-regular" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M5 2h14a1 1 0 0 1 1 1v19.143a.5.5 0 0 1-.766.424L12 18.03l-7.234 4.536A.5.5 0 0 1 4 22.143V3a1 1 0 0 1 1-1m13 2H6v15.432l6-3.761l6 3.761z" />
</svg>
<svg class="icon-pixel" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path fill="currentColor" d="M18 2H6v2h12v16h-2v-2h-2v-2h-4v2H8v2H6V2H4v20h4v-2h2v-2h4v2h2v2h4V2z" />
</svg>
</span>
<a data-pjax th:text="${post.spec.title}" th:href="@{${post.status.permalink}}">Post Title</a>
</h1>
<div class="post-meta">