summaryrefslogtreecommitdiff
path: root/layouts/_partials/posts/comment.html
diff options
context:
space:
mode:
authorBigCoke233 <hi@guhub.cn>2026-01-31 00:57:07 +0800
committerBigCoke233 <hi@guhub.cn>2026-01-31 00:57:07 +0800
commita73e0b8439763fca242322d228ead3c800504ced (patch)
treeb92a60b8325531da04e8c9ab012d77c8bba12b67 /layouts/_partials/posts/comment.html
parent3f4e02e8f9023a76c2396949e94766a7d8526f19 (diff)
feat: new comment area
Diffstat (limited to 'layouts/_partials/posts/comment.html')
-rw-r--r--layouts/_partials/posts/comment.html43
1 files changed, 19 insertions, 24 deletions
diff --git a/layouts/_partials/posts/comment.html b/layouts/_partials/posts/comment.html
index e4ec9b3e..bcd0b17b 100644
--- a/layouts/_partials/posts/comment.html
+++ b/layouts/_partials/posts/comment.html
@@ -1,8 +1,3 @@
-<!-- email info -->
-<p class="text-size-sm text-secondary">
- *{{ T "emailMe" }} <a href="mailto:{{ .Site.Params.email }}">{{ .Site.Params.email }}</a>
-</p>
-
<!--
Giscus has been abandoned since 2026-01-30,
old data from GitHub Discussion and some other comment systems
@@ -11,32 +6,32 @@
-->
{{ $cutoffDate := time.AsTime "2026-01-30" }}
{{ if .Params.Date.Before $cutoffDate }}
-
- <p class="text-size-sm text-secondary">博客的评论区已经被禁用,旧的数据已经导出,如果存在,就会显示在下方。如果你想要讨论此文,可以邮件联系,或者在<a href="{{ with .Params.toot }}{{ . }}{{ else }}https://akk.eltr.ac/eltrac{{ end }}">联邦宇宙上互动</a>。</p>
-
- <hr />
-
{{ $giscusData := .Site.Data.giscus }}
{{ $pageTitle := .Title }}
{{ range $giscusData }}
{{ if eq .title $pageTitle }}
+ {{ $url := .url }}
{{ with .comments.nodes }}
- <div class="my-8">
- {{ range . }}
- <div class="text-md py-4 px-1">
- <div class="mb-4 flex justify-between">
- <span class="font-bold">{{ .author.login }}</span>
- <span class="text-secondary">{{ .createdAt | time.Format "2006/01/02" }}</span>
+ <details>
+ <summary class="text-size-sm text-secondary cursor-pointer">博客的评论区已经被禁用,旧的数据已经导出,可以点击这行字查看。</summary>
+ <div class="my-4">
+ {{ range . }}
+ <div class="text-md py-4 px-1">
+ <div class="mb-4 flex justify-between">
+ <span class="font-bold">{{ .author.login }}</span>
+ <span class="text-secondary">{{ .createdAt | time.Format "2006/01/02" }}</span>
+ </div>
+ <div>
+ {{ .body | markdownify }}
+ </div>
</div>
- <div>
- {{ .body | markdownify }}
- </div>
- </div>
+ {{ end }}
+ </div>
+ {{ with $url }}
+ <p><a href="{{ . }}" class="small-button" target="_blank">Full GitHub Discussion →</a></p>
{{ end }}
- </div>
- {{ end }}
- {{ with .url }}
- <p><a href="{{ . }}" class="small-button" target="_blank">Full GitHub Discussion →</a></p>
+ <hr />
+ </details>
{{ end }}
{{ end }}
{{ end }}