这篇文章上次修改于 731 天前,可能其部分内容已经发生变化,如有疑问可询问作者。
前因
在使用任务清单这一博主使用率非常高,但typecho原本编辑器不支持只好使用插件来配合使用,但在pual的主题中,由于一段代码的存在,使 这条命令成了奢望.
折腾.
显示看了一下网站源代码,在post.php 139行有一段
<script>
/* (() => {// 为小标题加上锚点
const postContent = ks.select('.post-content');
const titleArr = [];
for (let i = 1; i < 5; i++) {
[...postContent.querySelectorAll(`h${i}`)].forEach((item, index) => {
const name = item.innerText.slice(-2) === '编辑' ? item.innerText.slice(0, item.innerText.length - 2) : item.innerText;
titleArr.push({tier: i, name, top: window.getElementTop(item)})
})
}
const torTreeWrap = ks.select('#torTree-wrap');
if (titleArr.length === 1) {
return
}
let torTreeHTML = ` <div class="torTree-title"><a href="javascript:window.scrollSmoothTo(${titleArr[0].top})">${titleArr.shift().name}</a></div><ul>`;
for (let item of titleArr) {
torTreeHTML = torTreeHTML + `<a href="javascript:window.scrollSmoothTo(${item.top})"><li class="tier-${item.tier}">${item.name}</li></a>`
}
torTreeHTML += `</ul>`;
torTreeWrap.innerHTML = torTreeHTML;
torTreeWrap.removeAttribute('style')
})()*/
</script>
本来以为就是问题所在,没想到删了之后根本没有变化,于是经过很久的找寻和向innei以及paul大佬本人询问,在
/paul/src/main.css
中第547行找到了代码耗时两小时;
直接删除大法没用,直接导致markdown的 - 目录命令消失;而我需要的任务清单 - [] 命令却被仅保留一个中括号,好像在嘲笑着我
article:not(.comment-list) li::before, .torTree li::before {
content: '\f061';
font-family: FontAwesome;
margin-right: .4rem;
font-size: 10px;
color: currentColor;
}
我非常确定这就是我要找的的代码了,但是content这个参数代码正好是- 的替换箭头的图标,但由于不清楚如何修改使恢复原样,又卡住了.
innei大佬告诉我可以删去before,但对css丝毫不懂的我,却没有任何解决办法,暂且搁置吧.
没有评论