fixed 移动端修复pjax加载评论不显示bug
This commit is contained in:
1 parent
b2b5720880
commit
9620cbd257
2 files changed
+2
-2
No files matched your search
@@ -183,7 +183,7 @@ document.addEventListener("pjax:complete", function () {
|
|||||||
site: '优世界', // 你的站点名
|
site: '优世界', // 你的站点名
|
||||||
// 使用全局变量或 DOM 读取 pageKey
|
// 使用全局变量或 DOM 读取 pageKey
|
||||||
// 必须动态获取当前页面的 pid (RelPermalink)
|
// 必须动态获取当前页面的 pid (RelPermalink)
|
||||||
pageKey: document.getElementById('data-pid')?.innerText || location.pathname,
|
pageKey: document.getElementById('data-pid')?.textContent?.trim() || location.pathname,
|
||||||
flatMode: true,
|
flatMode: true,
|
||||||
emoticons: '/emotion/OwO.json'
|
emoticons: '/emotion/OwO.json'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<div id="pjax-container">
|
<div id="pjax-container">
|
||||||
<!-- 用于 Pjax 获取当前文章 ID -->
|
<!-- 用于 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;">
|
<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>
|
<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">
|
<div class="meta" uk-scrollspy="cls: uk-animation-fade; delay: 300">
|
||||||
|
|||||||
Reference in new issue
Block a user