diff --git a/_config.yml b/_config.yml index 7d88e97e..8c0855cb 100644 --- a/_config.yml +++ b/_config.yml @@ -12,24 +12,21 @@ menu: text: 主页 url: / archives: - url: /archives + url: /archives/ tags: - url: /tags + url: /tags/ th-list: text: Categories - url: /categories + url: /categories/ + address-card: + text: About Me + url: /about/ github: - url: https://github.com/yscoder + url: https://github.com/rebill target: _blank - weibo: - url: http://www.weibo.com/ysweb - target: _blank - link: - text: 测试 - url: /custom # 你的头像url -avatar: /img/avatar.jpg +avatar: /img/avatar.jpeg # avatar link avatar_link: / # 头像背景图 @@ -38,7 +35,7 @@ brand: /img/brand.jpg favicon: /favicon.ico # email -email: 634206017@qq.com +email: rebill#qq.com # 设置 Android L Chrome 浏览器状态栏颜色 color: '#3F51B5' @@ -63,7 +60,7 @@ share: true # 是否开启打赏,关闭 reward: false reward: - title: 谢谢大爷~ + title: 如果觉得文章对您有用,请打赏二两银子~ wechat: /img/wechat.jpg #微信,关闭设为 false alipay: /img/alipay.jpg #支付宝,关闭设为 false @@ -79,7 +76,7 @@ toc: list_number: true # 是否显示数字排序 # 文章页留言内容,hexo中所有变量及辅助函数等均可调用,具体请查阅 hexo.io -postMessage: 这里可以写作者留言,标签和 hexo 中所有变量及辅助函数等均可调用,示例:<%- page.permalink.replace(/index\.html$/, '') %> +postMessage: 原始链接:<%- page.permalink.replace(/index\.html$/, '') %> # 站长统计,如要开启,输入CNZZ站点id,如 cnzz: 1255152447 cnzz: false @@ -109,12 +106,12 @@ disqus_shortname: false # 是否开启友言评论, 填写友言用户id uyan_uid: false # 是否使用 gitment,https://github.com/imsun/gitment -gitment: false -# gitment: -# owner: -# repo: -# client_id: -# client_secret: +# gitment: false +gitment: + owner: rebill + repo: rebill.github.com + client_id: c36ea7b3876663d5fe00 + client_secret: 6410167bbc446b05c6a7e1a7c9482cc87791e2f0 # Valine Comment system. https://valine.js.org valine: @@ -140,10 +137,10 @@ hyper_id: false canonical: false # 版权起始年份 -since_year: 2015 +since_year: 2018 # 用户页面中作者相关的描述性文字,如不需要设为 false -about: 用户页面中作者相关的描述性文字,如不需要设为 false +about: false # “不蒜子”访问量统计,详见 http://ibruce.info/2015/04/04/busuanzi/ visit_counter: @@ -151,13 +148,13 @@ visit_counter: site_pv: 站点总访问量: # 动态定义title -title_change: - normal: (つェ⊂)咦!又好了! - leave: 死鬼去哪里了! +title_change: false +# normal: (つェ⊂)咦!又好了! +# leave: 死鬼去哪里了! # 设置为 true 发布后将使用 unpkg cdn 最新的主题样式 # 如果想让你的自定义样式生效,把此项设为 false -cdn: true +cdn: false # 设置为 true 将使用 lightbox render 图片 lightbox: true diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 4dff0620..7eb2ce56 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -29,7 +29,7 @@ title = (theme.tags_title || 'Tags') + ': ' + page.tag; } %> - <% if (title){ %><%= title %> | <% } %><%= config.title %><% if (config.subtitle){ %> | <%= config.subtitle %><% } %> + <% if (title) { %><%= title %><% } else { %><%= config.title %><% if (config.subtitle){ %> | <%= config.subtitle %><% } %><% } %> <% if(theme.color){ %> diff --git a/layout/_partial/plugins/gitment.ejs b/layout/_partial/plugins/gitment.ejs index 4abb2b8e..262942ce 100755 --- a/layout/_partial/plugins/gitment.ejs +++ b/layout/_partial/plugins/gitment.ejs @@ -2,9 +2,10 @@
- + + <% } %> <%- partial('plugins/dynamic-title') %> diff --git a/source/img/alipay.jpg b/source/img/alipay.jpg index a8047f5d..b8f5b137 100644 Binary files a/source/img/alipay.jpg and b/source/img/alipay.jpg differ diff --git a/source/img/avatar.jpeg b/source/img/avatar.jpeg new file mode 100644 index 00000000..5803b6be Binary files /dev/null and b/source/img/avatar.jpeg differ diff --git a/source/img/avatar.jpg b/source/img/avatar.jpg deleted file mode 100644 index ee18364b..00000000 Binary files a/source/img/avatar.jpg and /dev/null differ diff --git a/source/img/wechat.jpg b/source/img/wechat.jpg index 6c49d42e..1ac9be3a 100644 Binary files a/source/img/wechat.jpg and b/source/img/wechat.jpg differ diff --git a/source/js/main.js b/source/js/main.js index f07b28e2..2555c140 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -240,8 +240,8 @@ $('#search').addEventListener(even, toggleSearch); }, reward: function () { - var modal = new this.modal('#reward'); - $('#rewardBtn').addEventListener(even, modal.toggle); + // var modal = new this.modal('#reward'); + // $('#rewardBtn').addEventListener(even, modal.toggle); var $rewardToggle = $('#rewardToggle'); var $rewardCode = $('#rewardCode'); diff --git a/source/js/main.min.js b/source/js/main.min.js index 5d5447de..aa703e02 100644 --- a/source/js/main.min.js +++ b/source/js/main.min.js @@ -1 +1 @@ -!function(t,e){var s=e.body,n=e.querySelector.bind(e),a=e.querySelectorAll.bind(e),o=n("html"),c=n("#gotop"),l=n("#menu"),r=n("#header"),d=n("#mask"),h=n("#menu-toggle"),f=n("#menu-off"),u=n("#loading"),m=t.requestAnimationFrame,v=12,g=Array.prototype.forEach,p="ontouchstart"in t&&/Mobile|Android|iOS|iPhone|iPad|iPod|Windows Phone|KFAPWI/i.test(navigator.userAgent)?"touchstart":"click",L=/micromessenger/i.test(navigator.userAgent),y=function(){},w=function(t){var e=t.offsetLeft,i=t.offsetTop;if(t.offsetParent){var s=arguments.callee(t.offsetParent);e+=s.x,i+=s.y}return{x:e,y:i}},x=function(){return e.documentElement.scrollTop||e.body.scrollTop},$={goTop:function(e){var i=x(),s=arguments.length>2?arguments[1]:Math.abs(i-e)/v;i&&i>e?(t.scrollTo(0,Math.max(i-s,0)),m(arguments.callee.bind(this,e,s))):e&&e>i?(t.scrollTo(0,Math.min(i+s,e)),m(arguments.callee.bind(this,e,s))):this.toc.actived(e)},toggleGotop:function(e){e>t.innerHeight/2?c.classList.add("in"):c.classList.remove("in")},toggleMenu:function(e){var i=n("#main");if(e){if(l.classList.remove("hide"),t.innerWidth<1241)if(d.classList.add("in"),l.classList.add("show"),L){var s=x();i.classList.add("lock"),i.scrollTop=s}else o.classList.add("lock")}else if(l.classList.remove("show"),d.classList.remove("in"),L){var s=i.scrollTop;i.classList.remove("lock"),t.scrollTo(0,s)}else o.classList.remove("lock")},fixedHeader:function(t){t>r.clientHeight?r.classList.add("fixed"):r.classList.remove("fixed")},toc:function(){var t=n("#post-toc");if(!t||!t.children.length)return{fixed:y,actived:y};var e=n(".post-header").clientHeight,s=r.clientHeight,a=n("#post-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.querySelector('a[href="#'+a[0].id+'"]').parentNode.classList.add("active");var o=t.querySelectorAll(".post-toc-child");for(i=0,len=o.length;i=e-s?t.classList.add("fixed"):t.classList.remove("fixed")},actived:function(e){for(i=0,len=a.length;iw(a[i]).y-s-5){var n=t.querySelector("li.active"),o=t.querySelector('a[href="#'+a[i].id+'"]').parentNode;l(n,o)}e0?"50%":0),i[e]+=t.offsetHeight}),t.style.height=Math.max(i[0],i[1])+"px",t.classList.add("in")})},tabBar:function(t){t.parentNode.parentNode.classList.toggle("expand")},page:function(){var t=a(".fade, .fade-scale"),e=!1;return{loaded:function(){g.call(t,function(t){t.classList.add("in")}),e=!0},unload:function(){g.call(t,function(t){t.classList.remove("in")}),e=!1},visible:e}}(),lightbox:function(){function i(i){this.$img=i.querySelector("img"),this.$overlay=i.querySelector("overlay"),this.margin=40,this.title=this.$img.title||this.$img.alt||"",this.isZoom=!1;var n,a,o,c,l;this.calcRect=function(){c=s.clientWidth,l=s.clientHeight;var t=l-2*this.margin,e=n,i=a,r=(this.margin,e>c?c/e:1),d=i>t?t/i:1,h=Math.min(r,d);return e*=h,i*=h,{w:e,h:i,t:(l-i)/2-o.top,l:(c-e)/2-o.left+this.$img.offsetLeft}},this.setImgRect=function(t){this.$img.style.cssText="width: "+t.w+"px; max-width: "+t.w+"px; height:"+t.h+"px; top: "+t.t+"px; left: "+t.l+"px"},this.setFrom=function(){this.setImgRect({w:o.width,h:o.height,t:0,l:(i.offsetWidth-o.width)/2})},this.setTo=function(){this.setImgRect(this.calcRect())},this.addTitle=function(){this.title&&(this.$caption=e.createElement("div"),this.$caption.innerHTML=this.title,this.$caption.className="overlay-title",i.appendChild(this.$caption))},this.removeTitle=function(){this.$caption&&i.removeChild(this.$caption)};var r=this;this.zoomIn=function(){n=this.$img.naturalWidth||this.$img.width,a=this.$img.naturalHeight||this.$img.height,o=this.$img.getBoundingClientRect(),i.style.height=o.height+"px",i.classList.add("ready"),this.setFrom(),this.addTitle(),this.$img.classList.add("zoom-in"),setTimeout(function(){i.classList.add("active"),r.setTo(),r.isZoom=!0},0)},this.zoomOut=function(){this.isZoom=!1,i.classList.remove("active"),this.$img.classList.add("zoom-in"),this.setFrom(),setTimeout(function(){r.$img.classList.remove("zoom-in"),r.$img.style.cssText="",r.removeTitle(),i.classList.remove("ready"),i.removeAttribute("style")},300)},i.addEventListener("click",function(t){r.isZoom?r.zoomOut():"IMG"===t.target.tagName&&r.zoomIn()}),e.addEventListener("scroll",function(){r.isZoom&&r.zoomOut()}),t.addEventListener("resize",function(){r.isZoom&&r.zoomOut()})}g.call(a(".img-lightbox"),function(t){new i(t)})}(),loadScript:function(t){t.forEach(function(t){var i=e.createElement("script");i.src=t,i.async=!0,s.appendChild(i)})}};t.addEventListener("load",function(){u.classList.remove("active"),$.page.loaded(),t.lazyScripts&&t.lazyScripts.length&&$.loadScript(t.lazyScripts)}),t.addEventListener("DOMContentLoaded",function(){$.waterfall();var t=x();$.toc.fixed(t),$.toc.actived(t),$.page.loaded()});var E=!1,S=n('a[href^="mailto"]');S&&S.addEventListener(p,function(){E=!0}),t.addEventListener("beforeunload",function(t){E?E=!1:$.page.unload()}),t.addEventListener("pageshow",function(){!$.page.visible&&$.page.loaded()}),t.addEventListener("resize",function(){t.BLOG.even=p="ontouchstart"in t?"touchstart":"click",$.toggleMenu(),$.waterfall()}),c.addEventListener(p,function(){m($.goTop.bind($,0))},!1),h.addEventListener(p,function(t){$.toggleMenu(!0),t.preventDefault()},!1),f.addEventListener(p,function(){l.classList.add("hide")},!1),d.addEventListener(p,function(t){$.toggleMenu(),$.hideOnMask.forEach(function(t){t()}),t.preventDefault()},!1),e.addEventListener("scroll",function(){var t=x();$.toggleGotop(t),$.fixedHeader(t),$.toc.fixed(t),$.toc.actived(t)},!1),t.BLOG.SHARE&&$.share(),t.BLOG.REWARD&&$.reward(),$.noop=y,$.even=p,$.$=n,$.$$=a,Object.keys($).reduce(function(t,e){return t[e]=$[e],t},t.BLOG),t.Waves?(Waves.init(),Waves.attach(".global-share li",["waves-block"]),Waves.attach(".article-tag-list-link, #page-nav a, #page-nav span",["waves-button"])):console.error("Waves loading failed.")}(window,document); +!function(t,e){var s=e.body,n=e.querySelector.bind(e),a=e.querySelectorAll.bind(e),o=n("html"),c=n("#gotop"),l=n("#menu"),r=n("#header"),d=n("#mask"),h=n("#menu-toggle"),f=n("#menu-off"),u=n("#loading"),m=t.requestAnimationFrame,v=12,g=Array.prototype.forEach,p="ontouchstart"in t&&/Mobile|Android|iOS|iPhone|iPad|iPod|Windows Phone|KFAPWI/i.test(navigator.userAgent)?"touchstart":"click",L=/micromessenger/i.test(navigator.userAgent),y=function(){},w=function(t){var e=t.offsetLeft,i=t.offsetTop;if(t.offsetParent){var s=arguments.callee(t.offsetParent);e+=s.x,i+=s.y}return{x:e,y:i}},x=function(){return e.documentElement.scrollTop||e.body.scrollTop},$={goTop:function(e){var i=x(),s=arguments.length>2?arguments[1]:Math.abs(i-e)/v;i&&i>e?(t.scrollTo(0,Math.max(i-s,0)),m(arguments.callee.bind(this,e,s))):e&&e>i?(t.scrollTo(0,Math.min(i+s,e)),m(arguments.callee.bind(this,e,s))):this.toc.actived(e)},toggleGotop:function(e){e>t.innerHeight/2?c.classList.add("in"):c.classList.remove("in")},toggleMenu:function(e){var i=n("#main");if(e){if(l.classList.remove("hide"),t.innerWidth<1241)if(d.classList.add("in"),l.classList.add("show"),L){var s=x();i.classList.add("lock"),i.scrollTop=s}else o.classList.add("lock")}else if(l.classList.remove("show"),d.classList.remove("in"),L){var s=i.scrollTop;i.classList.remove("lock"),t.scrollTo(0,s)}else o.classList.remove("lock")},fixedHeader:function(t){t>r.clientHeight?r.classList.add("fixed"):r.classList.remove("fixed")},toc:function(){var t=n("#post-toc");if(!t||!t.children.length)return{fixed:y,actived:y};var e=n(".post-header").clientHeight,s=r.clientHeight,a=n("#post-content").querySelectorAll("h1, h2, h3, h4, h5, h6");t.querySelector('a[href="#'+a[0].id+'"]').parentNode.classList.add("active");var o=t.querySelectorAll(".post-toc-child");for(i=0,len=o.length;i=e-s?t.classList.add("fixed"):t.classList.remove("fixed")},actived:function(e){for(i=0,len=a.length;iw(a[i]).y-s-5){var n=t.querySelector("li.active"),o=t.querySelector('a[href="#'+a[i].id+'"]').parentNode;l(n,o)}e0?"50%":0),i[e]+=t.offsetHeight}),t.style.height=Math.max(i[0],i[1])+"px",t.classList.add("in")})},tabBar:function(t){t.parentNode.parentNode.classList.toggle("expand")},page:function(){var t=a(".fade, .fade-scale"),e=!1;return{loaded:function(){g.call(t,function(t){t.classList.add("in")}),e=!0},unload:function(){g.call(t,function(t){t.classList.remove("in")}),e=!1},visible:e}}(),lightbox:function(){function i(i){this.$img=i.querySelector("img"),this.$overlay=i.querySelector("overlay"),this.margin=40,this.title=this.$img.title||this.$img.alt||"",this.isZoom=!1;var n,a,o,c,l;this.calcRect=function(){c=s.clientWidth,l=s.clientHeight;var t=l-2*this.margin,e=n,i=a,r=(this.margin,e>c?c/e:1),d=i>t?t/i:1,h=Math.min(r,d);return e*=h,i*=h,{w:e,h:i,t:(l-i)/2-o.top,l:(c-e)/2-o.left+this.$img.offsetLeft}},this.setImgRect=function(t){this.$img.style.cssText="width: "+t.w+"px; max-width: "+t.w+"px; height:"+t.h+"px; top: "+t.t+"px; left: "+t.l+"px"},this.setFrom=function(){this.setImgRect({w:o.width,h:o.height,t:0,l:(i.offsetWidth-o.width)/2})},this.setTo=function(){this.setImgRect(this.calcRect())},this.addTitle=function(){this.title&&(this.$caption=e.createElement("div"),this.$caption.innerHTML=this.title,this.$caption.className="overlay-title",i.appendChild(this.$caption))},this.removeTitle=function(){this.$caption&&i.removeChild(this.$caption)};var r=this;this.zoomIn=function(){n=this.$img.naturalWidth||this.$img.width,a=this.$img.naturalHeight||this.$img.height,o=this.$img.getBoundingClientRect(),i.style.height=o.height+"px",i.classList.add("ready"),this.setFrom(),this.addTitle(),this.$img.classList.add("zoom-in"),setTimeout(function(){i.classList.add("active"),r.setTo(),r.isZoom=!0},0)},this.zoomOut=function(){this.isZoom=!1,i.classList.remove("active"),this.$img.classList.add("zoom-in"),this.setFrom(),setTimeout(function(){r.$img.classList.remove("zoom-in"),r.$img.style.cssText="",r.removeTitle(),i.classList.remove("ready"),i.removeAttribute("style")},300)},i.addEventListener("click",function(t){r.isZoom?r.zoomOut():"IMG"===t.target.tagName&&r.zoomIn()}),e.addEventListener("scroll",function(){r.isZoom&&r.zoomOut()}),t.addEventListener("resize",function(){r.isZoom&&r.zoomOut()})}g.call(a(".img-lightbox"),function(t){new i(t)})}(),loadScript:function(t){t.forEach(function(t){var i=e.createElement("script");i.src=t,i.async=!0,s.appendChild(i)})}};t.addEventListener("load",function(){u.classList.remove("active"),$.page.loaded(),t.lazyScripts&&t.lazyScripts.length&&$.loadScript(t.lazyScripts)}),t.addEventListener("DOMContentLoaded",function(){$.waterfall();var t=x();$.toc.fixed(t),$.toc.actived(t),$.page.loaded()});var E=!1,S=n('a[href^="mailto"]');S&&S.addEventListener(p,function(){E=!0}),t.addEventListener("beforeunload",function(t){E?E=!1:$.page.unload()}),t.addEventListener("pageshow",function(){!$.page.visible&&$.page.loaded()}),t.addEventListener("resize",function(){t.BLOG.even=p="ontouchstart"in t?"touchstart":"click",$.toggleMenu(),$.waterfall()}),c.addEventListener(p,function(){m($.goTop.bind($,0))},!1),h.addEventListener(p,function(t){$.toggleMenu(!0),t.preventDefault()},!1),f.addEventListener(p,function(){l.classList.add("hide")},!1),d.addEventListener(p,function(t){$.toggleMenu(),$.hideOnMask.forEach(function(t){t()}),t.preventDefault()},!1),e.addEventListener("scroll",function(){var t=x();$.toggleGotop(t),$.fixedHeader(t),$.toc.fixed(t),$.toc.actived(t)},!1),t.BLOG.SHARE&&$.share(),t.BLOG.REWARD&&$.reward(),$.noop=y,$.even=p,$.$=n,$.$$=a,Object.keys($).reduce(function(t,e){return t[e]=$[e],t},t.BLOG),t.Waves?(Waves.init(),Waves.attach(".global-share li",["waves-block"]),Waves.attach(".article-tag-list-link, #page-nav a, #page-nav span",["waves-button"])):console.error("Waves loading failed.")}(window,document);