From 2d189124f5cce22318b6ca34440a0ddac6e453f4 Mon Sep 17 00:00:00 2001 From: echocbx Date: Sat, 23 Sep 2023 20:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=9C=E5=BC=8F=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/footer.pug | 85 +- layout/includes/head.pug | 4 +- layout/includes/header/index.pug | 13 +- layout/includes/header/menu_item.pug | 10 +- layout/includes/header/nav.pug | 39 +- layout/includes/header/post-info.pug | 48 +- layout/includes/hometop.pug | 33 +- layout/includes/layout.pug | 28 +- layout/includes/mixins/article-sort.pug | 2 +- layout/includes/mixins/post-ui.pug | 28 +- layout/includes/page/about.pug | 73 +- layout/includes/pagination.pug | 4 +- layout/includes/post/post-copyright.pug | 2 +- layout/includes/rightside.pug | 2 +- layout/includes/swiper.pug | 26 + .../includes/third-party/comments/index.pug | 2 +- .../third-party/search/local-search.pug | 2 +- layout/includes/third-party/subtitle.pug | 160 +- layout/includes/widget/card_author.pug | 3 +- layout/includes/widget/card_post_toc.pug | 5 +- layout/includes/widget/card_tags.pug | 4 +- layout/includes/widget/card_webinfo.pug | 16 +- layout/includes/widget/index.pug | 2 +- scripts/helpers/aside_archives.js | 2 +- scripts/helpers/aside_categories.js | 2 +- scripts/helpers/random.js | 14 +- scripts/helpers/related_post.js | 6 +- source/css/_custom/about.css | 6 - .../css/_custom/{waves.css => animations.css} | 17 +- source/css/_custom/aside.css | 5 +- source/css/_custom/console.styl | 90 +- source/css/_custom/custom.css | 14 +- source/css/_custom/flink.css | 11 +- source/css/_custom/font.css | 10 +- source/css/_custom/footer.css | 6 +- source/css/_custom/hometop.styl | 19 +- source/css/_custom/iconfont.css | 902 +++ source/css/_custom/{nav.css => nav.styl} | 33 +- source/css/_custom/swiper.css | 270 + source/css/_custom/swiperbar.styl | 171 + source/css/_custom/tag.styl | 6 +- source/css/_global/function.styl | 7 - source/css/_layout/aside.styl | 16 +- source/css/_layout/footer.styl | 88 +- source/css/_layout/head.styl | 13 +- source/css/_layout/loading.styl | 7 +- source/css/_layout/post.styl | 4 +- source/css/_layout/sidebar.styl | 2 +- source/css/_page/homepage.styl | 2 + source/css/_search/index.styl | 10 +- source/css/_tags/note.styl | 1 + source/css/color.css | 7 +- source/css/var.styl | 12 +- source/font/font-min.txt | 6796 ----------------- source/font/iconfont.woff2 | Bin 0 -> 46652 bytes source/js/a.js | 323 - source/js/custom.js | 265 +- source/js/main.js | 18 +- source/js/swiper.js | 16 + source/js/typed.js | 11 + 60 files changed, 2088 insertions(+), 7685 deletions(-) create mode 100644 layout/includes/swiper.pug rename source/css/_custom/{waves.css => animations.css} (86%) create mode 100644 source/css/_custom/iconfont.css rename source/css/_custom/{nav.css => nav.styl} (95%) create mode 100644 source/css/_custom/swiper.css create mode 100644 source/css/_custom/swiperbar.styl delete mode 100644 source/font/font-min.txt create mode 100644 source/font/iconfont.woff2 delete mode 100644 source/js/a.js create mode 100644 source/js/swiper.js create mode 100644 source/js/typed.js diff --git a/layout/includes/footer.pug b/layout/includes/footer.pug index fead0bd..c47f2ed 100644 --- a/layout/includes/footer.pug +++ b/layout/includes/footer.pug @@ -1,52 +1,33 @@ -#footer_deal - if theme.footer.footer_icons.enable - each i in theme.footer.footer_icons.left - if i.class == "in" - a.deal_link(href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) - else if i.class == "out" - a.deal_link(target='_blank', rel='noopener external nofollow', href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) - else - a.deal_link(href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) - img.footer_mini_logo.entered.loading(title='返回顶部' onclick='btf.scrollToDest(0, 500)' src=`${theme.footer.footer_logo.url}` data-ll-status='loading') - if theme.footer.footer_icons.enable - each i in theme.footer.footer_icons.right - if i.class == "in" - a.deal_link(href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) - else if i.class == "out" - a.deal_link(target='_blank', rel='noopener external nofollow', href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) - else - a.deal_link(href=`${i.link}`, title=`${i.desrc}`) - i(class=`${i.icon}`) -#Jay-footer - each item in theme.footer.footer_group.footer_group_link - .footer-group - h3.footer-title=item.group_title - .footer-links - each i in item.footer_links - if i.class == "in" - a.footer-item(href=`${i.link}`)=i.text - else if i.class == "out" - a.footer-item(target='_blank', href=`${i.link}`)=i.text - else - a.footer-item(href=`${i.link}`)=i.text -#footer-banner - .footer-banner-links - .footer-banner-left - .footer-banner-left - #footer-banner-tips=`${theme.footer.text}` - - .footer-banner-right - a.footer-banner-link(href="https://hexo.io/zh-cn/" title="Hexo")=theme.footer.framework - a.footer-banner-link | - a.footer-banner-link(href="/archives/49841/" title="theme") 主题:Dynasty - a.footer-banner-link | - a.footer-banner-link(href="/about/" title="about") 关于 - a.footer-banner-link | - a.footer-banner-link.cc(href="/cc/" title="cc协议") - i.fab.fa-creative-commons - span 协议。 \ No newline at end of file +.footer + #in + .title + img(src=url_for(theme.footer.footer_logo.url) style='border-radius:100vh;box-shadow:0 8px 12px -3px #4259ef23') + .author + span.name=config.author + .descr=config.subtitle + if theme.footer.footer_icons.enable + .links + each i in theme.footer.footer_icons.icons + if i.class == "in" + a.deal_link(href=`${i.link}`, title=`${i.desrc}`) + i(class=`${i.icon}` style='font-size:25px') + else if i.class == "out" + a.deal_link(target='_blank', rel='noopener external nofollow', href=`${i.link}`, title=`${i.desrc}`) + i(class=`${i.icon}` style='font-size:25px') + else + a.deal_link(href=`${i.link}`, title=`${i.desrc}`) + i(class=`${i.icon}` style='font-size:25px') + about.about + a.footer-button(href="/about/" style='box-shadow:0 8px 12px -3px #ee7d7936;background:#F04A63;border-radius:100vh;') + i.dys.caozuo-wailian + span 了解更多 + a.footer-button(href="/cc/" style='box-shadow:0 8px 12px -3px #87ee7936;background:#57BD6A;border-radius:100vh;') + i.dys.creativecommons + span 转载协议 + div.frame + span HEXO + i.dys.heart-beat(style='font-size:20px') + span Dynasty + //- p(style="margin:5px 10px 5px 10px;height:20px") + a.active(href="https://cdnnb.cn") + img(src="https://img.shields.io/badge/本站由失控的防御系统提供加速防御支持-green?style=flat&logo=Claris") \ No newline at end of file diff --git a/layout/includes/head.pug b/layout/includes/head.pug index d8ff883..db8b1a0 100644 --- a/layout/includes/head.pug +++ b/layout/includes/head.pug @@ -40,7 +40,7 @@ if (theme.pwa && theme.pwa.enable) //- main css link(rel='stylesheet', href=url_for(theme.asset.main_css)) -link(rel='stylesheet', href=url_for(theme.asset.fontawesomeV6) media="print" onload="this.media='all'") +//- link(rel='stylesheet', href=url_for(theme.asset.fontawesomeV6) media="print" onload="this.media='all'") if (theme.snackbar && theme.snackbar.enable) link(rel='stylesheet', href=url_for(theme.asset.snackbar_css) media="print" onload="this.media='all'") @@ -55,7 +55,7 @@ if theme.fancybox !=partial('includes/head/analytics', {}, {cache: true}) //- font -if theme.blog_title_font && theme.blog_title_font.font_link +if theme.blog_title_font && theme.blog_title_font.font_link link(rel='stylesheet' href=url_for(theme.blog_title_font.font_link) media="print" onload="this.media='all'") //- global config diff --git a/layout/includes/header/index.pug b/layout/includes/header/index.pug index aab6c6f..7867412 100644 --- a/layout/includes/header/index.pug +++ b/layout/includes/header/index.pug @@ -39,18 +39,7 @@ header#page-header(class=isHomeClass style=bg_img) use(href='#gentle-wave', x='48', y='3') use(href='#gentle-wave', x='48', y='5') use(href='#gentle-wave', x='48', y='7') - else if is_home() - //- #site-info - h1#site-title=site_title - if theme.subtitle.enable - - var loadSubJs = true - #site-subtitle - span#subtitle - if(theme.social) - #site_social_icons - !=fragment_cache('social', function(){return partial('includes/header/social')}) - #scroll-down - i.fas.fa-angle-down.scroll-down-effects + else if is_home() else #page-site-info h1#site-title=site_title \ No newline at end of file diff --git a/layout/includes/header/menu_item.pug b/layout/includes/header/menu_item.pug index a1744f7..ef69bea 100644 --- a/layout/includes/header/menu_item.pug +++ b/layout/includes/header/menu_item.pug @@ -1,12 +1,12 @@ if theme.nav.menu - .menus_items + .menus_items#menus-items each value, label in theme.nav.menu if typeof value !== 'object' .menus_item - const valueArray = value.split('||') a.site-page(href=url_for(trim(valueArray[0]))) if valueArray[1] - i.fa-fw(class=trim(valueArray[1])) + i(class=trim(valueArray[1])) span=' '+label else .menus_item @@ -14,14 +14,14 @@ if theme.nav.menu - const hideClass = labelArray[2] && trim(labelArray[2]) === 'hide' ? 'hide' : '' a.site-page.group(class=`${hideClass}` href='javascript:void(0);') if labelArray[1] - i.fa-fw(class=trim(labelArray[1])) + i(class=trim(labelArray[1])) span=' '+ trim(labelArray[0]) - i.fas.fa-chevron-down + i.dys.arrowdown ul.menus_item_child each val,lab in value - const valArray = val.split('||') li a.site-page.child(href=url_for(trim(valArray[0]))) if valArray[1] - i.fa-fw(class=trim(valArray[1])) + i(class=trim(valArray[1])) span=' '+ lab \ No newline at end of file diff --git a/layout/includes/header/nav.pug b/layout/includes/header/nav.pug index 8e5f68d..4c83c03 100644 --- a/layout/includes/header/nav.pug +++ b/layout/includes/header/nav.pug @@ -6,36 +6,45 @@ nav#nav span#blog_name a#site-name(href=url_for('/')) .title #[=theme.nav.title.title] - i.fa-solid.fa-house + i.dys.home else span#blog_name(style="margin-left:-5px;height:30px;width:30px") a#site-name(href=url_for('/')) img(src=url_for(theme.nav.title.title) style="width:30px;height:30px;border-radius:100vh;") - #toggle-menu(style='margin:auto;') + + .nav-menus#nav-menus + #toggle-menu(style='margin:0 10px 0 5px;') a.site-page(style='display:flex; align-items:center; height:35px;') - i.fas.fa-bars-progress.fa-fw + i.dys.apps(style='font-size: 25px;') | 菜单 - !=partial('includes/header/menu_item', {}, {cache: true}) + !=partial('includes/header/menu_item', {}, {cache: true}) + + .notebar#notebar a.link(href="https://travellings.cn/go.html" style='margin-right:10px') - i.fas.fa-bus + i.dys.tower(style='font-size: 22px;') + if (theme.algolia_search.enable || theme.local_search.enable) div.nav-button#search-button a.site-page.social-icon.search .search-button-text - i.fas.fa-search.fa-fw + i.dys.searchico(style='font-size:25px') //- span 搜索 else - div.nav-button - a.site-page.social-icon.search - .search-button-text - i.fas.fa-search.fa-fw - span 未开启 - - #buttons - a.link(onclick='showconsolebtn()') - i.fas.fa-gear.fa-spin + div.nav-button + a.site-page.social-icon.search + .search-button-text + i.dys.searchico(style='font-size:25px') + span 未开启 + //- div.nav-button + a.link(onclick='showconsolebtn()') + i.dys.apps(style='font-size: 26px;') + + #buttons.conbtn(onclick='btf.scrollToDest(0,500)') + a.link + i.dys.arrowup(style='font-size: 26px;') + span#percent diff --git a/layout/includes/header/post-info.pug b/layout/includes/header/post-info.pug index 92ae5b5..461015c 100644 --- a/layout/includes/header/post-info.pug +++ b/layout/includes/header/post-info.pug @@ -7,19 +7,19 @@ if (theme.post_meta.post.date_type) span.post-meta-date if (theme.post_meta.post.date_type === 'both') - i.far.fa-calendar-alt.fa-fw.post-meta-icon + i.dys.time.post-meta-icon span.post-meta-label= _p('post.created') time.post-meta-date-created(datetime=date_xml(page.date) title=_p('post.created') + ' ' + full_date(page.date))=date(page.date, config.date_format) span.post-meta-separator | - i.fas.fa-history.fa-fw.post-meta-icon + i.dys.shijianzhou.post-meta-icon span.post-meta-label= _p('post.updated') time.post-meta-date-updated(datetime=date_xml(page.updated) title=_p('post.updated') + ' ' + full_date(page.updated))=date(page.updated, config.date_format) else - let data_type_update = theme.post_meta.post.date_type === 'updated' - let date_type = data_type_update ? 'updated' : 'date' - - let date_icon = data_type_update ? 'fas fa-history' :'far fa-calendar-alt' + - let date_icon = data_type_update ? 'dys shijianzhou' :'dys time' - let date_title = data_type_update ? _p('post.updated') : _p('post.created') - i.fa-fw.post-meta-icon(class=date_icon) + i.post-meta-icon(class=date_icon) span.post-meta-label= date_title time(datetime=date_xml(page[date_type]) title=date_title + ' ' + full_date(page[date_type]))=date(page[date_type], config.date_format) if (theme.post_meta.post.categories && page.categories.data.length > 0) @@ -28,10 +28,10 @@ span.post-meta-separator | each item, index in page.categories.data - i.fas.fa-inbox.fa-fw.post-meta-icon + i.dys.-disk.post-meta-icon a(href=url_for(item.path)).post-meta-categories #[=item.name] if (index < page.categories.data.length - 1) - i.fas.fa-angle-right.post-meta-separator + i.dys.arrow-right.post-meta-separator .meta-secondline - let postWordcount = theme.wordcount.enable && (theme.wordcount.post_wordcount || theme.wordcount.min2read) @@ -39,13 +39,13 @@ span.post-meta-separator | span.post-meta-wordcount if theme.wordcount.post_wordcount - i.far.fa-file-word.fa-fw.post-meta-icon + i.far.fa-file-word.post-meta-icon span.post-meta-label= _p('post.wordcount') + ':' span.word-count= wordcount(page.content) if theme.wordcount.min2read span.post-meta-separator | if theme.wordcount.min2read - i.far.fa-clock.fa-fw.post-meta-icon + i.far.fa-clock.post-meta-icon span.post-meta-label= _p('post.min2read') + ':' span= min2read(page.content, {cn: 350, en: 160}) + _p('post.min2read_unit') @@ -53,7 +53,7 @@ mixin pvBlock(parent_id,parent_class,parent_title) span.post-meta-separator | span(class=parent_class id=parent_id data-flag-title=page.title) - i.far.fa-eye.fa-fw.post-meta-icon + i.dys.view.post-meta-icon span.post-meta-label=_p('post.page_pv') + ':' if block block @@ -63,27 +63,27 @@ if commentUse[0] === 'Valine' && theme.valine.visitor +pvBlock(url_for(page.path),'leancloud_visitors',page.title) span.leancloud-visitors-count - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani else if commentUse[0] === 'Waline' && theme.waline.pageview +pvBlock('','','') span.waline-pageview-count(data-path=url_for(page.path)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani else if commentUse[0] === 'Twikoo' && theme.twikoo.visitor +pvBlock('','','') span#twikoo_visitors - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani else if commentUse[0] === 'Artalk' && theme.artalk.visitor +pvBlock('','','') span#ArtalkPV - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani else if theme.busuanzi.page_pv +pvBlock('','post-meta-pv-cv','') span#busuanzi_value_page_pv - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani else if theme.busuanzi.page_pv +pvBlock('','post-meta-pv-cv','') span#busuanzi_value_page_pv - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani if comments.count && !comments.lazyload && page.comments !== false && comments.use - var whichCount = comments.use[0] @@ -91,7 +91,7 @@ mixin countBlock span.post-meta-separator | span.post-meta-commentcount - i.far.fa-comments.fa-fw.post-meta-icon + i.far.fa-comments.post-meta-icon span.post-meta-label= _p('post.comments') + ':' if block block @@ -101,32 +101,32 @@ +countBlock span.disqus-comment-count a(href=full_url_for(page.path) + '#disqus_thread') - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Disqusjs' +countBlock a(href=full_url_for(page.path) + '#disqusjs') span.disqus-comment-count(data-disqus-url=full_url_for(page.path)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Valine' +countBlock a(href=url_for(page.path) + '#post-comment' itemprop="discussionUrl") span.valine-comment-count(data-xid=url_for(page.path) itemprop="commentCount") - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Waline' +countBlock a(href=url_for(page.path) + '#post-comment') span.waline-comment-count(data-path=url_for(page.path)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Gitalk' +countBlock a(href=url_for(page.path) + '#post-comment') span.gitalk-comment-count - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Twikoo' +countBlock a(href=url_for(page.path) + '#post-comment') span#twikoo-count - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Facebook Comments' +countBlock a(href=url_for(page.path) + '#post-comment') @@ -135,9 +135,9 @@ +countBlock a(href=url_for(page.path) + '#post-comment') span.remark42__counter(data-url=urlNoIndex()) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Artalk' +countBlock a(href=url_for(page.path) + '#post-comment') span.artalk-count - i.fa-solid.fa-spinner.fa-spin \ No newline at end of file + i.dys.spinner3.spin.ani \ No newline at end of file diff --git a/layout/includes/hometop.pug b/layout/includes/hometop.pug index e6de737..2330457 100644 --- a/layout/includes/hometop.pug +++ b/layout/includes/hometop.pug @@ -1,7 +1,5 @@ - var hometop = theme.hometop - var fposts = theme.hometop.featured_posts -- const { effect,loop,source,sub,startDelay,typeSpeed,backSpeed } = theme.hometop -- let subContent = subtitle || new Array() .hometop .hometopin @@ -10,7 +8,10 @@ .in span.title=hometop.title.title .subtitle - .swiper-container.sublist + - var loadSubJs = true + span#subtitle + span ▂ + //- .swiper-container.sublist .swiper-wrapper each item in hometop.subtitle .swiper-slide=`${item}` @@ -29,16 +30,17 @@ !=getarray_bar("category") a.category-bar-more(href=url_for(fposts.categroies_more_url)) 更多分类 .group1 - .recent-top-post-group#recent-top-post-group.hometop_item + include swiper.pug + //- .recent-top-post-group#recent-top-post-group.hometop_item .recent-post-top#recent-post-top .topGroup#topGroup if fposts.posts each i in fposts.posts - .recent-post-item#recent-post-item + .recent-post-item#recent-post-item(onclick=`pjax.loadUrl('${url_for(i.link)}')`) .post_cover.left_radius a(href=url_for(i.link), title=i.title) img.post_bg.entered.loaded(src=url_for(i.cover) onerror="this.onerror=null,this.src='/img/404.png'") - .recent-post-info(href=url_for(i.link)) + .recent-post-info a.article-title(href=url_for(i.link), title=i.title)= i.title if hometop.style === 1 .hometop-webinfo.hometop_item @@ -88,21 +90,4 @@ use(href='#gentle-wave', x='48', y='0') use(href='#gentle-wave', x='48', y='3') use(href='#gentle-wave', x='48', y='5') - use(href='#gentle-wave', x='48', y='7') - -- subContent = subContent.length ? subContent : new Array(config.subtitle) -//- script. - function subtitleType () { - if (!{effect}) { - window.typed = new Typed(".subtitle", { - strings: !{JSON.stringify(subContent)}, - startDelay: !{startDelay}, - typeSpeed: !{typeSpeed}, - loop: !{loop}, - backSpeed: !{backSpeed} - }) - } else { - document.getElementById("subtitle").innerHTML = '!{subContent[0]}' - } - } - subtitleType() \ No newline at end of file + use(href='#gentle-wave', x='48', y='7') \ No newline at end of file diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug index d6c412a..7525637 100644 --- a/layout/includes/layout.pug +++ b/layout/includes/layout.pug @@ -7,16 +7,15 @@ doctype html html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside) head include ./head.pug - script(src='/js/fish.load.js') link(rel="stylesheet", href="/css/color.css") link(rel="stylesheet", href="https://cdn.jsdelivr.net/npm/element-ui@2.15.6/packages/theme-chalk/lib/index.css") - link(rel='preload' as='font' type='font/ttf' href='/font/alifangyuan.ttf' crossorigin='anonymous') + //- link(rel='preload' as='font' type='font/ttf' href='/font/alifangyuan.ttf' crossorigin='anonymous') link(rel="stylesheet", href="https://unpkg.com/swiper@8/swiper-bundle.min.css") - script(src=" https://cdn.jsdelivr.net/npm/jquery@3.7.0/dist/jquery.min.js") + script(src=" https://unpkg.com/jquery@3.7.0/dist/jquery.min.js") script(async='' src='/js/vue.min.js') script(async='' src='/js/element-ui.js') script(async='' data-pjax='' src="/js/scroll.js") - script(async='' data-pjax='' src="/js/vue-bar.js") + script(async='' data-pjax='' src="/js/vue-bar.js") body script(src="https://unpkg.com/swiper@8/swiper-bundle.min.js") if theme.preloader.enable @@ -43,6 +42,10 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside include widget/index.pug if (is_page()) block content + + + + else main#content-inner.layout(class=hideAside) if body @@ -63,8 +66,7 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside else - var footer_bg = '' - footer#footer(style=footer_bg) - !=partial('includes/footer', {}, {cache: true}) + !=partial('includes/footer', {}, {cache: true}) else include ./404.pug @@ -72,27 +74,25 @@ html(lang=config.language data-theme=theme.display_mode class=htmlClassHideAside include ./rightside.pug !=partial('includes/third-party/search/index', {}, {cache: true}) include ./additional-js.pug - .totopbutton(onclick="btf.scrollToDest(0,500)") - i.fas.fa-arrow-up - span#percent 0 - include ./waves.pug + .totopbutton#totopbtn(onclick="showconsolebtn()") + i #console-pannel #pannel .console-item .console-button(onclick='hideaside()') - i.fas.fa-arrows-alt-h + i.dys.server .text 侧栏隐显 .console-item .console-button(onclick='toggleTheme()') - i.fas.fa-adjust + i.dys.yueliang .text 暗色模式 .console-item .console-button(onclick='hidehometop()') - i.fas.fa-grip-vertical + i.dys.nail .text 顶部隐显 .console-item .console-button(onclick='toRandomPost()') - i.fas.fa-shuffle + i.dys.shuffle .text 随机文章 script(src="/js/custom.js") script(src="/js/random.js") \ No newline at end of file diff --git a/layout/includes/mixins/article-sort.pug b/layout/includes/mixins/article-sort.pug index 01e9ef2..0eed82e 100644 --- a/layout/includes/mixins/article-sort.pug +++ b/layout/includes/mixins/article-sort.pug @@ -14,7 +14,7 @@ mixin articleSort(posts) img(src=url_for(article.cover) alt=title onerror=`this.onerror=null;this.src='${url_for(theme.error_img.post_page)}'`) .article-sort-item-info .article-sort-item-time - i.far.fa-calendar-alt + i.dys.time time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))= date(article.date, config.date_format) a.article-sort-item-title(href=url_for(article.path) title=title)= title - }) \ No newline at end of file diff --git a/layout/includes/mixins/post-ui.pug b/layout/includes/mixins/post-ui.pug index 3ba2e4b..415b935 100644 --- a/layout/includes/mixins/post-ui.pug +++ b/layout/includes/mixins/post-ui.pug @@ -16,23 +16,23 @@ mixin postUI(posts) .article-meta-wrap if (is_home() && (article.top || article.sticky > 0)) span.article-meta - i.fas.fa-thumbtack.sticky + i.dys.nail span.sticky= _p('sticky') span.article-meta-separator | if (theme.post_meta.page.date_type) span.post-meta-date if (theme.post_meta.page.date_type === 'both') - i.far.fa-calendar-alt + i.dys.time span.article-meta-label=_p('post.created') time.post-meta-date-created(datetime=date_xml(article.date) title=_p('post.created') + ' ' + full_date(article.date))=date(article.date, config.date_format) span.article-meta-separator | - i.fas.fa-history + i.dys.archives span.article-meta-label=_p('post.updated') time.post-meta-date-updated(datetime=date_xml(article.updated) title=_p('post.updated') + ' ' + full_date(article.updated))=date(article.updated, config.date_format) else - let data_type_updated = theme.post_meta.page.date_type === 'updated' - let date_type = data_type_updated ? 'updated' : 'date' - - let date_icon = data_type_updated ? 'fas fa-history' :'far fa-calendar-alt' + - let date_icon = data_type_updated ? 'fas fa-history' :'dys time' - let date_title = data_type_updated ? _p('post.updated') : _p('post.created') i(class=date_icon) span.article-meta-label=date_title @@ -40,7 +40,7 @@ mixin postUI(posts) if (theme.post_meta.page.categories && article.categories.data.length > 0) span.article-meta span.article-meta-separator | - i.fas.fa-inbox + i.dys.archives each item, index in article.categories.data a(href=url_for(item.path)).article-meta__categories #[=item.name] if (index < article.categories.data.length - 1) @@ -48,7 +48,7 @@ mixin postUI(posts) if (theme.post_meta.page.tags && article.tags.data.length > 0) span.article-meta.tags span.article-meta-separator | - i.fas.fa-tag + i.dys.tag each item, index in article.tags.data a(href=url_for(item.path)).article-meta__tags #[=item.name] if (index < article.tags.data.length - 1) @@ -58,7 +58,7 @@ mixin postUI(posts) - needLoadCountJs = true span.article-meta span.article-meta-separator | - i.fas.fa-comments + i.dys.comment if block block span.article-meta-label= ' ' + _p('card_post_count') @@ -68,26 +68,26 @@ mixin postUI(posts) when 'Disqus' +countBlockInIndex a(href=full_url_for(link) + '#disqus_thread') - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Disqusjs' +countBlockInIndex a(href=full_url_for(link) + '#disqusjs') span.disqus-comment-count(data-disqus-url=full_url_for(link)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Valine' +countBlockInIndex a(href=url_for(link) + '#post-comment') span.valine-comment-count(data-xid=url_for(link)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Waline' +countBlockInIndex a(href=url_for(link) + '#post-comment') span.waline-comment-count(id=url_for(link)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Twikoo' +countBlockInIndex a.twikoo-count(href=url_for(link) + '#post-comment') - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Facebook Comments' +countBlockInIndex a(href=url_for(link) + '#post-comment') @@ -96,12 +96,12 @@ mixin postUI(posts) +countBlockInIndex a(href=url_for(link) + '#post-comment') span.remark42__counter(data-url=urlNoIndex(article.permalink)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani when 'Artalk' +countBlockInIndex a(href=url_for(link) + '#post-comment') span.artalk-count(data-page-key=url_for(link)) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani if theme.ad && theme.ad.index if (index + 1) % 3 == 0 diff --git a/layout/includes/page/about.pug b/layout/includes/page/about.pug index 6d340b6..8560a83 100644 --- a/layout/includes/page/about.pug +++ b/layout/includes/page/about.pug @@ -48,25 +48,39 @@ .skills-style-group .tags-group-all .tags-group-wrapper - each i in site.data.creativity + //- 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 ... + .tags-group-icon-pair + .tags-group-icon(style=`background: #b8f0ae`) + img.no-lightbox(title='vue', src='https://bu.dusays.com/2023/04/09/643293b6788bd.png') + .tags-group-icon(style=`background: #222`) + img.no-lightbox(title='React', src='data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9Ii0xMS41IC0xMC4yMzE3NCAyMyAyMC40NjM0OCI+CiAgPHRpdGxlPlJlYWN0IExvZ288L3RpdGxlPgogIDxjaXJjbGUgY3g9IjAiIGN5PSIwIiByPSIyLjA1IiBmaWxsPSIjNjFkYWZiIi8+CiAgPGcgc3Ryb2tlPSIjNjFkYWZiIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIi8+CiAgICA8ZWxsaXBzZSByeD0iMTEiIHJ5PSI0LjIiIHRyYW5zZm9ybT0icm90YXRlKDYwKSIvPgogICAgPGVsbGlwc2Ugcng9IjExIiByeT0iNC4yIiB0cmFuc2Zvcm09InJvdGF0ZSgxMjApIi8+CiAgPC9nPgo8L3N2Zz4K') + .tags-group-icon-pair + .tags-group-icon(style=`background: #57b6e6`) + img.no-lightbox(title='Docker', src='https://bu.dusays.com/2023/04/28/644bdead5d78f.webp') + .tags-group-icon(style=`background: #4082c3`) + img.no-lightbox(title='Photoshop', src='https://bu.dusays.com/2023/04/28/644bdead69ce6.webp') + .tags-group-icon-pair + .tags-group-icon(style=`background: #b8f0ae`) + img.no-lightbox(title='Node', src='https://npm.elemecdn.com/anzhiyu-blog@2.1.1/img/svg/node-logo.svg') + .tags-group-icon(style=`background: #000`) + img.no-lightbox(title='Python', src='https://bu.dusays.com/2023/04/28/644bdead6dc5f.webp') + .tags-group-icon-pair + .tags-group-icon(style=`background: #937df7`) + img.no-lightbox(title='vite', src='https://npm.elemecdn.com/anzhiyu-blog@2.0.8/img/svg/vite-logo.svg') + .tags-group-icon(style=`background: #2c51db`) + img.no-lightbox(title='css3', src='https://bu.dusays.com/2023/04/21/644284024536b.webp') + .tags-group-icon-pair + .tags-group-icon(style=`background: #f7cb4f`) + img.no-lightbox(title='JS', src='https://bu.dusays.com/2023/04/21/6442840245873.webp') + .tags-group-icon(style=`background: #e9572b`) + img.no-lightbox(title='HTML', src='https://bu.dusays.com/2023/04/21/6442840244ea8.webp') + .tags-group-icon-pair + .tags-group-icon(style=`background: #df5b40`) + img.no-lightbox(title='Git', src='https://bu.dusays.com/2023/04/21/6442840245495.webp') .author-content-item.careers .card-content .author-content-item-tips 生涯 @@ -80,8 +94,8 @@ .author-content .author-content-item.personalities .author-content-item-tips 人格 - span.author-content-item-title=`${theme.about_page.personalities}` - .title2(style='color:#ac899c') INTP-A + span.author-content-item-title=`${theme.about_page.personalities_name}` + .title2(style='color:#ac899c')=theme.about_page.personalities_type .post-tips | 在 a(href='https://www.16personalities.com/', target='_blank', rel='noopener nofollow') 16personalities @@ -129,22 +143,15 @@ .author-content-item-tips 致谢 span.author-content-item-title 赞赏名单 .author-content-item-description 感谢因为有你们,让我更加有创作的动力。 - each i in site.data.reward - - let rawData = [...i.reward_list] - .reward-list-all - - let reward_list_amount = i.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=rawData[0].datatime)=new Date(rawData[0].datatime).toISOString().slice(0, -14) + each item in theme.about_page.reward + .reward-list-item + .reward-list-item-name=item.name + .reward-list-bottom-group + if item.amount >= 50 + .reward-list-item-money(style='background:#FFC93E')=`¥${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) script. (() => { diff --git a/layout/includes/pagination.pug b/layout/includes/pagination.pug index cc9c3ca..2a0b5f8 100644 --- a/layout/includes/pagination.pug +++ b/layout/includes/pagination.pug @@ -1,7 +1,7 @@ - var options = { - prev_text: '', - next_text: '', + prev_text: '', + next_text: '', mid_size: 1, escape: false } diff --git a/layout/includes/post/post-copyright.pug b/layout/includes/post/post-copyright.pug index 824f782..0cacf14 100644 --- a/layout/includes/post/post-copyright.pug +++ b/layout/includes/post/post-copyright.pug @@ -26,5 +26,5 @@ if theme.post_copyright.enable && page.copyright !== false h 许可协议 .post-copyright-cc-info a.icon(rel='noopener' target='_blank' title='Creative Commons' href='https://creativecommons.org/') - i.fab.fa-creative-commons + i.dys.creativecommons a(rel='noopener' target='_blank' title='CC BY 4.0' href='https://creativecommons.org/licenses/by/4.0/deed.zh') CC BY 4.0 \ No newline at end of file diff --git a/layout/includes/rightside.pug b/layout/includes/rightside.pug index 716f07d..8190809 100644 --- a/layout/includes/rightside.pug +++ b/layout/includes/rightside.pug @@ -20,7 +20,7 @@ mixin rightsideItem(array) when 'toc' if showToc button#mobile-toc-button.close(type="button" title=_p("rightside.toc")) - i.fas.fa-list-ul + i.dys.shujuwj //-when 'chat' if chat_btn button#chat_btn(type="button" title=_p("rightside.chat")) diff --git a/layout/includes/swiper.pug b/layout/includes/swiper.pug new file mode 100644 index 0000000..d486318 --- /dev/null +++ b/layout/includes/swiper.pug @@ -0,0 +1,26 @@ +- var fposts = theme.hometop.featured_posts + +.recent-post-item#swiperBar(style='border:none!important;') + #ark-swiper-container + .swiper-wrapper.dht-swiper-wrapper + each item, i in fposts.posts + //- 内容版块 + .swiper-slide.dht-swiper-item(onclick=`pjax.loadUrl('${url_for(item.link)}')`) + //- 封面 + .dht-swiper-item-cover(onclick=`pjax.loadUrl('${url_for(item.link)}')`) + img.article-cover(src=item.cover title='') + //- 标题和描述 + .dht-swiper-item-info(onclick=`pjax.loadUrl('${url_for(item.link)}')`) + a.dht-swiper-item-title + .dht-swiper-item-title-link= item.title + a.dht-swiper-item-description + .dht-swiper-item-description-text=item.descr + .swiper-scrollbar + .swiper-button-prev + .swiper-button-next + + style. + #ark-swiper-container .swiper-scrollbar-drag { + background: linear-gradient(to left, #ff4500, #ffa500, #ffd700, #90ee90, #0ff, #1e90ff, #9370db, #ff69b4, #ff4500); + box-shadow: 0 0 0 2px #fff + } \ No newline at end of file diff --git a/layout/includes/third-party/comments/index.pug b/layout/includes/third-party/comments/index.pug index 0821ae5..d2c048c 100644 --- a/layout/includes/third-party/comments/index.pug +++ b/layout/includes/third-party/comments/index.pug @@ -3,7 +3,7 @@ hr #post-comment .comment-head .comment-headline - i.fas.fa-comments.fa-fw + i.fas.fa-comments. span= ' ' + _p('comment') if theme.comments.use.length > 1 diff --git a/layout/includes/third-party/search/local-search.pug b/layout/includes/third-party/search/local-search.pug index 895a478..cd5df66 100644 --- a/layout/includes/third-party/search/local-search.pug +++ b/layout/includes/third-party/search/local-search.pug @@ -6,7 +6,7 @@ i.fas.fa-times #loading-database.is-center - i.fas.fa-spinner.fa-pulse + i.dys.spinner3.spin.ani.fa-pulse span= ' ' + _p("search.load_data") .search-wrap diff --git a/layout/includes/third-party/subtitle.pug b/layout/includes/third-party/subtitle.pug index 9236757..cc145d6 100644 --- a/layout/includes/third-party/subtitle.pug +++ b/layout/includes/third-party/subtitle.pug @@ -1,128 +1,36 @@ - const { effect,loop,source,sub,startDelay,typeSpeed,backSpeed } = theme.subtitle - let subContent = sub || new Array() - -case source - when 1 - script. - function subtitleType () { - fetch('https://v1.hitokoto.cn') - .then(response => response.json()) - .then(data => { - if (!{effect}) { - const from = '出自 ' + data.from - const sub = !{JSON.stringify(subContent)} - sub.unshift(data.hitokoto, from) - window.typed = new Typed('#subtitle', { - strings: sub, - startDelay: !{startDelay}, - typeSpeed: !{typeSpeed}, - loop: !{loop}, - backSpeed: !{backSpeed}, - }) - } else { - document.getElementById('subtitle').innerHTML = data.hitokoto - } - }) - } - - if (!{effect}) { - if (typeof Typed === 'function') { - subtitleType() - } else { - getScript('!{url_for(theme.asset.typed)}').then(subtitleType) - } - } else { - subtitleType() - } - - when 2 - script. - function subtitleType () { - getScript('https://yijuzhan.com/api/word.php?m=js').then(() => { - const con = str[0] - if (!{effect}) { - const from = '出自 ' + str[1] - const sub = !{JSON.stringify(subContent)} - sub.unshift(con, from) - window.typed = new Typed('#subtitle', { - strings: sub, - startDelay: !{startDelay}, - typeSpeed: !{typeSpeed}, - loop: !{loop}, - backSpeed: !{backSpeed}, - }) - } else { - document.getElementById('subtitle').innerHTML = con - } - }) - } - - if (!{effect}) { - if (typeof Typed === 'function') { - subtitleType() - } else { - getScript('!{url_for(theme.asset.typed)}').then(subtitleType) - } - } else { - subtitleType() - } - - when 3 - script. - function subtitleType () { - getScript('https://sdk.jinrishici.com/v2/browser/jinrishici.js').then(() => { - jinrishici.load(result =>{ - if (!{effect}) { - const sub = !{JSON.stringify(subContent)} - const content = result.data.content - sub.unshift(content) - window.typed = new Typed('#subtitle', { - strings: sub, - startDelay: !{startDelay}, - typeSpeed: !{typeSpeed}, - loop: !{loop}, - backSpeed: !{backSpeed}, - }) - } else { - document.getElementById('subtitle').innerHTML = result.data.content - } - }) - }) - } - - if (!{effect}) { - if (typeof Typed === 'function') { - subtitleType() - } else { - getScript('!{url_for(theme.asset.typed)}').then(subtitleType) - } - } else { - subtitleType() - } - - default - - subContent = subContent.length ? subContent : new Array(config.subtitle) - script. - function subtitleType () { - if (!{effect}) { - window.typed = new Typed("#subtitle", { - strings: !{JSON.stringify(subContent)}, - startDelay: !{startDelay}, - typeSpeed: !{typeSpeed}, - loop: !{loop}, - backSpeed: !{backSpeed} - }) - } else { - document.getElementById("subtitle").innerHTML = '!{subContent[0]}' - } - } - - if (!{effect}) { - if (typeof Typed === 'function') { - subtitleType() - } else { - getScript('!{url_for(theme.asset.typed)}').then(subtitleType) - } - } else { - subtitleType() - } +- subContent = subContent.length ? subContent : new Array(config.subtitle) +//- script. + function subtitleType () { + if (!{effect}) { + window.typed = new Typed("#subtitle", { + strings: !{JSON.stringify(subContent)}, + startDelay: 10, + typeSpeed: 80, + loop: !{loop}, + showCursor: false, + backSpeed: 70 + }) + } + } + if (!{effect}) { + if (typeof Typed === 'function') { + subtitleType() + } else { + getScript('!{url_for(theme.asset.typed)}').then(subtitleType) + } + } + +script(src="/js/typed.js") +script. + var typed = new Typed("#subtitle", { + strings: !{JSON.stringify(subContent)}, + startDelay: 10, + typeSpeed: 80, + loop: !{loop}, + showCursor: false, + backSpeed: 70 + }); + +//- !{JSON.stringify(subContent)} \ No newline at end of file diff --git a/layout/includes/widget/card_author.pug b/layout/includes/widget/card_author.pug index 49a4b50..7b1fbda 100644 --- a/layout/includes/widget/card_author.pug +++ b/layout/includes/widget/card_author.pug @@ -7,9 +7,10 @@ if theme.aside.card_author.enable .avatar-img img(src=url_for(theme.avatar.img) onerror=`this.onerror=null;this.src='` + url_for(theme.error_img.flink) + `'` alt="avatar") .loading-image-dot + img(src="https://pic.imgdb.cn/item/65032bf5661c6c8e542969ff.webp", alt="") .banner-button-group a.banner-button(href="/about/") - i.fas.fa-circle-chevron-right + i.dys.caozuo-wailian span.banner-button-te xt 了解更多 hrl.line(style="margin-top: 10px") \ No newline at end of file diff --git a/layout/includes/widget/card_post_toc.pug b/layout/includes/widget/card_post_toc.pug index dcd4d93..7995870 100644 --- a/layout/includes/widget/card_post_toc.pug +++ b/layout/includes/widget/card_post_toc.pug @@ -4,12 +4,11 @@ #card-toc.card-widget .item-headline - i.fas.fa-stream + i.dys.categroy span= _p('aside.card_toc') span.toc-percentage if (page.encrypt == true) .toc-content.toc-div-class(class=tocExpandClass style="display:none")!=toc(page.origin, {list_number: tocNumber}) else - .toc-content(class=tocExpandClass)!=toc(page.content, {list_number: tocNumber}) -hrl.line \ No newline at end of file + .toc-content(class=tocExpandClass)!=toc(page.content, {list_number: tocNumber}) \ No newline at end of file diff --git a/layout/includes/widget/card_tags.pug b/layout/includes/widget/card_tags.pug index 7490fc7..b345dbb 100644 --- a/layout/includes/widget/card_tags.pug +++ b/layout/includes/widget/card_tags.pug @@ -2,7 +2,7 @@ if theme.aside.card_tags.enable if site.tags.length .card-widget.card-tags .item-headline - i.fas.fa-tags + i.dys.tag span= _p('aside.card_tags') - let tagLimit = theme.aside.card_tags.limit === 0 ? 0 : theme.aside.card_tags.limit || 40 @@ -10,12 +10,10 @@ if theme.aside.card_tags.enable .card-tag-cloud!= cloudTags({source: site.tags, minfontsize: 1.15, maxfontsize: 1.45, limit: tagLimit, unit: 'em'}) else .card-tag-cloud!= tagcloud({min_font: 1.1, max_font: 1.5, amount: tagLimit , color: true, start_color: '#999', end_color: '#99a9bf', unit: 'em'}) - hrl.line if theme.aside.card_categories.enable if site.categories.length .card-widget.card-categories !=aside_categories({ limit: theme.aside.card_categories.limit === 0 ? 0 : theme.aside.card_categories.limit || 8 , expand: theme.aside.card_categories.expand }) - hrl.line if theme.aside.card_archives.enable .card-widget.card-archives - let type = theme.aside.card_archives.type || 'monthly' diff --git a/layout/includes/widget/card_webinfo.pug b/layout/includes/widget/card_webinfo.pug index 105b0a0..f9d04c3 100644 --- a/layout/includes/widget/card_webinfo.pug +++ b/layout/includes/widget/card_webinfo.pug @@ -1,32 +1,32 @@ .card-widget.card-webinfo - .item-headline - i.fas.fa-chart-line.fa-bounce + .item-headline(style='width:fit-content;margin:auto;') + i.dys.shujukanban(style='font-size:20px;margin-right:5px') span= _p('aside.card_webinfo.headline') .webinfo .webinfo-item .item-name - i.fas.fa-folder-open.fa-beat + i.dys.-disk(style='font-size:20px') .text 文章总数 .item-count= site.posts.length .webinfo-item .item-name - i.fas.fa-eye.fa-shake + i.dys.view(style='font-size:20px') .text 总访问量 .item-count#busuanzi_value_site_pv .webinfo-item .item-name - i.fas.fa-user.fa-shake + i.dys.groupico(style='font-size:20px') .text 访问人次 .item-count#busuanzi_value_site_uv .webinfo-item .item-name - i.fas.fa-pen-to-square.fa-beat + i.dys.postico(style='font-size:20px') .text 全站字数 .item-count=totalcount(site) .webinfo-item .item-name - i.fas.fa-upload.fa-shake + i.dys.upload(style='font-size:20px') .text 最后更新 .item-count#last-push-date(data-lastPushDate=date_xml(Date.now())) - i.fa-solid.fa-spinner.fa-spin + i.dys.spinner3.spin.ani diff --git a/layout/includes/widget/index.pug b/layout/includes/widget/index.pug index a89c1a6..90e731f 100644 --- a/layout/includes/widget/index.pug +++ b/layout/includes/widget/index.pug @@ -14,7 +14,7 @@ else #card-toc.card-widget .item-headline - i.fas.fa-stream + i.dys.categroy span 抱歉,该文章无目录 hrl.line !=partial('includes/widget/card_tags', {}, {cache: true}) diff --git a/scripts/helpers/aside_archives.js b/scripts/helpers/aside_archives.js index 779c1d4..466e67a 100644 --- a/scripts/helpers/aside_archives.js +++ b/scripts/helpers/aside_archives.js @@ -69,7 +69,7 @@ hexo.extend.helper.register('aside_archives', function (options = {}) { const len = data.length const Judge = limit === 0 ? len : Math.min(len, limit) - result += `
${this._p('aside.card_archives')}` + result += `
${this._p('aside.card_archives')}` if (len > Judge) { result += ` diff --git a/scripts/helpers/aside_categories.js b/scripts/helpers/aside_categories.js index 0e60b8e..3ac327d 100644 --- a/scripts/helpers/aside_categories.js +++ b/scripts/helpers/aside_categories.js @@ -87,7 +87,7 @@ hexo.extend.helper.register('aside_categories', function (categories, options) { } return `
- + ${this._p('aside.card_categories')} ${moreButton()}
diff --git a/scripts/helpers/random.js b/scripts/helpers/random.js index 47c8f55..8a4e3ae 100644 --- a/scripts/helpers/random.js +++ b/scripts/helpers/random.js @@ -9,19 +9,7 @@ hexo.extend.generator.register('random', function (locals) { data: `var posts=${JSON.stringify(posts)}; function toRandomPost() { window.open('/'+posts[Math.floor(Math.random() * posts.length)],"_self"); - new Vue({ - data: function () { - this.$notify({ - title: "跳转中", - message: "前往随机文章", - position: 'top-left', - offset: 50, - showClose: true, - type: "success", - duration: 4000 - }); - } - }); + nav.randompost() };` } }) \ No newline at end of file diff --git a/scripts/helpers/related_post.js b/scripts/helpers/related_post.js index 6809ac7..c6f3671 100644 --- a/scripts/helpers/related_post.js +++ b/scripts/helpers/related_post.js @@ -46,7 +46,7 @@ hexo.extend.helper.register('related_posts', function (currentPost, allPosts) { if (relatedPosts.length > 0) { result += '