summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2025-06-21 22:51:37 +0800
committerEltrac <hi@guhub.cn>2025-06-21 22:51:37 +0800
commit72d366d0ad254732aeac6b3422fc67ae20d33798 (patch)
tree16f824fc36fa48418ca33a61bcdf3eae20ea72e3 /layouts
parent4441e618005202682d7f5a61dcc2992fc73dc782 (diff)
parent348ab010ba764ef8045a4e73e3385cbcc6b29b7c (diff)
Merge branch 'master' of https://github.com/BigCoke233/geek-death-project
Former-commit-id: 6e2f2913745a753859c10d732e05ac905540d696
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/_markup/render-image.html2
-rw-r--r--layouts/library/single.html1
-rw-r--r--layouts/partials/components/like-button.html4
3 files changed, 4 insertions, 3 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index c1f2aa89..21e574af 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -1,7 +1,7 @@
{{- $src := .Destination -}}
{{- $alt := .Text | default "" -}}
{{- $caption := .Title | default "" -}}
-<a href="{{ $src }}" data-fancybox data-caption="{{ $caption }}">
+<a href="{{ $src }}" data-fancybox data-caption="{{ $caption }}" class="fancybox-link">
<figure>
<img
class="lazy" loading="lazy"
diff --git a/layouts/library/single.html b/layouts/library/single.html
index 1f051da7..c6797b0c 100644
--- a/layouts/library/single.html
+++ b/layouts/library/single.html
@@ -35,6 +35,7 @@
<p>于 {{ partial "components/date" . }} 读完</p>
</div>
</div>
+ {{ partial "components/like-button.html" . }}
{{ partial "components/comment.html" . }}
</article>
{{ end }}
diff --git a/layouts/partials/components/like-button.html b/layouts/partials/components/like-button.html
index b377bf78..b94b6a26 100644
--- a/layouts/partials/components/like-button.html
+++ b/layouts/partials/components/like-button.html
@@ -1,10 +1,10 @@
<div class="floating-like-container" id="like-container-{{ .File.UniqueID | urlize }}">
- <div class="floating-like-button"
+ <div class="floating-like-button"
onclick="sendLike('{{ .File.UniqueID | urlize }}')"
id="like-btn-{{ .File.UniqueID | urlize }}"
title="为这篇文章献上心脏"
data-liked-title="你已经献上心脏了">
- <img id="like-button-icon" src="/img/heart-organ.svg" alt="点赞" />
+ <img id="like-button-icon" src="/img/heart-organ.svg" class="invert-if-dark" alt="点赞" />
<div class="like-count-display" id="like-count-{{ .File.UniqueID | urlize }}">...</div>
</div>
</div>