fixed 关于页面bug
This commit is contained in:
1 parent
f1494d10dd
commit
371ec8adca
154 files changed
+767
-738
No files matched your search
@@ -22,7 +22,7 @@
|
||||
--text-highlight-color: #696565;
|
||||
--frame-dark-color: #1f2933;
|
||||
--frame-color: #eee;
|
||||
--artalk-editer-color: #bac6d3;
|
||||
--artalk-editer-color: #333333;
|
||||
--erji-color: #666;
|
||||
--sanji-color: #999;
|
||||
--bankuai-color: #f6f6f6;
|
||||
@@ -2849,3 +2849,24 @@ img[atk-emoticon] {
|
||||
/* GenericTraceback */ [data-theme="dark"] .chroma .gt { }
|
||||
/* GenericUnderline */ [data-theme="dark"] .chroma .gl { text-decoration:underline }
|
||||
/* TextWhitespace */ [data-theme="dark"] .chroma .w { }
|
||||
|
||||
/* Fix Artalk comment textarea color in light mode */
|
||||
.atk-textarea {
|
||||
color: #1a1a1a !important;
|
||||
}
|
||||
[data-theme="dark"] .atk-textarea {
|
||||
color: #e5e7eb !important;
|
||||
}
|
||||
|
||||
/* About Page Card Style */
|
||||
.about-card {
|
||||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
box-shadow: none !important;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
[data-theme="dark"] .about-card {
|
||||
background-color: transparent;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
@@ -175,28 +175,14 @@ document.addEventListener("pjax:complete", function () {
|
||||
pjax_reload()
|
||||
// 初始化代码复制
|
||||
initCodeCopy()
|
||||
// 激活返回顶部插件
|
||||
$(function () {
|
||||
$.scrollUp({
|
||||
animation: 'fade',
|
||||
scrollImg: true
|
||||
});
|
||||
});
|
||||
// 重载评论
|
||||
if (document.querySelector("#Comments")) {
|
||||
Artalk.init({
|
||||
el: '#Comments', // 绑定元素的 Selector
|
||||
server: 'https://artalk.usj.cc', // 后端地址
|
||||
site: '优世界', // 你的站点名
|
||||
// 使用全局变量或 DOM 读取 pageKey,这里需要注意 Pjax 切换时如何获取新页面的 pid
|
||||
// 由于 Pjax 只是替换 HTML,我们需要从新页面的 DOM 中提取 pid
|
||||
// 建议在 single.html 中埋一个隐藏元素存储 pid,或者直接依赖 window.location (但用户想要 /post/id)
|
||||
// 修正:Pjax 切换后,HTML 已经更新,如果我们在 artalk.html 中输出了正确的配置脚本,
|
||||
// 那么这段 JS 代码其实是在旧页面加载的 static js 中。
|
||||
// Artalk.init 在 mypjax.js 中被调用时,参数是写死的或者从当前环境获取。
|
||||
// 必须动态获取当前页面的 pid。
|
||||
// 方案:在 layouts/_default/single.html 中添加一个 hidden input 存储 pid
|
||||
// 然后在这里读取。
|
||||
// 使用全局变量或 DOM 读取 pageKey
|
||||
// 必须动态获取当前页面的 pid (RelPermalink)
|
||||
pageKey: document.getElementById('data-pid')?.innerText || location.pathname,
|
||||
flatMode: true,
|
||||
emoticons: '/emotion/OwO.json'
|
||||
|
||||
Reference in new issue
Block a user