2026-05-25 00:03:50 +08:00
|
|
|
|
{{ $artalkCss := resources.Get "css/libs/Artalk.css" | resources.Minify | resources.Fingerprint }}
|
|
|
|
|
|
<link id="artalk-css" rel="stylesheet" href="{{ $artalkCss.RelPermalink }}">
|
2025-03-31 10:46:45 +08:00
|
|
|
|
<style>
|
|
|
|
|
|
.atk-loading{
|
|
|
|
|
|
background: #FFFFFF;
|
|
|
|
|
|
}
|
2026-01-31 21:27:06 +08:00
|
|
|
|
.atk-loading-editor-box {
|
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
|
border: 1px solid var(--frame-color);
|
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
|
padding: 10px;
|
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
[data-theme="dark"] .atk-loading-editor-box {
|
|
|
|
|
|
border-color: var(--frame-dark-color);
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
}
|
2026-10-03 16:12:23 +08:00
|
|
|
|
/* ================= 评论徽章规格 =================
|
|
|
|
|
|
几何完全沿用原设计:inline-block + margin-left:4px + padding 0 6px
|
|
|
|
|
|
+ 12px/500 字重 + line-height:18px + 1px 描边 + 3px 圆角。
|
|
|
|
|
|
注意:不要覆盖 Artalk 自带的 margin-right:6px,否则徽章会挤在一起。 */
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-badge,
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-pinned-badge,
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-title-badge,
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-link-badge,
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-feed-badge,
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-rank-badge {
|
2026-05-25 12:23:00 +08:00
|
|
|
|
display: inline-block;
|
|
|
|
|
|
margin-left: 4px;
|
|
|
|
|
|
padding: 0 6px;
|
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
|
border-radius: 3px;
|
|
|
|
|
|
line-height: 18px;
|
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
|
}
|
|
|
|
|
|
.atk-link-badge {
|
|
|
|
|
|
color: #059669;
|
|
|
|
|
|
background: rgba(5,150,105,0.08);
|
|
|
|
|
|
border: 1px solid rgba(5,150,105,0.15);
|
|
|
|
|
|
}
|
|
|
|
|
|
.atk-feed-badge {
|
|
|
|
|
|
color: #d97706;
|
|
|
|
|
|
background: rgba(217,119,6,0.08);
|
|
|
|
|
|
border: 1px solid rgba(217,119,6,0.15);
|
|
|
|
|
|
}
|
|
|
|
|
|
.atk-rank-badge {
|
2026-05-25 13:55:45 +08:00
|
|
|
|
color: #6b7280;
|
|
|
|
|
|
background: rgba(107,114,128,0.08);
|
|
|
|
|
|
border: 1px solid rgba(107,114,128,0.15);
|
2026-05-25 12:23:00 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
2026-10-03 15:16:00 +08:00
|
|
|
|
.atk-title-badge {
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #b8860b;
|
|
|
|
|
|
background: rgba(184,134,11,0.08);
|
|
|
|
|
|
border: 1px solid rgba(184,134,11,0.22);
|
|
|
|
|
|
}
|
2026-10-03 16:12:23 +08:00
|
|
|
|
/* 博主(.atk-badge):浅底描边(与友链/友圈/官职同风格)
|
|
|
|
|
|
(!important 是为了盖掉 Artalk 写在元素上的内联背景色) */
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-badge {
|
|
|
|
|
|
border: 1px solid rgba(55,65,81,0.18);
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #374151 !important;
|
|
|
|
|
|
background: rgba(55,65,81,0.06) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
[data-theme="dark"] .atk-comment>.atk-main>.atk-header .atk-badge {
|
|
|
|
|
|
border-color: rgba(229,231,235,0.2);
|
|
|
|
|
|
color: #e5e7eb !important;
|
|
|
|
|
|
background: rgba(229,231,235,0.08) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
/* 置顶徽章:浅底红字描边(与友链/友圈同风格,比实底红更协调、不刺眼) */
|
|
|
|
|
|
.atk-comment>.atk-main>.atk-header .atk-pinned-badge {
|
|
|
|
|
|
border: 1px solid rgba(217,83,79,0.18);
|
|
|
|
|
|
color: #d9534f !important;
|
|
|
|
|
|
background: rgba(217,83,79,0.08) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
[data-theme="dark"] .atk-comment>.atk-main>.atk-header .atk-pinned-badge {
|
|
|
|
|
|
border-color: rgba(217,83,79,0.28);
|
|
|
|
|
|
color: #f0918d !important;
|
|
|
|
|
|
background: rgba(217,83,79,0.14) !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
/* ---- 暗色模式配色 ---- */
|
2026-05-25 12:23:00 +08:00
|
|
|
|
[data-theme="dark"] .atk-link-badge {
|
|
|
|
|
|
color: #34d399;
|
|
|
|
|
|
background: rgba(52,211,153,0.12);
|
|
|
|
|
|
border-color: rgba(52,211,153,0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
[data-theme="dark"] .atk-feed-badge {
|
|
|
|
|
|
color: #fbbf24;
|
|
|
|
|
|
background: rgba(251,191,36,0.12);
|
|
|
|
|
|
border-color: rgba(251,191,36,0.2);
|
|
|
|
|
|
}
|
|
|
|
|
|
[data-theme="dark"] .atk-rank-badge {
|
2026-05-25 13:55:45 +08:00
|
|
|
|
color: rgb(148,163,184);
|
|
|
|
|
|
background: rgba(148,163,184,0.1);
|
|
|
|
|
|
border-color: rgba(148,163,184,0.18);
|
2026-05-25 12:23:00 +08:00
|
|
|
|
}
|
2026-10-03 15:16:00 +08:00
|
|
|
|
[data-theme="dark"] .atk-title-badge {
|
|
|
|
|
|
color: #fbbf24;
|
|
|
|
|
|
background: rgba(251,191,36,0.12);
|
|
|
|
|
|
border-color: rgba(251,191,36,0.2);
|
|
|
|
|
|
}
|
2026-06-30 12:47:27 +08:00
|
|
|
|
.atk-main {
|
|
|
|
|
|
backface-visibility: hidden;
|
|
|
|
|
|
will-change: transform;
|
|
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
|
}
|
2025-03-31 10:46:45 +08:00
|
|
|
|
</style>
|
2024-08-08 11:32:10 +08:00
|
|
|
|
<!-- Artalk -->
|
2026-01-31 18:18:19 +08:00
|
|
|
|
<div id="Comments" uk-scrollspy="target: > *; cls: uk-animation-slide-bottom-small; delay: 100">
|
|
|
|
|
|
<!-- Loading Skeleton -->
|
|
|
|
|
|
<div class="atk-loading-placeholder">
|
2026-01-31 21:27:06 +08:00
|
|
|
|
<!-- Editor Skeleton -->
|
|
|
|
|
|
<div class="atk-loading-editor-box">
|
|
|
|
|
|
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 32%; height: 34px; border-radius: 4px; margin-bottom: 0;"></div>
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 32%; height: 34px; border-radius: 4px; margin-bottom: 0;"></div>
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 32%; height: 34px; border-radius: 4px; margin-bottom: 0;"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 100%; height: 120px; border-radius: 4px; margin-bottom: 10px;"></div>
|
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center;">
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 120px; height: 20px; margin-bottom: 0;"></div>
|
|
|
|
|
|
<div class="atk-loading-line" style="width: 80px; height: 34px; border-radius: 4px; margin-bottom: 0;"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Comment List Skeleton -->
|
2026-01-31 18:18:19 +08:00
|
|
|
|
<div class="atk-loading-item">
|
|
|
|
|
|
<div class="atk-loading-avatar"></div>
|
|
|
|
|
|
<div class="atk-loading-content">
|
|
|
|
|
|
<div class="atk-loading-line width-name"></div>
|
|
|
|
|
|
<div class="atk-loading-line width-80"></div>
|
|
|
|
|
|
<div class="atk-loading-line width-60"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="atk-loading-item">
|
|
|
|
|
|
<div class="atk-loading-avatar"></div>
|
|
|
|
|
|
<div class="atk-loading-content">
|
|
|
|
|
|
<div class="atk-loading-line width-name"></div>
|
|
|
|
|
|
<div class="atk-loading-line width-60"></div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2024-08-08 11:32:10 +08:00
|
|
|
|
<!-- JS -->
|
2026-01-23 16:20:37 +08:00
|
|
|
|
<!-- <script src="/js/Artalk.js"></script> -->
|
2024-08-08 11:32:10 +08:00
|
|
|
|
<script>
|
2026-01-30 21:11:05 +08:00
|
|
|
|
// Configuration for Artalk and AI Comment
|
|
|
|
|
|
window.artalkConfig = {
|
|
|
|
|
|
el: '#Comments',
|
|
|
|
|
|
server: '{{ .Site.Params.artalk.server }}',
|
|
|
|
|
|
site: '{{ .Site.Params.artalk.site }}',
|
|
|
|
|
|
pageKey: '{{ .RelPermalink }}',
|
2026-01-31 23:01:35 +08:00
|
|
|
|
emoticons: '{{ .Site.Params.artalk.emoticons | absURL }}',
|
2026-06-02 10:56:59 +08:00
|
|
|
|
aiComment: null
|
2026-01-30 21:11:05 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Execute Initialization immediately if function exists (PJAX re-execution),
|
|
|
|
|
|
// otherwise wait for DOMContentLoaded (Initial load)
|
|
|
|
|
|
(function() {
|
|
|
|
|
|
if (typeof window.initArtalk === 'function') {
|
|
|
|
|
|
window.initArtalk();
|
|
|
|
|
|
} else {
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
|
|
|
|
if (typeof window.initArtalk === 'function') {
|
|
|
|
|
|
window.initArtalk();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2026-01-23 16:20:37 +08:00
|
|
|
|
}
|
2026-01-30 21:11:05 +08:00
|
|
|
|
})();
|
2026-01-23 16:20:37 +08:00
|
|
|
|
</script>
|