1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295
| #about-page .author-box .author-img img.no-lightbox(src='https://img.june-pj.cn/img/avatar.webp') .image-dot p.p.center.logo.large#about-typewriter .author-content .author-content-item.myInfoAndSayHello .title1 你好,很高兴认识你👋 .title2 | 我叫 span.inline-word June .title1 | 是一名 后端工程师、 span.inline-word 博主 .author-content-item.personalities .author-content-item-tips 性格 span.author-content-item-title 执政官 .title2(style='color:#ac899c') ESFJ-A .post-tips | 在 a(href='https://www.16personalities.com/', target='_blank', rel='noopener nofollow') 16personalities | 了解更多关于 a(target='_blank', rel='noopener external nofollow', href='https://www.16personalities.com/ch/esfj-%E4%BA%BA%E6%A0%BC') 执政官 .image img.no-lightbox(src='https://img.june-pj.cn/img/2025/06/ESFJ-A.svg')
.author-content .author-content-item.skills .card-content .author-content-item-tips 技能 span.author-content-item-title 开启创造力 .skills-style-group .tags-group-all .tags-group-wrapper each i in site.data.creativity - const evenNum = i.creativity_list.filter((x, index) => index % 2 === 0); - const oddNum = i.creativity_list.filter((x, index) => index % 2 === 1); each item, index in i.creativity_list if ((index+1 <= evenNum.length) && (index+1 <= oddNum.length)) .tags-group-icon-pair .tags-group-icon(style=`background: ${evenNum[index].color}`) img.no-lightbox(title=evenNum[index].name, src=evenNum[index].icon) .tags-group-icon(style=`background: ${oddNum[index].color}`) img.no-lightbox(title=oddNum[index].name, src=oddNum[index].icon) .skills-list each i in site.data.creativity each item, index in i.creativity_list .skill-info .skill-icon(style=`background: ${item.color}`) img.no-lightbox(title=item.name, src=item.icon) .skill-name span=item.name .etc ... .author-content-item.careers .card-content .author-content-item-tips 生涯 span.author-content-item-title 无限进步 .careers-group .careers-item .circle(style='background:#357ef5') .name EDU,电子信息工程 .careers-item .circle(style='background:#ff1111') .name SE,软件开发 img.author-content-img.no-lightbox(alt='生涯', src='https://img.june-pj.cn/img/2024/07/life.webp')
.author-content .about-statistic.author-content-item .card-content .author-content-item-tips 数据 span.author-content-item-title 访问统计 #statistic .post-tips | 统计信息来自 a(href='https://github.com/umami-software/umami', target='_blank', rel='noopener nofollow') Umami .banner-button-group a.banner-button(onclick='pjax.loadUrl("/archives/")', data-pjax-state) i.fas.fa-circle-right | span.banner-button-text 文章隧道 .author-content-item-group.column.mapAndInfo .author-content-item.map.single span.map-title | 我现在住在 b 深圳,南山 .author-content-item.selfInfo.single div span.selfInfo-title 生于 | span.selfInfo-content#selfInfo-content-year(style='color:#43a6c6') 2002 div span.selfInfo-title 湖南师范大学 | span.selfInfo-content(style='color:#c69043') 电子信息工程 div span.selfInfo-title 现在职业 | span.selfInfo-content(style='color:#b04fe6') 软件开发
.author-content .create-site-post.author-content-item.single .author-content-item-tips 心路历程 | Hi~欢迎来到我的博客。目前已成为一枚 strong 社畜牛马 | ,这里是我记笔记的地方,记录着编程学习时遇到的问题和一些奇奇怪怪的日常。 .p 我是搞后端的,前端这些东西我就会JavaWeb里的前端三剑客,博客搭建是我一点点搬运过来的。 | 致力于摆脱 del CV工程师 | 的称号。
.author-content .author-content-item.single.reward .author-content-item-tips 赞赏名单 .reward-header span.author-content-item-title 打赏名单 if theme.reward.enable && theme.reward.QR_code .post-reward .reward-button i.fas.fa-qrcode .reward-main ul.reward-all each item in theme.reward.QR_code li.reward-item if item.link a(href=url_for(item.link) target='_blank') img.post-qr-code-img(src=url_for(item.img) alt=item.text) else a(href=url_for(item.img) data-fancybox='reward' data-caption=item.text) img.post-qr-code-img.no-lightbox(src=url_for(item.img) alt=item.text) span.reward-list-updateDate 感谢以下小伙伴的赞赏支持~ .reward-list-all each i in site.data.reward each item in i.reward_list - var d = new Date(item.datatime) - var dateStr = d.getFullYear() + '-' + String(d.getMonth()+1).padStart(2,'0') + '-' + String(d.getDate()).padStart(2,'0') - var moneyNum = item.amount - var hasLink = !!item.link if hasLink a.reward-list-item(href=item.link target='_blank' rel='noopener') if item.isFriend span.reward-friend-tag 友链 .reward-list-item-row .reward-list-item-left img.reward-list-avatar.no-lightbox(src=item.avatar alt=item.name) span.reward-list-item-name= item.name .reward-list-item-pay if item.method === 'wechat' i.fab.fa-weixin.reward-icon-wechat else i.fab.fa-alipay.reward-icon-alipay span.reward-list-item-money span.reward-money-num= moneyNum span.reward-money-unit ¥ span.reward-list-item-time= dateStr else .reward-list-item if item.isFriend span.reward-friend-tag 友链 .reward-list-item-row .reward-list-item-left img.reward-list-avatar.no-lightbox(src=item.avatar alt=item.name) span.reward-list-item-name= item.name .reward-list-item-pay if item.method === 'wechat' i.fab.fa-weixin.reward-icon-wechat else i.fab.fa-alipay.reward-icon-alipay span.reward-list-item-money span.reward-money-num= moneyNum span.reward-money-unit ¥ span.reward-list-item-time= dateStr
.author-content .create-site-post.author-content-item.single .author-content-item-tips 文章统计 #posts-chart(data-start="2023-02" style="border-radius: 8px; height: 300px; padding: 10px;") #tags-chart(data-length="10" style="height: 300px; padding: 10px;") #categories-chart(data-parent="true" style="border-radius: 8px; height: 300px; padding: 10px;")
//- 脚本部分 script(src=url_for(theme.CDN.option.countup_js)) script. var initAboutPage = () => { const aboutPage = document.querySelector('#about-page'); if (!aboutPage) return;
// --- 打字机效果(循环:打字 → 停顿 → 删除 → 停顿 → 重新打字) --- const typewriterEl = document.getElementById('about-typewriter'); if (typewriterEl) { if (window._typewriterTimer) clearTimeout(window._typewriterTimer); typewriterEl.textContent = ''; const text = '遇事不决,可问春风'; let i = 0; let deleting = false; const tick = () => { if (!deleting) { typewriterEl.textContent = text.slice(0, i + 1); i++; if (i >= text.length) { deleting = true; window._typewriterTimer = setTimeout(tick, 1500); } else { window._typewriterTimer = setTimeout(tick, 150); } } else { i--; typewriterEl.textContent = text.slice(0, i); if (i <= 0) { deleting = false; window._typewriterTimer = setTimeout(tick, 500); } else { window._typewriterTimer = setTimeout(tick, 80); } } }; tick(); }
// --- Umami 统计 --- const statisticEl = document.getElementById('statistic'); if (!statisticEl) return;
// --- 1. 配置信息 --- const config = { token: "XXX".replace(/[\r\n\s]/g, ""), id: "XXX", api: "XXX" };
// --- 2. 静态结构初始化 --- statisticEl.innerHTML = ` <div><span>今日人数</span><span id="uvToday">0</span></div> <div><span>今日访问</span><span id="pvToday">0</span></div> <div><span>昨日人数</span><span id="uvYesterday">0</span></div> <div><span>昨日访问</span><span id="pvYesterday">0</span></div> <div><span>本月访问</span><span id="pvMonth">0</span></div> <div><span>总访问量</span><span id="pvTotal">0</span></div> `;
// --- 3. 渲染函数 --- const renderVal = (id, val) => { const el = document.getElementById(id); if (!el) return; const num = val || 0; if (window.CountUp) { new CountUp(id, 0, num, 0, 1.5).start(); } else { el.innerText = num; } };
// --- 4. 时间计算 --- const now = Date.now(); const todayStart = new Date().setHours(0, 0, 0, 0); const yesterdayStart = todayStart - 86400000; const monthStart = new Date(new Date().getFullYear(), new Date().getMonth(), 1).getTime();
// --- 5. 获取数据 --- const fetchStats = (start, end) => fetch(`${config.api}?startAt=${start}&endAt=${end}`, { headers: {'Authorization': `Bearer ${config.token}`, 'Content-Type': 'application/json'} }).then(res => res.json());
// 使用 Promise.all 并行请求所有数据 Promise.all([ fetchStats(0, now), // Total fetchStats(todayStart, now), // Today fetchStats(yesterdayStart, todayStart - 1), // Yesterday fetchStats(monthStart, now) // Month ]).then(([total, today, yesterday, month]) => { renderVal('pvTotal', total.pageviews); renderVal('uvToday', today.visitors); renderVal('pvToday', today.pageviews); renderVal('uvYesterday', yesterday.visitors); renderVal('pvYesterday', yesterday.pageviews); renderVal('pvMonth', month.pageviews); }).catch(err => console.error('Umami Stats Error:', err)); };
// 绑定初始化 const startInit = () => { if (typeof btf !== 'undefined') { initAboutPage(); if (btf.addGlobalFn) { btf.addGlobalFn('pjaxComplete', initAboutPage, 'initAboutPage'); } else { document.addEventListener('pjax:complete', initAboutPage); } } else { setTimeout(startInit, 100); } };
startInit();
|