From 40ba3bb92f8f1aa710e8bac28f01564b93917674 Mon Sep 17 00:00:00 2001 From: Jerry <16351105+jerryc127@users.noreply.github.com> Date: Sun, 26 Apr 2020 23:42:52 +0800 Subject: [PATCH] =?UTF-8?q?:label:=20=E6=9B=B4=E6=96=B02.3.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 - README_CN.md | 4 - languages/zh-TW.yml | 9 -- layout/404.pug | 6 - layout/includes/additional-js.pug | 6 +- layout/includes/head.pug | 11 +- layout/includes/head/subtitle.pug | 192 +++++++++++++------------ layout/includes/header/header.pug | 11 -- layout/includes/header/index.pug | 4 - layout/includes/header/post-info.pug | 8 -- layout/includes/layout.pug | 14 +- layout/includes/mixins/post-ui.pug | 9 -- layout/includes/recent-posts.pug | 67 --------- layout/includes/widget/card_author.pug | 4 - layout/includes/widget/index.pug | 4 - package.json | 5 - scripts/filters/post-lazyload.js | 29 ---- scripts/helpers/list-archives.js | 103 ------------- source/css/_global/index.styl | 33 +---- source/css/_layout/head.styl | 15 +- source/js/main.js | 34 ----- 21 files changed, 108 insertions(+), 464 deletions(-) delete mode 100644 layout/includes/recent-posts.pug delete mode 100644 scripts/filters/post-lazyload.js delete mode 100644 scripts/helpers/list-archives.js diff --git a/README.md b/README.md index 1a71d2d..fdcdc58 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,6 @@ # hexo-theme-butterfly -<<<<<<< HEAD -Version -======= Version ->>>>>>> dev Author Hexo node.js diff --git a/README_CN.md b/README_CN.md index 408c4b8..2357f7e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,10 +1,6 @@ # hexo-theme-butterfly -<<<<<<< HEAD -Version -======= Version ->>>>>>> dev Author Hexo node.js diff --git a/languages/zh-TW.yml b/languages/zh-TW.yml index da12658..95cb5d3 100644 --- a/languages/zh-TW.yml +++ b/languages/zh-TW.yml @@ -67,11 +67,7 @@ aside: card_webinfo: headline: 網站資訊 article_name: 文章數目 -<<<<<<< HEAD - runtime_name: 已運行時間 -======= runtime_name: 已執行時間 ->>>>>>> dev site_wordcount: 本站總字數 site_uv_name: 本站訪客數 site_pv_name: 本站總訪問量 @@ -84,13 +80,8 @@ bookmark: rightside: readmode_title: 閱讀模式 -<<<<<<< HEAD - font_plus_title: 放大字體 - font_minus_title: 縮小字體 -======= font_plus_title: 放大字型 font_minus_title: 縮小字型 ->>>>>>> dev translate_title: 簡繁轉換 night_mode_title: 夜間模式 back_to_top: 回到頂部 diff --git a/layout/404.pug b/layout/404.pug index 73e6140..b6c2d8c 100644 --- a/layout/404.pug +++ b/layout/404.pug @@ -20,11 +20,5 @@ html(lang=config.language data-theme=theme.display_mode) h1#error_title= '404' #error_subtitle= theme.error_404.subtitle include includes/rightside.pug -<<<<<<< HEAD - include includes/search/index.pug - each item in theme.CDN_USE.js - script(src=url_for(item)) -======= !=partial('includes/search/index', {}, {cache:theme.fragment_cache}) ->>>>>>> dev include includes/additional-js.pug diff --git a/layout/includes/additional-js.pug b/layout/includes/additional-js.pug index 66c9ddb..57ec278 100644 --- a/layout/includes/additional-js.pug +++ b/layout/includes/additional-js.pug @@ -66,13 +66,9 @@ if theme.mermaid.enable include ./math/mermaid.pug if is_home() -<<<<<<< HEAD - include ./head/subtitle.pug -======= include ./head/subtitle.pug !=fragment_cache('injectBottom', function(){return injectHtml(theme.inject.bottom)}) if theme.preloader - !=partial('includes/loading/loading-js', {}, {cache:theme.fragment_cache}) ->>>>>>> dev + !=partial('includes/loading/loading-js', {}, {cache:theme.fragment_cache}) \ No newline at end of file diff --git a/layout/includes/head.pug b/layout/includes/head.pug index bd73505..92a66d5 100644 --- a/layout/includes/head.pug +++ b/layout/includes/head.pug @@ -10,16 +10,10 @@ - var isSubtitle = config.subtitle ? ' - ' + config.subtitle : '' - var tabTitle = is_home() || !pageTitle ? config.title + isSubtitle : pageTitle + ' | ' + config.title -<<<<<<< HEAD -- var pageDescription = page.description || page.title || config.description -- var pageKeywords -- if (page.tags && page.tags.data) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',') -======= - var pageDescription = page_description() - var pageKeywords - if (page.keywords) pageKeywords = Array.isArray(page.keywords) ? (page.keywords).join(',') : ([]).join(',') || page.keywords - else if (page.tags && page.tags.length) pageKeywords = page.tags.data.map(function(tag) {return tag.name;}).join(',') ->>>>>>> dev - else pageKeywords = Array.isArray(config.keywords) ? (config.keywords).join(','): ([]).join(',') || config.keywords - var pageAuthor = config.email ? config.author + ',' + config.email : config.author - var pageCopyright = config.copyright || config.author @@ -106,8 +100,5 @@ if theme.blog_title_font.font_link include ./head/config_site.pug include ./head/noscript.pug -<<<<<<< HEAD -======= -!=fragment_cache('injectHead', function(){return injectHtml(theme.inject.head)}) ->>>>>>> dev +!=fragment_cache('injectHead', function(){return injectHtml(theme.inject.head)}) \ No newline at end of file diff --git a/layout/includes/head/subtitle.pug b/layout/includes/head/subtitle.pug index b216f0c..e3be0dc 100644 --- a/layout/includes/head/subtitle.pug +++ b/layout/includes/head/subtitle.pug @@ -7,103 +7,117 @@ if theme.subtitle.enable if source == '1' script. - var subtitleEffect = !{subtitleEffect} - fetch('https://api.ooopn.com/ciba/api.php',) - .then(function (res){ - return res.json(); - }) - .then(function (data) { - if (subtitleEffect){ - var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(","); - var both = sub.unshift(data['ciba-en'],data.ciba) - var typed = new Typed("#subtitle", { - strings: sub, - startDelay: 300, - typeSpeed: 150, - loop: !{theme.subtitle.loop}, - backSpeed: 50 - }); - }else{ - document.getElementById("subtitle").innerHTML = data['ciba-en'] - } - }) - .catch(function (err) { - console.error(err); - }) + var subtitleType = function () { + var subtitleEffect = !{ subtitleEffect } + fetch('https://api.btstu.cn/yan/api.php?charset=utf-8&encode=json',) + .then(function (res) { + return res.json() + }) + .then(function (data) { + if (subtitleEffect) { + var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(',') + var both = sub.unshift(data.text) + var typed = new Typed('#subtitle', { + strings: sub, + startDelay: 300, + typeSpeed: 150, + loop: !{theme.subtitle.loop}, + backSpeed: 50, + }) + } else { + document.getElementById('subtitle').innerHTML = data.text + } + }) + .catch(function (err) { + console.error(err) + }) + } + window.addEventListener('load', subtitleType) else if source == '2' script. - var subtitleEffect = !{subtitleEffect} - fetch('https://v1.hitokoto.cn') - .then(function (res){ - return res.json(); - }) - .then(function (data) { - if (subtitleEffect){ - var from = '出自 ' + data.from - var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(","); - var both = sub.unshift(data.hitokoto,from) - var typed = new Typed("#subtitle", { - strings: sub, - startDelay: 300, - typeSpeed: 150, - loop: !{theme.subtitle.loop}, - backSpeed: 50 - }); - }else{ - document.getElementById("subtitle").innerHTML = data.hitokoto - } - }) - .catch(function (err) { - console.error(err); - }) - - else if source == "3" - script(type="text/javascript" src="http://yijuzhan.com/api/word.php?m=js") - script. - var subtitleEffect = !{subtitleEffect} - var con = str[0]; - if (subtitleEffect){ - var from = "出自 " + str[1]; - var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(","); - var both = sub.unshift(con,from) - var typed = new Typed("#subtitle", { - strings: sub, - startDelay: 300, - typeSpeed: 150, - loop: !{theme.subtitle.loop}, - backSpeed: 50 - }); - }else{ - document.getElementById("subtitle").innerHTML = con + var subtitleType = function () { + var subtitleEffect = !{ subtitleEffect } + fetch('https://v1.hitokoto.cn') + .then(function (res) { + return res.json() + }) + .then(function (data) { + if (subtitleEffect) { + var from = '出自 ' + data.from + var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(',') + var both = sub.unshift(data.hitokoto, from) + var typed = new Typed('#subtitle', { + strings: sub, + startDelay: 300, + typeSpeed: 150, + loop: !{theme.subtitle.loop}, + backSpeed: 50, + }) + } else { + document.getElementById('subtitle').innerHTML = data.hitokoto + } + }) + .catch(function (err) { + console.error(err) + }) } + window.addEventListener('load', subtitleType) + + else if source == '3' + script. + var subtitleType = function () { + loadScript('http://yijuzhan.com/api/word.php?m=js', function () { + var subtitleEffect = !{ subtitleEffect } + var con = str[0] + if (subtitleEffect) { + var from = '出自 ' + str[1] + var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(',') + var both = sub.unshift(con, from) + var typed = new Typed('#subtitle', { + strings: sub, + startDelay: 300, + typeSpeed: 150, + loop: !{theme.subtitle.loop}, + backSpeed: 50, + }) + } else { + document.getElementById('subtitle').innerHTML = con + } + }) + } + window.addEventListener('load', subtitleType) else if source == '4' - script(type="text/javascript" src="https://sdk.jinrishici.com/v2/browser/jinrishici.js" charset="utf-8") script. - var subtitleEffect = !{subtitleEffect} - jinrishici.load(function(result) { - if (subtitleEffect){ - var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(","); - var content = result.data.content; - var both = sub.unshift(content) - var typed = new Typed("#subtitle", { - strings: sub, - startDelay: 300, - typeSpeed: 150, - loop: !{theme.subtitle.loop}, - backSpeed: 50 - }); - }else{ - document.getElementById("subtitle").innerHTML = result.data.content - } - }) + var subtitleType = function () { + loadScript('https://sdk.jinrishici.com/v2/browser/jinrishici.js',function () { + var subtitleEffect = !{ subtitleEffect } + jinrishici.load(function (result) { + if (subtitleEffect) { + var sub = '!{theme.subtitle.sub}'.length == 0 ? new Array() : '!{theme.subtitle.sub}'.split(',') + var content = result.data.content + var both = sub.unshift(content) + var typed = new Typed('#subtitle', { + strings: sub, + startDelay: 300, + typeSpeed: 150, + loop: !{theme.subtitle.loop}, + backSpeed: 50, + }) + } else { + document.getElementById('subtitle').innerHTML = result.data.content + } + }) + } + ) + } + window.addEventListener('load', subtitleType) else - - var subtitle = theme.subtitle.sub[0] script. var subtitleEffect = !{subtitleEffect} - if (subtitleEffect){ + if (subtitleEffect) { var typed = new Typed("#subtitle", { strings: '!{theme.subtitle.sub}'.split(","), startDelay: 300, @@ -111,6 +125,6 @@ if theme.subtitle.enable loop: !{theme.subtitle.loop}, backSpeed: 50 }) - }else{ - document.getElementById("subtitle").innerHTML = '!{subtitle}' - } + } else { + document.getElementById("subtitle").innerHTML = '!{theme.subtitle.sub[0]}' + } diff --git a/layout/includes/header/header.pug b/layout/includes/header/header.pug index 6fc23e5..3737e76 100644 --- a/layout/includes/header/header.pug +++ b/layout/includes/header/header.pug @@ -8,16 +8,6 @@ a.site-page.social-icon.search i.fa.fa-search.fa-fw span=' '+_p('search') -<<<<<<< HEAD - .menus_items - include ./menu_item.pug - - span.toggle-menu.close - a.site-page - i.fa.fa-bars.fa-fw(aria-hidden="true") - - -======= !=fragment_cache('menus', function(){return partial('includes/header/menu_item')}) span.toggle-menu.close @@ -25,4 +15,3 @@ i.fa.fa-bars.fa-fw(aria-hidden="true") ->>>>>>> dev diff --git a/layout/includes/header/index.pug b/layout/includes/header/index.pug index 727eb51..2c6ede4 100644 --- a/layout/includes/header/index.pug +++ b/layout/includes/header/index.pug @@ -33,11 +33,7 @@ if theme.douban span#subtitle if(theme.social) #site_social_icons -<<<<<<< HEAD - !=partial('includes/header/social', {}, {cache:theme.fragment_cache}) -======= !=fragment_cache('social', function(){return partial('includes/header/social')}) ->>>>>>> dev #scroll_down i.fa.fa-angle-down.scroll-down-effects else if is_post() diff --git a/layout/includes/header/post-info.pug b/layout/includes/header/post-info.pug index b5d066d..7bee8bc 100644 --- a/layout/includes/header/post-info.pug +++ b/layout/includes/header/post-info.pug @@ -69,22 +69,14 @@ span.disqus-comment-count.comment-count a(href=full_url_for(page.path) + '#disqus_thread') else if (theme.valine && theme.valine.enable && theme.valine.count && page.comments !== false) -<<<<<<< HEAD - if (theme.busuanzi && theme.busuanzi.page_pv) -======= if (postWordcount || theme.busuanzi.page_pv) ->>>>>>> dev span.post-meta__separator | i.post-meta__icon(class=commentCount aria-hidden="true") span= _p('post.comments') + ':' a(href=url_for(page.path) + '#post-comment' itemprop="discussionUrl") span.valine-comment-count.comment-count(data-xid=url_for(page.path) itemprop="commentCount") else if (theme.gitalk && theme.gitalk.enable && theme.gitalk.count && page.comments !== false) -<<<<<<< HEAD - if (theme.busuanzi && theme.busuanzi.page_pv) -======= if (postWordcount || theme.busuanzi.page_pv) ->>>>>>> dev span.post-meta__separator | i.post-meta__icon(class=commentCount aria-hidden="true") span= _p('post.comments') + ':' diff --git a/layout/includes/layout.pug b/layout/includes/layout.pug index fc13c50..134b02f 100644 --- a/layout/includes/layout.pug +++ b/layout/includes/layout.pug @@ -41,17 +41,5 @@ html(lang=config.language data-theme=theme.display_mode) !=partial('includes/footer', {}, {cache:theme.fragment_cache}) include ./rightside.pug - !=partial('includes/search/index', {}, {cache:theme.fragment_cache}) -<<<<<<< HEAD - - each item in theme.CDN_USE.js - script(src=url_for(item)) - - include ./additional-js.pug - - - -======= - include ./additional-js.pug ->>>>>>> dev + include ./additional-js.pug \ No newline at end of file diff --git a/layout/includes/mixins/post-ui.pug b/layout/includes/mixins/post-ui.pug index 940d622..4cca5ce 100644 --- a/layout/includes/mixins/post-ui.pug +++ b/layout/includes/mixins/post-ui.pug @@ -62,16 +62,7 @@ mixin postUI(posts) .content!= expert else .content!= article.description -<<<<<<< HEAD:layout/includes/mixins/UI.pug - - if theme.ad && theme.ad.index - if (index + 1) % 3 == 0 - .recent-post-item.ad_height!=theme.ad.index - - - }) -======= if theme.ad && theme.ad.index if (index + 1) % 3 == 0 .recent-post-item.ad_height!=theme.ad.index ->>>>>>> dev:layout/includes/mixins/post-ui.pug diff --git a/layout/includes/recent-posts.pug b/layout/includes/recent-posts.pug deleted file mode 100644 index 46fb9de..0000000 --- a/layout/includes/recent-posts.pug +++ /dev/null @@ -1,67 +0,0 @@ -each article , index in page.posts.data - .recent-post-item - - var link = article.link || article.path - - var title = article.title || _p('no_title') - - var leftOrRight = index%2 == 0 ? 'left_radius' : 'right_radius' - - var post_cover = article.cover - - var no_cover = article.cover === false || !theme.cover.index_enable ? 'no-cover' : '' - if post_cover && theme.cover.index_enable - .post_cover(class=leftOrRight) - a(href=url_for(link) title=title) - if theme.lazyload.enable - img.post_bg.lazyload(data-src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title) - else - img.post_bg(src=`${post_cover}` onerror=`this.onerror=null;this.src='`+ url_for(theme.lodding_bg.post_page) + `'` alt=title) - .recent-post-info(class=no_cover) - a.article-title(href=url_for(link) title=title)= title - .article-meta-wrap - if (article.top) - span.article-meta - i.fa.fa-thumb-tack.article-meta__icon.sticky - span.sticky= _p('sticky') - span.article-meta__separator | - if (theme.post_meta.page.date_type) - if (theme.post_meta.page.date_type === 'both') - time.post-meta__date - span.post-meta__date-created(title=_p('post.created') + ' ' + full_date(article.date)) - i.fa.fa-calendar(aria-hidden="true") - =date(article.date, config.date_format) - span.article-meta__separator | - span.post-meta__date-updated(title=_p('post.updated') + ' ' + full_date(article.updated)) - i.fa.fa-history(aria-hidden="true") - =date(article.updated, config.date_format) - else - - var data_type_updated = theme.post_meta.page.date_type === 'updated' - - var date_type = data_type_updated ? 'updated' : 'date' - - var date_icon = data_type_updated ? 'fa-history' :'fa-calendar' - - var date_title = data_type_updated ? _p('post.updated') : _p('post.created') - time.post-meta__date(title=date_title + ' ' + full_date(article[date_type])) - i.fa(class=date_icon aria-hidden="true") - =date(article[date_type], config.date_format) - if (theme.post_meta.page.categories && article.categories.data.length > 0) - span.article-meta - span.article-meta__separator | - each item, index in article.categories.data - i.fa.fa-inbox.article-meta__icon(aria-hidden="true") - a(href=url_for(item.path)).article-meta__categories #[=item.name] - if (index < article.categories.data.length - 1) - i.fa.fa-angle-right(aria-hidden="true") - if (theme.post_meta.page.tags && article.tags.data.length > 0) - span.article-meta.tags - span.article-meta__separator | - each item, index in article.tags.data - i.fa.fa-tag.article-meta__icon(aria-hidden="true") - a(href=url_for(item.path)).article-meta__tags #[=item.name] - if (index < article.tags.data.length - 1) - span.article-meta__link - - if theme.auto_excerpt && theme.auto_excerpt.enable - - const content = strip_html(article.content) - - let expert = content.substring(0, theme.auto_excerpt.length) - - content.length > theme.auto_excerpt.length ? expert += ' ...' : '' - .content!= expert - else - .content!= article.description - - if theme.ad && theme.ad.index - if (index + 1) % 3 == 0 - .recent-post-item.ad_height!=theme.ad.index diff --git a/layout/includes/widget/card_author.pug b/layout/includes/widget/card_author.pug index 7588da4..3cae470 100644 --- a/layout/includes/widget/card_author.pug +++ b/layout/includes/widget/card_author.pug @@ -31,8 +31,4 @@ if(theme.social) .card-info-social-icons.is-center -<<<<<<< HEAD - include ../header/social.pug -======= !=fragment_cache('social', function(){return partial('includes/header/social')}) ->>>>>>> dev diff --git a/layout/includes/widget/index.pug b/layout/includes/widget/index.pug index 61d8c48..f37e6c5 100644 --- a/layout/includes/widget/index.pug +++ b/layout/includes/widget/index.pug @@ -9,11 +9,7 @@ if theme.aside.enable !=partial('includes/widget/card_recent_post', {}, {cache:theme.fragment_cache}) if theme.ad && theme.ad.aside !=partial('includes/widget/card_ad', {}, {cache:theme.fragment_cache}) -<<<<<<< HEAD - if theme.aside.card_categories -======= if theme.aside.card_categories.enable ->>>>>>> dev !=partial('includes/widget/card_categories', {}, {cache:theme.fragment_cache}) if theme.aside.card_tags.enable !=partial('includes/widget/card_tags', {}, {cache:theme.fragment_cache}) diff --git a/package.json b/package.json index 26f0b9b..a962bf1 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,5 @@ { "name": "hexo-theme-butterfly", -<<<<<<< HEAD - "version": "2.2.5", - "description": "A Hexo Theme: Butterfly" -======= "version": "2.3.0", "private": true, "engines": { @@ -19,5 +15,4 @@ "repository": "https://github.com/jerryc127/hexo-theme-butterfly.git", "author": "Jerry ", "license": "MIT" ->>>>>>> dev } \ No newline at end of file diff --git a/scripts/filters/post-lazyload.js b/scripts/filters/post-lazyload.js deleted file mode 100644 index c0a6624..0000000 --- a/scripts/filters/post-lazyload.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; - -const url_for = require('hexo-util').url_for.bind(hexo); - -function lazyProcess(htmlContent) { - var bg = url_for(hexo.theme.config.lodding_bg.post); - return htmlContent.replace(//gi, (str, p1, p2, p3) => { - if (/data-src/gi.test(str)) { - return str; - } - if (/class="(.*?)"/gi.test(str)){ - str = str.replace(/class="(.*?)"/gi, (classStr, p1) => { - return classStr.replace(p1, `${p1} lazyload`); - }) - str = str.replace(p2, `${bg}`) - return str.replace('>', ` data-src="${p2}">`); - } - str = str.replace(p2, `${bg}`) - return str.replace(p3, ` class="lazyload" data-src="${p2}" ${p3}`); - }); -} - -var processPost = function(data) { - if (!hexo.theme.config.lazyload.enable) return; - data.content = lazyProcess.call(this, data.content); - return data; -}; - -hexo.extend.filter.register('after_post_render', processPost); \ No newline at end of file diff --git a/scripts/helpers/list-archives.js b/scripts/helpers/list-archives.js deleted file mode 100644 index 534d4fe..0000000 --- a/scripts/helpers/list-archives.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; - -hexo.extend.helper.register("list_archives", function(options = {}) { - const { config } = this; - const archiveDir = config.archive_dir; - const { timezone } = config; - const lang = this.page.lang || this.page.language || config.language; - let { format } = options; - const type = options.type || "monthly"; - const { style = "list", transform, separator = ", " } = options; - const showCount = Object.prototype.hasOwnProperty.call(options, "show_count") - ? options.show_count - : true; - const order = options.order || -1; - const limit = 8; - let result = ""; - - var more_button; - if (lang === "zh-CN") { - more_button = "查看更多"; - } else if (lang === "zh-TW") { - more_button = "查看更多"; - } else { - more_button = "More"; - } - - if (!format) { - format = type === "monthly" ? "MMMM YYYY" : "YYYY"; - } - - const posts = this.site.posts.sort("date", order); - if (!posts.length) return result; - - const data = []; - let length = 0; - - posts.forEach(post => { - // Clone the date object to avoid pollution - let date = post.date.clone(); - - if (timezone) date = date.tz(timezone); - if (lang) date = date.locale(lang); - - const year = date.year(); - const month = date.month() + 1; - const name = date.format(format); - const lastData = data[length - 1]; - - if (!lastData || lastData.name !== name) { - length = data.push({ - name, - year, - month, - count: 1 - }); - } else { - lastData.count++; - } - }); - - const link = item => { - let url = `${archiveDir}/${item.year}/`; - - if (type === "monthly") { - if (item.month < 10) url += "0"; - url += `${item.month}/`; - } - - return this.url_for(url); - }; - - result += `"; - return result; -}); diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index 1ba9649..834e24a 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -192,13 +192,10 @@ img:not([src]) .img-alt margin: -.5rem 0 .5rem -<<<<<<< HEAD -======= color: $font-black &:hover text-decoration: none !important ->>>>>>> dev // hexo tag video .video-container @@ -222,11 +219,7 @@ img:not([src]) font-size: 20px .post-ad -<<<<<<< HEAD - margin: 2rem 0 !important -======= margin: 2rem 0 ->>>>>>> dev .ad_height display: block !important @@ -239,11 +232,6 @@ img:not([src]) #nav animation: nav-effect 1s -<<<<<<< HEAD -// #page-header -// animation: header-effect 1s -======= ->>>>>>> dev #site_title, #site_subtitle animation: titlescale 1s @@ -284,14 +272,10 @@ if hexo-config('avatar.effect') == true animation: tocsidebarRtoL .4s .sidebar-toc__progress -<<<<<<< HEAD - animation: tocsidebarRtoL .7s -======= animation: tocsidebarRtoL .6s ->>>>>>> dev .sidebar-toc__content - animation: tocsidebarRtoL .9s + animation: tocsidebarRtoL .7s @keyframes scroll-down-effect 0% @@ -315,21 +299,6 @@ if hexo-config('avatar.effect') == true opacity: 1 transform: translateY(0) -<<<<<<< HEAD -@keyframes header-effect - 0% - opacity: 0 - - 60% - opacity: 0 - transform: translateY(-30px) - - 100% - opacity: 1 - transform: translateY(0) - -======= ->>>>>>> dev @keyframes headerNoOpacity 0% transform: translateY(-50px) diff --git a/source/css/_layout/head.styl b/source/css/_layout/head.styl index a8d9f3d..8a92ab5 100644 --- a/source/css/_layout/head.styl +++ b/source/css/_layout/head.styl @@ -246,24 +246,15 @@ content: '' li -<<<<<<< HEAD - padding: 1px 10px list-style: none - text-align: center -======= - list-style: none ->>>>>>> dev &:hover background: $theme-color a -<<<<<<< HEAD -======= display: inline-block padding: .3rem .7rem width: 100% ->>>>>>> dev color: $font-black text-shadow: none @@ -321,13 +312,9 @@ .post-meta-pv-cv .post-meta__separator:first-child -<<<<<<< HEAD - display: none -======= display: none if !hexo-config('busuanzi.page_pv') .post-meta-commentcount .post-meta__separator - display: none ->>>>>>> dev + display: none \ No newline at end of file diff --git a/source/js/main.js b/source/js/main.js index cc233ed..8f05040 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -263,29 +263,11 @@ $(function () { /** * 代碼收縮 */ -<<<<<<< HEAD - const $highlightTools = $('.highlight-tools') - if (isHighlightShrink === 'true') { - $highlightTools.append('') - } else if (isHighlightShrink === 'false') { - $highlightTools.append('') - } - - $(document).on('click', '.highlight-tools >.code-expand', function () { - var $table = $(this).parent().next() - if ($(this).hasClass('code-closed')) { - $table.css('display', 'block') - $(this).removeClass('code-closed') - } else { - $table.css('display', 'none') - $(this).addClass('code-closed') -======= const $highlightTools = $('.highlight-tools') if (isHighlightShrink === 'true') { $highlightTools.append('') } else if (isHighlightShrink === 'false') { $highlightTools.append('') ->>>>>>> dev } $(document).on('click', '.highlight-tools >.code-expand', function () { @@ -790,21 +772,5 @@ $(function () { } } }) -<<<<<<< HEAD - }) - - function addPhotoFigcaption () { - var images = $('#article-container img') - images.each(function (i, o) { - var $this = $(o) - if ($this.attr('alt')) { - var t = $('
' + $this.attr('alt') + '
') - $this.after(t) - } - }) } - if (GLOBAL_CONFIG.isPhotoFigcaption) addPhotoFigcaption() -======= - } ->>>>>>> dev })