fixed 移动端修复pjax加载评论不显示bug

This commit is contained in:
Vaica committed 2026-01-23 12:30:46 +08:00
1 parent 4ba67a7ebc
commit eb8202dfad
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -183,7 +183,7 @@ document.addEventListener("pjax:complete", function () {
site: '优世界', // 你的站点名
// 使用全局变量或 DOM 读取 pageKey
// 必须动态获取当前页面的 pid (RelPermalink)
pageKey: document.getElementById('data-pid')?.innerText || location.pathname,
pageKey: document.getElementById('data-pid')?.textContent?.trim() || location.pathname,
flatMode: true,
emoticons: '/emotion/OwO.json'
})
+1 -1
View File
@@ -1,7 +1,7 @@
{{ define "main" }}
<div id="pjax-container">
<!-- 用于 Pjax 获取当前文章 ID -->
<div id="data-pid" style="display:none;">/{{ .Params.pid | default .Title }}.html</div>
<div id="data-pid" style="display:none;">{{ .RelPermalink }}</div>
<article style="margin-bottom: 3.5em;">
<h1 class="post-title" itemprop="name headline" uk-scrollspy="cls: uk-animation-slide-top-small; delay: 200">{{ .Title }}</h1>
<div class="meta" uk-scrollspy="cls: uk-animation-fade; delay: 300">