2024-08-08 11:32:10 +08:00
|
|
|
<!-- CSS -->
|
2026-01-23 16:20:37 +08:00
|
|
|
<!-- <link href="/css/Artalk.css" rel="stylesheet" /> -->
|
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;
|
|
|
|
|
}
|
2025-04-06 14:53:50 +08:00
|
|
|
/*对artalk评论暗夜模式进行微调*/
|
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
|
|
|
.atk-pinned-badge {
|
|
|
|
|
color: #ffffff !important;
|
|
|
|
|
background: #ff6262 !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
2026-01-18 23:09:07 +08:00
|
|
|
[data-theme="dark"] .atk-pinned-badge {
|
|
|
|
|
color: #ffffff !important;
|
|
|
|
|
background: #ff6262 !important;
|
|
|
|
|
}
|
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 }}',
|
2026-01-31 21:27:06 +08:00
|
|
|
aiBadge: '{{ .Site.Params.artalk.ai_badge | default "AI" }}',
|
2026-01-30 21:11:05 +08:00
|
|
|
pageKey: '{{ .RelPermalink }}',
|
|
|
|
|
emoticons: '{{ .Site.Params.artalk.emoticons | relURL }}',
|
|
|
|
|
aiComment: {{ if .Params.ai_comment }}
|
|
|
|
|
{{ $avatar := .Site.Params.ai.avatar }}
|
|
|
|
|
{{ if not $avatar }}{{ $avatar = .Site.Params.author.avatar }}{{ end }}
|
|
|
|
|
{{ if not $avatar }}{{ $avatar = "https://cravatar.cn/avatar/unknown?d=mp" }}{{ end }}
|
|
|
|
|
{{ dict "content" .Params.ai_comment "avatar" $avatar "name" (.Site.Params.ai.name | default "AI Assistant") "date" (.Date.Format "2006-01-02") | jsonify | safeJS }}
|
|
|
|
|
{{ else }}null{{ end }}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 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>
|