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 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
| if site.data.about - let aboutData = site.data.about each item in aboutData - let subtitle = item.subtitle || config.subtitle - let avatarImg = item.avatarImg || theme.avatar.img - let aboutName = item.name || theme.author - let aboutDescription = item.description || config.description - let avatarSkills = item.avatarSkills #about-page .author-box if avatarSkills .author-tag-left each item in avatarSkills.left span.author-tag=item .author-info span .author-img img.no-lightbox(src=url_for(avatarImg) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="avatar") if avatarSkills .author-tag-right each item in avatarSkills.right span.author-tag=item .image-dot p.p.center.logo.large 关于本站 p.p.center.small=subtitle .author-content .author-content-item.myInfoAndSayHello .title1 你好,很高兴认识你👋 .title2 | 我是 span.inline-word=aboutName .title1=aboutDescription .aboutsiteTips.author-content-item - let { tips, title1, title2, word } = item.aboutsiteTips .author-content-item-tips= tips h2 = title1 br = title2 .mask each wordItem, index in word if index < word.length - 2 span(class=(index === 0 ? 'first-tips' : ''))= wordItem span(data-up)= word[word.length - 2] | span(data-show)= word[word.length - 1] .author-content if theme.LA.enable - let cover = item.statistic.cover .about-statistic.author-content-item .card-content .author-content-item-tips 数据 span.author-content-item-title 访问统计 #statistic .post-tips | 统计信息来自 a(href='https://invite.51.la/1NzKqTeb?target=V6', target='_blank', rel='noopener nofollow') 51la网站统计 .banner-button-group - let link = item.statistic.link - let text = item.statistic.text a.banner-button(onclick=`pjax.loadUrl("${link}")`) i.fas.fa-circle-plus | span.banner-button-text=text .author-content-item-group.column.mapAndInfo - let mapBackground = item.map.background - let mapBackgroundDark = item.map.backgroundDark style. .author-content-item.map { background-image: url(#{mapBackground}); } [data-theme='dark'] .author-content-item.map { background-image: url(#{mapBackgroundDark}); } .author-content-item.map.single - let mapTitle = item.map.title - let mapStrengthenTitle = item.map.StrengthenTitle span.map-title=mapTitle b=mapStrengthenTitle .author-content-item.selfInfo.single - let { selfInfoTips1, selfInfoContentYear, selfInfoTips2, selfInfoContent2, selfInfoTips3, selfInfoContent3 } = item.selfInfo div span.selfInfo-title=selfInfoTips1 | span.selfInfo-content#selfInfo-content-year(style='color:#43a6c6')=selfInfoContentYear div span.selfInfo-title=selfInfoTips2 | span.selfInfo-content(style='color:#c69043')=selfInfoContent2 div span.selfInfo-title=selfInfoTips3 | span.selfInfo-content(style='color:#b04fe6')=selfInfoContent3
.author-content .author-content-item.personalities - let {author_name, personality_type, photo_url, personality_img, name_url, personality_type_color} = item.personalities .author-content-item-tips 性格 span.author-content-item-title= author_name .title2(style=`color:${personality_type_color ? personality_type_color : "#ac899c"}`)= personality_type .post-tips | 在 a(href='https://www.16personalities.com/', target='_blank', rel='noopener nofollow') 16personalities | 了解更多关于 a(target='_blank', rel='noopener external nofollow', href= name_url)= author_name .image img.no-lightbox(src=url_for(personality_img), alt='人格') .author-content-item.myphoto span.map-title 风雨花渐落
.author-content .author-content-item.comic-content .card-content - let {comic_tips, comic_title, comic_list} = item.comic .author-content-item-tips=comic_tips .author-content-item-title=comic_title .comic-box if comic_list each i in comic_list a.comic-item(href=i.href, target="_blank", title=i.name) .comic-item-cover img(src=i.cover, alt=i.name) - let {game_tips, game_title, game_uid, game_bg} = item.game .author-content-item.game-yuanshen(style=`background: url(${game_bg}) top / cover no-repeat;`) .card-content .author-content-item-tips=game_tips span.author-content-item-title=game_title .content-bottom .icon-group .loading-bar(role='presentation', aria-hidden='true' style=`${game_title != "原神" ? "display: none": ""}`) .tips.game-yuanshen-uid=game_uid .author-content - let {music_tips, music_title, music_link, music_bg} = item.music - let {like_tips, like_title, like_bottom, like_bg} = item.like .author-content-item.like-technology(style=`background: url(${like_bg}) top / cover no-repeat;`) .card-content .author-content-item-tips=like_tips span.author-content-item-title=like_title .content-bottom .tips=like_bottom .author-content-item.like-music(style=`background: url(${music_bg}) top / cover no-repeat;`) .card-content .author-content-item-tips=music_tips span.author-content-item-title=music_title .content-bottom .tips=`跟 ${aboutName} 一起欣赏更多音乐` .banner-button-group a.banner-button(onclick=`pjax.loadUrl("${music_link}")`) i.fas.fa-circle-plus | span.banner-button-text 更多推荐
- let cleanContent = page.content ? page.content.replace(/<link[^>]*>|<script[^>]*>.*?<\/script>/gi, '') : '' if cleanContent .author-content .create-site-post.author-content-item.single != cleanContent
- let rawData = item.reward_list if rawData - let sortedByDate = rawData.slice().sort((a, b) => new Date(b.datatime) - new Date(a.datatime)); .author-content .author-content-item.single.reward#about-reward .author-content-item-tips 致谢 span.author-content-item-title 赞赏名单 .author-content-item-description 感谢因为有你们,让我更加有创作的动力。 .reward-list-all - let reward_list_amount = item.reward_list.sort((a,b)=>b.amount - a.amount) each item, index in reward_list_amount .reward-list-item .reward-list-item-name=item.name .reward-list-bottom-group if item.amount >= 50 .reward-list-item-money(style='background:var(--anzhiyu-yellow)')=`¥${item.amount}` else .reward-list-item-money=`¥${item.amount + (item.suffix ? item.suffix : "")}` .datatime.reward-list-item-time(datatime=item.datatime)=new Date(item.datatime).toISOString().slice(0, -14) .reward-list-updateDate | 最新更新时间: time.datatime.reward-list-updateDate-time(datatime=sortedByDate[0].datatime)=new Date(sortedByDate[0].datatime).toISOString().slice(0, -14) .about-reward #con #TA-con(onclick="anzhiyu.rewardShowConsole()") #text-con #linght #TA 为TA充电 #tube-con svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg') path(d='M1 77H234.226L307.006 24H790', stroke='#e5e9ef', stroke-width='20') path(d='M0 140H233.035L329.72 71H1028', stroke='#e5e9ef', stroke-width='20') path(d='M1 255H234.226L307.006 307H790', stroke='#e5e9ef', stroke-width='20') path(d='M0 305H233.035L329.72 375H1028', stroke='#e5e9ef', stroke-width='20') rect(y='186', width='236', height='24', fill='#e5e9ef') ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#e5e9ef') circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white') ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#e5e9ef') circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white') #mask svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg') path(d='M1 77H234.226L307.006 24H790', stroke='#f25d8e', stroke-width='20') path(d='M0 140H233.035L329.72 71H1028', stroke='#f25d8e', stroke-width='20') path(d='M1 255H234.226L307.006 307H790', stroke='#f25d8e', stroke-width='20') path(d='M0 305H233.035L329.72 375H1028', stroke='#f25d8e', stroke-width='20') rect(y='186', width='236', height='24', fill='#f25d8e') ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#f25d8e') circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white') ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#f25d8e') circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white') #orange-mask svg(viewBox='0 0 1028 385', fill='none', xmlns='http://www.w3.org/2000/svg') path(d='M1 77H234.226L307.006 24H790', stroke='#ffd52b', stroke-width='20') path(d='M0 140H233.035L329.72 71H1028', stroke='#ffd52b', stroke-width='20') path(d='M1 255H234.226L307.006 307H790', stroke='#ffd52b', stroke-width='20') path(d='M0 305H233.035L329.72 375H1028', stroke='#ffd52b', stroke-width='20') rect(y='186', width='236', height='24', fill='#ffd52b') ellipse(cx='790', cy='25.5', rx='25', ry='25.5', fill='#ffd52b') circle(r='14', transform='matrix(1 0 0 -1 790 25)', fill='white') ellipse(cx='790', cy='307.5', rx='25', ry='25.5', fill='#ffd52b') circle(r='14', transform='matrix(1 0 0 -1 790 308)', fill='white') p#people | 共 b=item.reward_list.length | 人
link(rel="stylesheet" href=url_for(theme.asset.about_css)) script(src=url_for(theme.asset.countup_js)) - const ck = theme.LA.ck script(defer). function initAboutPage() { fetch("https://v6-widget.51.la/v6/#{ck}/quote.js") .then(res => res.text()) .then(data => { let title = ["最近活跃", "今日人数", "今日访问", "昨日人数", "昨日访问", "本月访问", "总访问量"]; let num = data.match(/(<\/span><span>).*?(\/span><\/p>)/g);
num = num.map(el => { let val = el.replace(/(<\/span><span>)/g, ""); let str = val.replace(/(<\/span><\/p>)/g, ""); return str; });
let statisticEl = document.getElementById("statistic");
// 自定义不显示哪个或者显示哪个,如下为不显示 最近活跃访客 和 总访问量 let statistic = []; for (let i = 0; i < num.length; i++) { if (!statisticEl) return; if (i == 0) continue; statisticEl.innerHTML += "<div><span>" + title[i] + "</span><span id=" + title[i] + ">" + num[i] + "</span></div>"; queueMicrotask(() => { statistic.push( new CountUp(title[i], 0, num[i], 0, 2, { useEasing: true, useGrouping: true, separator: ",", decimal: ".", prefix: "", suffix: "", }) ); }); }
let statisticElement = document.querySelector(".about-statistic.author-content-item"); function statisticUP() { if (!statisticElement) return;
const callback = (entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { for (let i = 0; i < num.length; i++) { if (i == 0) continue; queueMicrotask(() => { statistic[i - 1].start(); }); } observer.disconnect(); // 停止观察元素,因为不再需要触发此回调 } }); };
const options = { root: null, rootMargin: "0px", threshold: 0 }; const observer = new IntersectionObserver(callback, options); observer.observe(statisticElement); }
const selfInfoContentYear = new CountUp("selfInfo-content-year", 0, #{selfInfoContentYear}, 0, 2, { useEasing: true, useGrouping: false, separator: ",", decimal: ".", prefix: "", suffix: "", });
let selfInfoContentYearElement = document.querySelector(".author-content-item.selfInfo.single"); function selfInfoContentYearUp() { if (!selfInfoContentYearElement) return;
const callback = (entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { selfInfoContentYear.start(); observer.disconnect(); // 停止观察元素,因为不再需要触发此回调 } }); };
const options = { root: null, rootMargin: "0px", threshold: 0 }; const observer = new IntersectionObserver(callback, options); observer.observe(selfInfoContentYearElement); }
selfInfoContentYearUp(); statisticUP() });
var pursuitInterval = null; pursuitInterval = setInterval(function () { const show = document.querySelector("span[data-show]"); const next = show.nextElementSibling || document.querySelector(".first-tips"); const up = document.querySelector("span[data-up]");
if (up) { up.removeAttribute("data-up"); }
show.removeAttribute("data-show"); show.setAttribute("data-up", "");
next.setAttribute("data-show", ""); }, 2000);
document.addEventListener("pjax:send", function () { pursuitInterval && clearInterval(pursuitInterval); }); } if (typeof gsap === "object") { initAboutPage() } else { getScript("!{url_for(theme.asset.gsap_js)}").then(initAboutPage); }
|