mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
1. 不再支持hexo 4.0.0以下版本 2. 添加hexo fragment_cache,加快生成速度 3. 完善V5圖標顯示,不再需要同時加載V4和v5圖標 4. 去除cheerio依賴 5. 整合豆瓣配置,增加配置遊戲,圖書頁面top_img,可設置是否設置meta,解決部分瀏覽器無法顯示圖片問題 6. 友情鏈接除列表外可自定義內容 7. 可設置主頁標題距離頂部距離 8. 側邊欄可隱藏,可設置手機頁面是否隱藏 9. 增加disqusjs和utterances 兩個評論 10. 主頁文章增加tags和更新日期顯示,可以配置post_meta 11. 首頁subtitle可關閉打字效果,可設置打字效果顯示一次或loop 12. 增加valine和gitalk的配置 13. darkmode配置整理 14. 增加404頁面 15. post_beautify改為beautify,頁面美化不再只限於post頁,page頁也一樣 16. 可設置是否顯示cover,可設置各位置的cover顯示 17. 增加mermaid,可畫流程圖、狀態圖、時序圖、甘特圖等等 18. 增加pangu配置,中英文之間添加空格 19. 整合部分配置 20. post-copyright增加decode網址 (可以顯示中文) 21. 增加部分顏色配置 Feature 1. 適配IE 2. 增加一個Tag Plugins: 圖庫集 3. 增加一個Tag Plugins: tag-hide 功能 inline/block 4. 去除page頁開頭顯示與標題一樣的內容 5. aside 公告欄設置,支持html代碼 6. 手機界面sidebar顯示進度條和加深對應的標題 7. 主頁subtitle 的 hitokoto 顯示內容出處 9. footer 的hexo鏈接改為https 10. 修改手機下,menus和toc的打開效果 11. 手機頁面下,搜索界面全屏顯示 12. SEO優化,標題欄改為h1顯示 13. 閲讀模式優化,可根據light mode 和darkmode調整背景 14. 當屏蔽js時,header會出現(之前用js控制,會隱藏) Fixed 1. 修復Tencent Analytics的script加載為https #105 2. 修復相關文章,日期顯示錯誤bug 3. 修復gitalk報錯問題 4. 修復當valine background 是絕對地址時無法顯示的bug 5. 修復medium-zoom 無法使用的bug 6. 修復在safari下,點擊或移動到首頁文章cover,圓角變成正方形的bug #114 7. 修復在部分瀏覽器下,aside,友情鏈接頭像轉動變形的bug 8. 修復在寬度限制下,表格內容溢出屏幕外而出現滾動條的bug \#138 9. 修復gitalk js 在一些沒有設置評論的page里加載的bug 10. 修復tag plugins 的gist 在不同主題下的背景顏色問題(黑色主題下,文字不易觀看) 11. 修復highlight figcaption 顯示不全的bug 12. 修復disqus評論數無法獲取的bug 13. 修復子目錄在觸摸屏下點擊,偶爾不出現的bug 14. 修復a標籤太長(連續英文字母)不會換行的bug 15. 修復toc滾動時,閲讀進度條也跟著滾動的bug 16. 修復aside的圖片,可點擊顯示大圖bug 17. 修復activate-power-mode設置參數無效bug 18. 修復語言上的錯誤 \#156 19. 修復主頁在safari桌面端,首頁滾動卡頓的bug
1 line
3.8 KiB
JavaScript
1 line
3.8 KiB
JavaScript
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.POWERMODE=e():t.POWERMODE=e()}(this,(function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={exports:{},id:n,loaded:!1};return t[n].call(r.exports,r,r.exports,o),r.loaded=!0,r.exports}return o.m=t,o.c=e,o.p="",o(0)}([function(t,e,o){"use strict";var n=document.createElement("canvas");n.width=window.innerWidth,n.height=window.innerHeight,n.style.cssText="position:fixed;top:0;left:0;pointer-events:none;z-index:999999",window.addEventListener("resize",(function(){n.width=window.innerWidth,n.height=window.innerHeight})),document.body.appendChild(n);var r=n.getContext("2d"),i=[],a=0,d=!1;function l(t,e){return Math.random()*(e-t)+t}function c(t){if(p.colorful){var e=l(0,360);return"hsla("+l(e-10,e+10)+", 100%, "+l(50,80)+"%, 1)"}return window.getComputedStyle(t).color}function u(t,e,o){return{x:t,y:e,alpha:1,color:o,velocity:{x:2*Math.random()-1,y:2*Math.random()-3.5}}}function p(){for(var t=function(){var t,e=document.activeElement;if("TEXTAREA"===e.tagName||"INPUT"===e.tagName&&"text"===e.getAttribute("type")){var n=o(1)(e,e.selectionEnd);return t=e.getBoundingClientRect(),{x:n.left+t.left,y:n.top+t.top,color:c(e)}}var r=window.getSelection();if(r.rangeCount){var i=r.getRangeAt(0),a=i.startContainer;return a.nodeType===document.TEXT_NODE&&(a=a.parentNode),{x:(t=i.getBoundingClientRect()).left,y:t.top,color:c(a)}}return{x:0,y:0,color:"transparent"}}(),e=5+Math.round(10*Math.random());e--;)i[a]=u(t.x,t.y,t.color),a=(a+1)%500;if(p.shake){var n=1+2*Math.random(),r=n*(Math.random()>.5?-1:1),l=n*(Math.random()>.5?-1:1);document.body.style.marginLeft=r+"px",document.body.style.marginTop=l+"px",setTimeout((function(){document.body.style.marginLeft="",document.body.style.marginTop=""}),75)}d||requestAnimationFrame(f)}function f(){d=!0,r.clearRect(0,0,n.width,n.height);for(var t=!1,e=n.getBoundingClientRect(),o=0;o<i.length;++o){var a=i[o];a.alpha<=.1||(a.velocity.y+=.075,a.x+=a.velocity.x,a.y+=a.velocity.y,a.alpha*=.96,r.globalAlpha=a.alpha,r.fillStyle=a.color,r.fillRect(Math.round(a.x-1.5)-e.left,Math.round(a.y-1.5)-e.top,3,3),t=!0)}t?requestAnimationFrame(f):d=!1}p.shake=!0,p.colorful=!1,t.exports=p},function(t,e){!function(){var e=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],o=null!=window.mozInnerScreenX;function n(t,n,r){var i=r&&r.debug||!1;if(i){var a=document.querySelector("#input-textarea-caret-position-mirror-div");a&&a.parentNode.removeChild(a)}var d=document.createElement("div");d.id="input-textarea-caret-position-mirror-div",document.body.appendChild(d);var l=d.style,c=window.getComputedStyle?getComputedStyle(t):t.currentStyle;l.whiteSpace="pre-wrap","INPUT"!==t.nodeName&&(l.wordWrap="break-word"),l.position="absolute",i||(l.visibility="hidden"),e.forEach((function(t){l[t]=c[t]})),o?t.scrollHeight>parseInt(c.height)&&(l.overflowY="scroll"):l.overflow="hidden",d.textContent=t.value.substring(0,n),"INPUT"===t.nodeName&&(d.textContent=d.textContent.replace(/\s/g," "));var u=document.createElement("span");u.textContent=t.value.substring(n)||".",d.appendChild(u);var p={top:u.offsetTop+parseInt(c.borderTopWidth),left:u.offsetLeft+parseInt(c.borderLeftWidth)};return i?u.style.backgroundColor="#aaa":document.body.removeChild(d),p}void 0!==t&&void 0!==t.exports?t.exports=n:window.getCaretCoordinates=n}()}])})); |