Skip to content

Commit d551ba5

Browse files
committed
feat: 移除重複的文章瀏覽量統計,整合至主題模板以簡化結構
1 parent 5d60869 commit d551ba5

File tree

2 files changed

+1
-39
lines changed

2 files changed

+1
-39
lines changed

layouts/_default/single.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">
2323
</h1>
2424
<div class="mt-1 mb-6 text-base text-neutral-500 dark:text-neutral-400 print:hidden">
2525
{{ partial "article-meta/basic.html" (dict "context" . "scope" "single") }}
26-
{{- /* Zakk: 添加文章閱讀量統計 */ -}}
27-
{{ partial "article-views.html" . }}
26+
{{/* Removed extra article-views partial to avoid duplicate counters; theme meta/views.html already outputs placeholder */}}
2827
</div>
2928
{{ if not (.Params.showAuthorBottom | default (site.Params.article.showAuthorBottom | default false)) }}
3029
{{ template "SingleAuthor" . }}

layouts/partials/footer-stats.html

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,3 @@
1-
<<<<<<< HEAD
2-
{{- /* 網站總統計 - Zakk 自建系統 */ -}}
3-
<div class="zakk-stats" style="margin-top: 1rem; justify-content: center; flex-wrap: wrap;">
4-
<span id="zakk_site_pv_container" style="margin-right: 1rem;">
5-
<svg class="inline-block h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor">
6-
<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V400c0 44.2 35.8 80 80 80H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H80c-8.8 0-16-7.2-16-16V64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z"/>
7-
</svg>
8-
{{ i18n "footer.totalViews" | default "總瀏覽量" }}:
9-
<span id="zakk_site_pv" data-loading="true">-</span>
10-
</span>
11-
<span id="zakk_site_uv_container">
12-
<svg class="inline-block h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" fill="currentColor">
13-
<path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192h42.7c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0H21.3C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7h42.7C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3H405.3zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352H378.7C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7H154.7c-14.7 0-26.7-11.9-26.7-26.7z"/>
14-
</svg>
15-
{{ i18n "footer.totalVisitors" | default "總訪客數" }}:
16-
<span id="zakk_site_uv" data-loading="true">-</span>
17-
{{- /* 網站總統計 */ -}}
18-
{{- if .Site.Params.footer.showStats | default false -}}
19-
<div class="flex flex-wrap items-center justify-center gap-6 text-sm opacity-80 mt-4">
20-
<span class="inline-flex items-center gap-2" data-loading="true">
21-
<svg class="inline-block h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="currentColor" aria-hidden="true">
22-
<path d="M64 64c0-17.7-14.3-32-32-32S0 46.3 0 64V400c0 44.2 35.8 80 80 80H480c17.7 0 32-14.3 32-32s-14.3-32-32-32H80c-8.8 0-16-7.2-16-16V64zm406.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L320 210.7l-57.4-57.4c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L240 221.3l57.4 57.4c12.5 12.5 32.8 12.5 45.3 0l128-128z" />
23-
</svg>
24-
<span>{{ i18n "footer.totalViews" | default "Total views" }}:</span>
25-
<span data-stats-site="pv" data-loading="true"></span>
26-
</span>
27-
<span class="inline-flex items-center gap-2" data-loading="true">
28-
<svg class="inline-block h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" fill="currentColor" aria-hidden="true">
29-
<path d="M144 0a80 80 0 1 1 0 160A80 80 0 1 1 144 0zM512 0a80 80 0 1 1 0 160A80 80 0 1 1 512 0zM0 298.7C0 239.8 47.8 192 106.7 192h42.7c15.9 0 31 3.5 44.6 9.7c-1.3 7.2-1.9 14.7-1.9 22.3c0 38.2 16.8 72.5 43.3 96c-.2 0-.4 0-.7 0H21.3C9.6 320 0 310.4 0 298.7zM405.3 320c-.2 0-.4 0-.7 0c26.6-23.5 43.3-57.8 43.3-96c0-7.6-.7-15-1.9-22.3c13.6-6.3 28.7-9.7 44.6-9.7h42.7C592.2 192 640 239.8 640 298.7c0 11.8-9.6 21.3-21.3 21.3H405.3zM224 224a96 96 0 1 1 192 0 96 96 0 1 1 -192 0zM128 485.3C128 411.7 187.7 352 261.3 352H378.7C452.3 352 512 411.7 512 485.3c0 14.7-11.9 26.7-26.7 26.7H154.7c-14.7 0-26.7-11.9-26.7-26.7z" />
30-
</svg>
31-
<span>{{ i18n "footer.totalVisitors" | default "Visitors" }}:</span>
32-
<span data-stats-site="uv" data-loading="true"></span>
33-
</span>
34-
</div>
35-
{{- end -}}
36-
</div>
37-
{{- /* Footer stats (clean version) */ -}}
381
{{- if .Site.Params.footer.showStats | default false -}}
392
<div class="flex flex-wrap items-center justify-center gap-6 text-sm opacity-80 mt-4">
403
<span class="inline-flex items-center gap-1" data-loading="true">

0 commit comments

Comments
 (0)