Site updated: 2026-12-01 17:59:21

This commit is contained in:
qinglong committed 2026-12-01 17:59:24 +08:00
1 parent 2d144905ec
commit 6ca0406916
251 files changed
+7245 -3965

No files matched your search

+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年01月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?376090"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?416507"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?333670"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?33861"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?371250"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?993177"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 01 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-31T09:44:00+08:00" content="2023-01-31">01-31 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/KLineChart/">KLineChart</a></span></div><div class="title"><a href="/2023/01/31/KLineChart%E7%94%BB%E6%B3%A2%E6%AE%B5%E9%AB%98%E4%BD%8E%E4%BB%B7%E5%9B%BE/" itemprop="url"><span itemprop="name">KLineChart画波段高低价图</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-10T10:19:00+08:00" content="2023-01-10">01-10 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/Vue/">Vue</a></span></div><div class="title"><a href="/2023/01/10/Vue%E6%A0%B9%E6%8D%AE%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82%E4%BF%AE%E6%94%B9%E9%A1%B5%E9%9D%A2%E6%95%B0%E6%8D%AE/" itemprop="url"><span itemprop="name">Vue根据路由传参修改页面数据</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-10T09:51:00+08:00" content="2023-01-10">01-10 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/Highcharts/">Highcharts</a></span></div><div class="title"><a href="/2023/01/10/Highcharts%E7%94%BB%E6%94%B6%E7%9B%8A%E6%A6%82%E8%A7%88/" itemprop="url"><span itemprop="name">Highcharts画收益概览</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="sociaLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年01月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?158434"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?227537"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?509761"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?733281"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?960564"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?344692"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 01 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-31T09:44:00+08:00" content="2023-01-31">01-31 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/KLineChart/">KLineChart</a></span></div><div class="title"><a href="/2023/01/31/KLineChart%E7%94%BB%E6%B3%A2%E6%AE%B5%E9%AB%98%E4%BD%8E%E4%BB%B7%E5%9B%BE/" itemprop="url"><span itemprop="name">KLineChart画波段高低价图</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-10T10:19:00+08:00" content="2023-01-10">01-10 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/Vue/">Vue</a></span></div><div class="title"><a href="/2023/01/10/Vue%E6%A0%B9%E6%8D%AE%E8%B7%AF%E7%94%B1%E4%BC%A0%E5%8F%82%E4%BF%AE%E6%94%B9%E9%A1%B5%E9%9D%A2%E6%95%B0%E6%8D%AE/" itemprop="url"><span itemprop="name">Vue根据路由传参修改页面数据</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-01-10T09:51:00+08:00" content="2023-01-10">01-10 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/Highcharts/">Highcharts</a></span></div><div class="title"><a href="/2023/01/10/Highcharts%E7%94%BB%E6%94%B6%E7%9B%8A%E6%A6%82%E8%A7%88/" itemprop="url"><span itemprop="name">Highcharts画收益概览</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="sociLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年02月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?619693"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?290625"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?944330"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?679757"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?764248"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?682727"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 02 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-02-18T17:42:00+08:00" content="2023-02-18">02-18 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/IDE/">IDE</a></span></div><div class="title"><a href="/2023/02/18/%E4%BF%AE%E6%94%B9IntellIJ-IDE%E8%83%8C%E6%99%AF%E8%89%B2%E5%92%8C%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F/" itemprop="url"><span itemprop="name">修改IntellIJ IDE背景色和字体大小</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" title="https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;user&#x2F;home?id&#x3D;105467463"><i class="ic i-cloud-music"></i></span> <a href="/about/me" title="about&#x2F;me" class="item about"><i class="ic i-address-card"></i></a></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>文章</a><ul class="submenu"><li class="item"><a href="/archiLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年02月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?619230"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?829808"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?858148"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?698228"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?986640"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?888398"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 02 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-02-18T17:42:00+08:00" content="2023-02-18">02-18 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/IDE/">IDE</a></span></div><div class="title"><a href="/2023/02/18/%E4%BF%AE%E6%94%B9IntellIJ-IDE%E8%83%8C%E6%99%AF%E8%89%B2%E5%92%8C%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F/" itemprop="url"><span itemprop="name">修改IntellIJ IDE背景色和字体大小</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" title="https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;user&#x2F;home?id&#x3D;105467463"><i class="ic i-cloud-music"></i></span> <a href="/about/me" title="about&#x2F;me" class="item about"><i class="ic i-address-card"></i></a></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>文章</a><ul class="submenu"><li class="item"><a href="/archiLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年04月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?971095"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?132965"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?514452"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?606348"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?854653"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?111085"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 04 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T13:32:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E5%91%BD%E4%BB%A4%E5%A4%A7%E6%9D%82%E7%83%A9/" itemprop="url"><span itemprop="name">命令大杂烩</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T12:39:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/">项目部署</a></span></div><div class="title"><a href="/2023/04/16/K8S%E9%A1%B9%E7%9B%AE%E6%9C%AC%E5%9C%B0%E9%83%A8%E7%BD%B2%E6%AD%A5%E9%AA%A4/" itemprop="url"><span itemprop="name">K8S项目本地部署步骤</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T11:03:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E7%83%BD%E7%81%AB10G-ONU%E5%A4%A9%E7%BF%BC%E7%BD%91%E5%85%B34-0%E7%A0%B4%E8%A7%A3%EF%BC%88HG5143F/" itemprop="url"><span itemprop="name">烽火10G-ONU天翼网关4.0破解(HG5143F)</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</sLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年04月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?107316"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?647011"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?418881"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?664432"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?968694"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?442785"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 04 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T13:32:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E5%91%BD%E4%BB%A4%E5%A4%A7%E6%9D%82%E7%83%A9/" itemprop="url"><span itemprop="name">命令大杂烩</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T12:39:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/">项目部署</a></span></div><div class="title"><a href="/2023/04/16/K8S%E9%A1%B9%E7%9B%AE%E6%9C%AC%E5%9C%B0%E9%83%A8%E7%BD%B2%E6%AD%A5%E9%AA%A4/" itemprop="url"><span itemprop="name">K8S项目本地部署步骤</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T11:03:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E7%83%BD%E7%81%AB10G-ONU%E5%A4%A9%E7%BF%BC%E7%BD%91%E5%85%B34-0%E7%A0%B4%E8%A7%A3%EF%BC%88HG5143F/" itemprop="url"><span itemprop="name">烽火10G-ONU天翼网关4.0破解(HG5143F)</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</sLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年05月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?545443"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?319516"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?366121"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?106883"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?374271"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?840786"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 05 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-30T17:20:00+08:00" content="2023-05-30">05-30 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/30/http%E8%AF%B7%E6%B1%82%E4%B9%8BrestTemplate%E9%85%8D%E7%BD%AE%E8%B6%85%E6%97%B6%E6%97%B6%E9%97%B4/" itemprop="url"><span itemprop="name">http请求之restTemplate配置超时时间</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:25:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/%E8%A7%A3%E5%86%B3MySQL%E6%8A%A5only-full-group-by%E9%94%99%E8%AF%AF/" itemprop="url"><span itemprop="name">解决MySQL报only_full_group_by错误</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:07:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/MySQL%E4%B8%AD%E7%9A%84any-value-%E5%87%BD%E6%95%B0/" itemprop="url"><span itemprop="name">MySQL中的any_value()函数</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span Line truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年05月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?935083"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?611275"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?596799"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?518280"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?797879"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?409309"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 05 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-30T17:20:00+08:00" content="2023-05-30">05-30 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/30/http%E8%AF%B7%E6%B1%82%E4%B9%8BrestTemplate%E9%85%8D%E7%BD%AE%E8%B6%85%E6%97%B6%E6%97%B6%E9%97%B4/" itemprop="url"><span itemprop="name">http请求之restTemplate配置超时时间</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:25:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/%E8%A7%A3%E5%86%B3MySQL%E6%8A%A5only-full-group-by%E9%94%99%E8%AF%AF/" itemprop="url"><span itemprop="name">解决MySQL报only_full_group_by错误</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:07:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/MySQL%E4%B8%AD%E7%9A%84any-value-%E5%87%BD%E6%95%B0/" itemprop="url"><span itemprop="name">MySQL中的any_value()函数</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span Line truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年07月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?256854"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?382310"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?87731"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?877628"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?65601"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?934653"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 07 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-07-08T10:51:00+08:00" content="2023-07-08">07-08 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/07/08/%E8%A7%A3%E5%86%B3Lombok%E6%8A%A5%E9%94%99/" itemprop="url"><span itemprop="name">解决Lombok报错</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-07-01T01:15:00+08:00" content="2023-07-01">07-01 </time><span><a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/Hexo/">Hexo</a></span></div><div class="title"><a href="/2023/07/01/shoka%E4%B8%BB%E9%A2%98%E9%80%9F%E5%BA%A6%E4%BC%98%E5%8C%96-%E6%8B%86%E5%88%86jsdelivr/" itemprop="url"><span itemprop="name">shoka主题速度优化-拆分jsdelivr</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" titlLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年07月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?884765"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?801395"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?240191"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?308942"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?418260"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?599439"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 07 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-07-08T10:51:00+08:00" content="2023-07-08">07-08 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/07/08/%E8%A7%A3%E5%86%B3Lombok%E6%8A%A5%E9%94%99/" itemprop="url"><span itemprop="name">解决Lombok报错</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-07-01T01:15:00+08:00" content="2023-07-01">07-01 </time><span><a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/Hexo/">Hexo</a></span></div><div class="title"><a href="/2023/07/01/shoka%E4%B8%BB%E9%A2%98%E9%80%9F%E5%BA%A6%E4%BC%98%E5%8C%96-%E6%8B%86%E5%88%86jsdelivr/" itemprop="url"><span itemprop="name">shoka主题速度优化-拆分jsdelivr</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" tiLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年09月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?775773"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?108263"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?67256"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?901852"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?150232"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?918830"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 09 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-09-09T16:48:00+08:00" content="2023-09-09">09-09 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/09/09/squid-stunnel-%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/" itemprop="url"><span itemprop="name">squid+stunnel 科学上网</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-09-09T16:38:00+08:00" content="2023-09-09">09-09 </time><span><a href="/categories/Windows/%E7%B3%BB%E7%BB%9F%E4%BC%98%E5%8C%96/">系统优化</a></span></div><div class="title"><a href="/2023/09/09/Windows-11%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95%E6%81%A2%E5%A4%8D%E8%80%81%E7%89%88%E6%9C%AC/" itemprop="url"><span itemprop="name">Windows 11右键菜单恢复老版本</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年09月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?611207"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?638101"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?695584"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?102013"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?900924"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?999053"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 09 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-09-09T16:48:00+08:00" content="2023-09-09">09-09 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/09/09/squid-stunnel-%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/" itemprop="url"><span itemprop="name">squid+stunnel 科学上网</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-09-09T16:38:00+08:00" content="2023-09-09">09-09 </time><span><a href="/categories/Windows/%E7%B3%BB%E7%BB%9F%E4%BC%98%E5%8C%96/">系统优化</a></span></div><div class="title"><a href="/2023/09/09/Windows-11%E5%8F%B3%E9%94%AE%E8%8F%9C%E5%8D%95%E6%81%A2%E5%A4%8D%E8%80%81%E7%89%88%E6%9C%AC/" itemprop="url"><span itemprop="name">Windows 11右键菜单恢复老版本</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年10月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?17459"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?516559"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?18775"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?407547"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?162978"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?19186"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 10 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-29T20:41:00+08:00" content="2023-10-29">10-29 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%97%A5%E5%B8%B8%E8%AE%B0%E5%BD%95/">日常记录</a></span></div><div class="title"><a href="/2023/10/29/%E7%BB%99%E6%88%91%E7%9A%84%E8%80%81%E7%AC%94%E8%AE%B0%E6%9C%AC%E6%B8%85%E7%90%86%E7%81%B0%E5%B0%98/" itemprop="url"><span itemprop="name">给我的老笔记本清理灰尘</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:56:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/10/28/Windows%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%89%B9%E5%A4%84%E7%90%86/" itemprop="url"><span itemprop="name">Windows下快速部署SpringBoot项目的批处理</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:26:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Linux/Centos/">Centos</a></span></div><div class="title"><a href="/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/" itemprop="url"><span itemprop="name">Centos挂载新硬盘</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="nameLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年10月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?203213"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?605644"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?475150"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?331718"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?339843"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?735388"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 10 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-29T20:41:00+08:00" content="2023-10-29">10-29 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%97%A5%E5%B8%B8%E8%AE%B0%E5%BD%95/">日常记录</a></span></div><div class="title"><a href="/2023/10/29/%E7%BB%99%E6%88%91%E7%9A%84%E8%80%81%E7%AC%94%E8%AE%B0%E6%9C%AC%E6%B8%85%E7%90%86%E7%81%B0%E5%B0%98/" itemprop="url"><span itemprop="name">给我的老笔记本清理灰尘</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:56:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/10/28/Windows%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%89%B9%E5%A4%84%E7%90%86/" itemprop="url"><span itemprop="name">Windows下快速部署SpringBoot项目的批处理</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:26:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Linux/Centos/">Centos</a></span></div><div class="title"><a href="/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/" itemprop="url"><span itemprop="name">Centos挂载新硬盘</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="nLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年11月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?912894"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?548657"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?285192"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?199248"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?174825"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?808924"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 11 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-11-03T21:35:00+08:00" content="2023-11-03">11-03 </time><span><a href="/categories/Linux/Shell/">Shell</a></span></div><div class="title"><a href="/2023/11/03/Linux%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%84%9A%E6%9C%AC/" itemprop="url"><span itemprop="name">Linux下快速部署SpringBoot项目的脚本</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" title="https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;user&#x2F;home?id&#x3D;105467463"><i class="ic i-cloud-music"></i></span> <a href="/about/me" title="about&#x2F;me" class="item about"><i class="ic i-address-card"></i></a></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>文章</a><ul class="submenu"><li class="item"><a href="/archivesLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年11月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?127968"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?997058"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?63916"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?724833"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?580420"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?109900"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 11 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-11-03T21:35:00+08:00" content="2023-11-03">11-03 </time><span><a href="/categories/Linux/Shell/">Shell</a></span></div><div class="title"><a href="/2023/11/03/Linux%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%84%9A%E6%9C%AC/" itemprop="url"><span itemprop="name">Linux下快速部署SpringBoot项目的脚本</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" title="https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;user&#x2F;home?id&#x3D;105467463"><i class="ic i-cloud-music"></i></span> <a href="/about/me" title="about&#x2F;me" class="item about"><i class="ic i-address-card"></i></a></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>文章</a><ul class="submenu"><li class="item"><a href="/archives/Line truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年12月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?709227"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?159639"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?852754"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?990552"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?430127"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?547546"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 12 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-24T21:37:00+08:00" content="2023-12-24">12-24 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/12/24/Docker-desktop%E9%83%A8%E7%BD%B2nacos/" itemprop="url"><span itemprop="name">Docker desktop部署nacos</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-02T21:47:00+08:00" content="2023-12-02">12-02 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/12/02/fastjson%E5%BA%8F%E5%88%97%E5%8C%96%E5%8E%BB%E9%99%A4%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" itemprop="url"><span itemprop="name">fastjson序列化去除空字符串属性</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" titleLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年12月"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?538371"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?511387"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?842238"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?492872"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?661361"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?213977"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> <a href="/archives/2023">2023 年</a> <small>/</small> 12 月<small>归档</small></h2><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-24T21:37:00+08:00" content="2023-12-24">12-24 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/12/24/Docker-desktop%E9%83%A8%E7%BD%B2nacos/" itemprop="url"><span itemprop="name">Docker desktop部署nacos</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-02T21:47:00+08:00" content="2023-12-02">12-02 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/12/02/fastjson%E5%BA%8F%E5%88%97%E5%8C%96%E5%8E%BB%E9%99%A4%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" itemprop="url"><span itemprop="name">fastjson序列化去除空字符串属性</span></a></div></article></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"></div><div class="related panel pjax" data-title="系列文章"></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" titleLine truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?921545"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?411194"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?838892"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?646520"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?876016"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?212231"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> 2023 年 <small>归档</small></h2><h3 class="item section"><a href="/archives/2023/12">12 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-24T21:37:00+08:00" content="2023-12-24">12-24 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/12/24/Docker-desktop%E9%83%A8%E7%BD%B2nacos/" itemprop="url"><span itemprop="name">Docker desktop部署nacos</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-02T21:47:00+08:00" content="2023-12-02">12-02 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/12/02/fastjson%E5%BA%8F%E5%88%97%E5%8C%96%E5%8E%BB%E9%99%A4%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" itemprop="url"><span itemprop="name">fastjson序列化去除空字符串属性</span></a></div></article><h3 class="item section"><a href="/archives/2023/11">11 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-11-03T21:35:00+08:00" content="2023-11-03">11-03 </time><span><a href="/categories/Linux/Shell/">Shell</a></span></div><div class="title"><a href="/2023/11/03/Linux%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%84%9A%E6%9C%AC/" itemprop="url"><span itemprop="name">Linux下快速部署SpringBoot项目的脚本</span></a></div></article><h3 class="item section"><a href="/archives/2023/10">10 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-29T20:41:00+08:00" content="2023-10-29">10-29 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%97%A5%E5%B8%B8%E8%AE%B0%E5%BD%95/">日常记录</a></span></div><div class="title"><a href="/2023/10/29/%E7%BB%99%E6%88%91%E7%9A%84%E8%80%81%E7%AC%94%E8%AE%B0%E6%9C%AC%E6%B8%85%E7%90%86%E7%81%B0%E5%B0%98/" itemprop="url"><span itemprop="name">给我的老笔记本清理灰尘</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:56:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Windows/%E5%B7%A5%ELine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?265025"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?240887"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?157958"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?618987"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?42587"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?870355"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> 2023 年 <small>归档</small></h2><h3 class="item section"><a href="/archives/2023/12">12 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-24T21:37:00+08:00" content="2023-12-24">12-24 </time><span><a href="/categories/Windows/%E5%B7%A5%E5%85%B7/">工具</a></span></div><div class="title"><a href="/2023/12/24/Docker-desktop%E9%83%A8%E7%BD%B2nacos/" itemprop="url"><span itemprop="name">Docker desktop部署nacos</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-12-02T21:47:00+08:00" content="2023-12-02">12-02 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/12/02/fastjson%E5%BA%8F%E5%88%97%E5%8C%96%E5%8E%BB%E9%99%A4%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2/" itemprop="url"><span itemprop="name">fastjson序列化去除空字符串属性</span></a></div></article><h3 class="item section"><a href="/archives/2023/11">11 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-11-03T21:35:00+08:00" content="2023-11-03">11-03 </time><span><a href="/categories/Linux/Shell/">Shell</a></span></div><div class="title"><a href="/2023/11/03/Linux%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E8%84%9A%E6%9C%AC/" itemprop="url"><span itemprop="name">Linux下快速部署SpringBoot项目的脚本</span></a></div></article><h3 class="item section"><a href="/archives/2023/10">10 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-29T20:41:00+08:00" content="2023-10-29">10-29 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%97%A5%E5%B8%B8%E8%AE%B0%E5%BD%95/">日常记录</a></span></div><div class="title"><a href="/2023/10/29/%E7%BB%99%E6%88%91%E7%9A%84%E8%80%81%E7%AC%94%E8%AE%B0%E6%9C%AC%E6%B8%85%E7%90%86%E7%81%B0%E5%B0%98/" itemprop="url"><span itemprop="name">给我的老笔记本清理灰尘</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-10-28T19:56:00+08:00" content="2023-10-28">10-28 </time><span><a href="/categories/Windows/%E5%B7%A5%E5Line truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
+25 -14
View File
@@ -48,30 +48,41 @@
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?115563"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?143443"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?161411"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?503553"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?171506"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?268451"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> 2023 年 <small>归档</small></h2><h3 class="item section"><a href="/archives/2023/05">05 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-30T17:20:00+08:00" content="2023-05-30">05-30 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/30/http%E8%AF%B7%E6%B1%82%E4%B9%8BrestTemplate%E9%85%8D%E7%BD%AE%E8%B6%85%E6%97%B6%E6%97%B6%E9%97%B4/" itemprop="url"><span itemprop="name">http请求之restTemplate配置超时时间</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:25:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/%E8%A7%A3%E5%86%B3MySQL%E6%8A%A5only-full-group-by%E9%94%99%E8%AF%AF/" itemprop="url"><span itemprop="name">解决MySQL报only_full_group_by错误</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:07:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/MySQL%E4%B8%AD%E7%9A%84any-value-%E5%87%BD%E6%95%B0/" itemprop="url"><span itemprop="name">MySQL中的any_value()函数</span></a></div></article><h3 class="item section"><a href="/archives/2023/04">04 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T13:32:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E5%91%BD%E4%BB%A4%E5%A4%A7%E6%9D%82%E7%83%A9/" itemprop="url"><span itemprop="name">命令大杂烩</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T12:39:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/">项目部署</a></span></div><diLine truncated
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">发表于"2023年"的文章</h1></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?57734"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?897303"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?488465"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?730902"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?45338"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?122294"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="collapse wrap"><h2 class="item header"><a href="/archives">全部</a> <small>/</small> 2023 年 <small>归档</small></h2><h3 class="item section"><a href="/archives/2023/05">05 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-30T17:20:00+08:00" content="2023-05-30">05-30 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/30/http%E8%AF%B7%E6%B1%82%E4%B9%8BrestTemplate%E9%85%8D%E7%BD%AE%E8%B6%85%E6%97%B6%E6%97%B6%E9%97%B4/" itemprop="url"><span itemprop="name">http请求之restTemplate配置超时时间</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:25:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/%E8%A7%A3%E5%86%B3MySQL%E6%8A%A5only-full-group-by%E9%94%99%E8%AF%AF/" itemprop="url"><span itemprop="name">解决MySQL报only_full_group_by错误</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-05-25T18:07:00+08:00" content="2023-05-25">05-25 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/">解决问题</a></span></div><div class="title"><a href="/2023/05/25/MySQL%E4%B8%AD%E7%9A%84any-value-%E5%87%BD%E6%95%B0/" itemprop="url"><span itemprop="name">MySQL中的any_value()函数</span></a></div></article><h3 class="item section"><a href="/archives/2023/04">04 月</a></h3><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T13:32:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E7%94%9F%E6%B4%BB/%E6%8A%80%E6%9C%AF%E5%88%86%E4%BA%AB/">技术分享</a></span></div><div class="title"><a href="/2023/04/16/%E5%91%BD%E4%BB%A4%E5%A4%A7%E6%9D%82%E7%83%A9/" itemprop="url"><span itemprop="name">命令大杂烩</span></a></div></article><article class="item normal" itemscope itemtype="http://schema.org/Article"><div class="meta"><time itemprop="dateCreated" datetime="2023-04-16T12:39:00+08:00" content="2023-04-16">04-16 </time><span><a href="/categories/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/">项目部署</a></span></div><div Line truncated
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// 评论数为 0 / 空时隐藏整个条目(commentCount 返回的是 abort 函数而非 Promise,
// 所以用 MutationObserver 监听它把数字填进 DOM 的时机来处理)
const observeCounts = () => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
if (el.__countObserved) return;
el.__countObserved = true;
const obs = new MutationObserver(() => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
obs.disconnect();
el.__countObserved = false;
});
obs.observe(el, { childList: true, characterData: true, subtree: true });
});
};
// 填文章列表/头部的评论数。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
observeCounts();
try { commentCount({ serverURL: 'https://comment.hitoli.com:8443' }); } catch (e) {}
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
// 最新评论列表(footer 里的容器,全局一次即可)
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}