diff --git a/source/_posts/A04-Hexo-blog-topic-personalization.md b/source/_posts/A04-Hexo-blog-topic-personalization.md index bb7efb8ece9461bb75d039d7edf551717bdfabce..f1fa4e3490fd36955ec8fa4962278e9420e8a095 100644 --- a/source/_posts/A04-Hexo-blog-topic-personalization.md +++ b/source/_posts/A04-Hexo-blog-topic-personalization.md @@ -224,7 +224,15 @@ function delay() { } ``` -其中的社会主义核心价值观可以根据你自己的创意替换为其他文字,然后在 \themes\hexo-theme-spfk\layout\layout.ejs 文件末尾添加以下代码: +其中的社会主义核心价值观可以根据你自己的创意替换为其他文字 + +如果想要每次点击显示的文字为不同颜色,可以将其中 `color` 值进行如下更改: + +```js +"color": "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")" +``` + +然后在 \themes\hexo-theme-spfk\layout\layout.ejs 文件末尾添加以下代码: ``` html diff --git a/source/_posts/A23-beian.md b/source/_posts/A23-beian.md index d99aeb5b6a4a243b2e22fdc0b511d4967035b7ad..84a44f6a7faf88581d5e8e2293f9ade0165b3cd0 100644 --- a/source/_posts/A23-beian.md +++ b/source/_posts/A23-beian.md @@ -4,8 +4,8 @@ tags: - ICP备案 - 公安备案 categories: - - WEB前端 - - Hexo + - [WEB前端] + - [Hexo] description: 为了规范互联网信息服务活动,促进互联网信息服务健康有序发展,国家相关部门要求在国内的所有网站都必须备案(使用海外服务器则不需要备案),未备案的域名不能使用国内服务器。部分推广平台也需要备案才可以开通。 thumbnail: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-PIC/thumbnail/NationalEmblem.png avatar: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@2.1.9/images/trhx.png diff --git a/source/friends/index.md b/source/friends/index.md index 9a6e073324a5ae6933991a9f7b0239a42fd7000a..52ba9f6d55c696db7e1cc13d910a40f659e6a9d1 100644 --- a/source/friends/index.md +++ b/source/friends/index.md @@ -236,9 +236,9 @@ links: tags: - ACM - - name: 暗部精英 + - name: 暗影 avatar: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-LINKS/anbujingying.jpg - url: https://dsanying.coding.me/ + url: https://dsanying.github.io/ backgroundColor: '#53AECA' textColor: '#fff' tags: @@ -274,15 +274,6 @@ links: tags: - 世间所有的相遇,都是久别重逢 - - name: 拾柴者博客 - avatar: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-LINKS/scpro.jpg - url: http://www.scpro.cn/ - backgroundColor: '#71BCFF' - textColor: '#fff' - tags: - - Java - - 技术分享 - - name: KAYGB avatar: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-LINKS/kaygb.png url: https://kaygb.top/ @@ -368,14 +359,6 @@ links: textColor: '#fff' tags: - 记录爱情❤️记录生活 - - - name: 曾超凡❤谭庭仿的blog~ - avatar: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-LINKS/tantingfang.jpg - url: http://blog.tantingfang.cn/ - backgroundColor: '#FF69B4' - textColor: '#fff' - tags: - - 爱是艰辛 是陪伴 是一路仁至义尽. - name: 晨哥❤️芸霄的小窝 avatar: https://cdn.jsdelivr.net/gh/TRHX/ImageHosting/ITRHX-LINKS/fengyunxiao.png diff --git a/themes/material-x-1.2.1/_config.yml b/themes/material-x-1.2.1/_config.yml index 77491bdbf71c94d3d140c9ce565d6d2e2fbbdf4e..6fba32bdc338170235f480f1e6486dfc3a569b26 100644 --- a/themes/material-x-1.2.1/_config.yml +++ b/themes/material-x-1.2.1/_config.yml @@ -4,11 +4,11 @@ info: docs: https://xaoxuu.com/wiki/material-x/ cdn: # 把对应的那一行注释掉就使用本地的文件 css: - style: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/css/style.css + style: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/css/style.css js: - app: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/js/app.js - search: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/js/search.js - volantis: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/js/volantis.min.js + app: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/js/app.js + search: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/js/search.js + volantis: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/js/volantis.min.js @@ -38,7 +38,7 @@ music: autoplay: false # 自动播放 # 友链页头像占位图 -avatar_placeholder: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/bitmap.gif +avatar_placeholder: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/bitmap.gif # 文章字数统计、阅读时长 word_count: true @@ -53,8 +53,9 @@ backstretch: duration: 5000 # 持续时间(毫秒) fade: 1500 # 渐变(毫秒) images: - - https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/background/022.webp - #- https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/background/021.webp + - https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/background/023.webp + #- https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/background/022.webp + #- https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/background/021.webp ############################### 自定义 ############################### @@ -63,7 +64,7 @@ cover: scheme: search # 后期将会提供多种封面方案 height: half # full(默认值): 首页封面占据整个第一屏幕,其他页面占半个屏幕高度, half: 所有页面都封面都只占半个屏幕高度 # title: "TRHX'S BLOG" - logo: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/logo.png # logo和title只显示一个,若同时设置,则只显示logo + logo: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/logo.png # logo和title只显示一个,若同时设置,则只显示logo search_placeholder: '世界之大,探索一下!' # 主页封面菜单 features: @@ -147,7 +148,7 @@ body: [article, comments] # 侧边栏小部件,默认按下面给定的顺序全部显示,文章中还可以自定义显示一部分以及顺序 sidebar: - widget: author - avatar: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.4/images/trhx.png + avatar: https://cdn.jsdelivr.net/gh/TRHX/CDN-for-itrhx.com@3.0.6/images/trhx.png title: TRHX'S BLOG body: Stay Hungry, Stay Foolish! social: true @@ -183,7 +184,7 @@ sidebar: - widget: plain icon: fas fa-map-marked-alt title: 访客地图 - body: '
' + body: '
' more: icon: fas fa-info-circle url: https://www.revolvermaps.com/ @@ -191,7 +192,7 @@ sidebar: - widget: plain icon: fas fa-comments title: 交流群组 - body: 'QQ 交流群Telegram 交流群' + body: 'QQ 交流群Telegram 交流群' # - widget: list # icon: fas fa-link # title: 特别链接 diff --git a/themes/material-x-1.2.1/layout/_partial/cover.ejs b/themes/material-x-1.2.1/layout/_partial/cover.ejs index de19977c616ed1b582a692a8e326f87074fce023..964df7586dcea7f6b878294e7d0db20f1641b3cf 100644 --- a/themes/material-x-1.2.1/layout/_partial/cover.ejs +++ b/themes/material-x-1.2.1/layout/_partial/cover.ejs @@ -1,18 +1,27 @@ <% if (showCover == true) { %> -
- - <% if (theme.cover.scheme == 'search') { %> - <%- partial('../_cover/search') %> - <% } %> -
- - + -
- <%- partial('header', null, {cache: false, path: path}) %> -
-<% } else { %> + --> + + +
+ + +
+ + <%- partial('header', null, {cache: false, path: path}) %> -<% } %> + +<% } else { %> +<%- partial('header', null, {cache: false, path: path}) %> +<% } %> \ No newline at end of file diff --git a/themes/material-x-1.2.1/layout/_partial/footer.ejs b/themes/material-x-1.2.1/layout/_partial/footer.ejs index 989fd2bd9b63992c2bee5ee63ea8072ce26e5ff7..a14432436252599ee514284e18f95f9fb86f54c0 100644 --- a/themes/material-x-1.2.1/layout/_partial/footer.ejs +++ b/themes/material-x-1.2.1/layout/_partial/footer.ejs @@ -21,7 +21,7 @@
Copyright 2018-<%= date(new Date(), 'YYYY') %> <%= config.author || config.title %>   |   - + 鄂ICP备19003281号-4  |   正在载入... diff --git a/themes/material-x-1.2.1/layout/layout.ejs b/themes/material-x-1.2.1/layout/layout.ejs index 437afdb92bdfa3784cb8ba7f4bf1418eea424256..ac374458683950f4375fa5b0ff05a8ebb0b6dfb1 100644 --- a/themes/material-x-1.2.1/layout/layout.ejs +++ b/themes/material-x-1.2.1/layout/layout.ejs @@ -65,23 +65,25 @@ - + + + - + + --> - + - + - + diff --git a/themes/material-x-1.2.1/source/js/ClickShowText.js b/themes/material-x-1.2.1/source/js/ClickShowText.js index 7db614806938c5e40850d6a321a0d4c827d5c3c2..c6434f39e79ab87432fa9071153ce4503657a9fe 100644 --- a/themes/material-x-1.2.1/source/js/ClickShowText.js +++ b/themes/material-x-1.2.1/source/js/ClickShowText.js @@ -13,7 +13,7 @@ jQuery(document).ready(function($) { "left": x, "position": "absolute", "font-weight": "bold", - "color": "#FF0000" + "color": "rgb(" + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + "," + ~~(255 * Math.random()) + ")" }); $("body").append($i); $i.animate({ diff --git a/themes/material-x-1.2.1/source/js/snow.js b/themes/material-x-1.2.1/source/js/snow.js deleted file mode 100644 index d817abd3476bba1ed0c01bd27220fad867accb4d..0000000000000000000000000000000000000000 --- a/themes/material-x-1.2.1/source/js/snow.js +++ /dev/null @@ -1 +0,0 @@ -(function($){$.fn.snow=function(options){var $flake=$('
').css({"position":"absolute","z-index":"9999","top":"-50px"}).html("❄"),documentHeight=$(document).height(),documentWidth=$(document).width(),defaults={minSize:10,maxSize:20,newOn:1000,flakeColor:"#AFDAEF"},options=$.extend({},defaults,options);var interval=setInterval(function(){var startPositionLeft=Math.random()*documentWidth-100,startOpacity=0.5+Math.random(),sizeFlake=options.minSize+Math.random()*options.maxSize,endPositionTop=documentHeight-200,endPositionLeft=startPositionLeft-500+Math.random()*500,durationFall=documentHeight*10+Math.random()*5000;$flake.clone().appendTo("body").css({left:startPositionLeft,opacity:startOpacity,"font-size":sizeFlake,color:options.flakeColor}).animate({top:endPositionTop,left:endPositionLeft,opacity:0.2},durationFall,"linear",function(){$(this).remove()})},options.newOn)}})(jQuery);$(function(){$.fn.snow({minSize:5,maxSize:50,newOn:300})}); \ No newline at end of file diff --git a/themes/material-x-1.2.1/source/js/snow3.js b/themes/material-x-1.2.1/source/js/snow3.js new file mode 100644 index 0000000000000000000000000000000000000000..57ff7650950485e9c9378bed8fa79793cc669ba7 --- /dev/null +++ b/themes/material-x-1.2.1/source/js/snow3.js @@ -0,0 +1,666 @@ +/** @license + * DHTML Snowstorm! JavaScript-based snow for web pages + * Making it snow on the internets since 2003. You're welcome. + * ----------------------------------------------------------- + * Version 1.44.20131208 (Previous rev: 1.44.20131125) + * Copyright (c) 2007, Scott Schiller. All rights reserved. + * Code provided under the BSD License + * http://schillmania.com/projects/snowstorm/license.txt + */ + +/*jslint nomen: true, plusplus: true, sloppy: true, vars: true, white: true */ +/*global window, document, navigator, clearInterval, setInterval */ + +var snowStorm = (function(window, document) { + + // --- common properties --- + + this.autoStart = true; // Whether the snow should start automatically or not. + this.excludeMobile = true; // Snow is likely to be bad news for mobile phones' CPUs (and batteries.) Enable at your own risk. + this.flakesMax = 128; // Limit total amount of snow made (falling + sticking) + this.flakesMaxActive = 64; // Limit amount of snow falling at once (less = lower CPU use) + this.animationInterval = 50; // Theoretical "miliseconds per frame" measurement. 20 = fast + smooth, but high CPU use. 50 = more conservative, but slower + this.useGPU = true; // Enable transform-based hardware acceleration, reduce CPU load. + this.className = null; // CSS class name for further customization on snow elements + this.excludeMobile = true; // Snow is likely to be bad news for mobile phones' CPUs (and batteries.) By default, be nice. + this.flakeBottom = null; // Integer for Y axis snow limit, 0 or null for "full-screen" snow effect + this.followMouse = false; // Snow movement can respond to the user's mouse + this.snowColor = '#AFDAEF'; // Don't eat (or use?) yellow snow. + this.snowCharacter = '•'; // • = bullet, · is square on some systems etc. + this.snowStick = true; // Whether or not snow should "stick" at the bottom. When off, will never collect. + this.targetElement = null; // element which snow will be appended to (null = document.body) - can be an element ID eg. 'myDiv', or a DOM node reference + this.useMeltEffect = true; // When recycling fallen snow (or rarely, when falling), have it "melt" and fade out if browser supports it + this.useTwinkleEffect = false; // Allow snow to randomly "flicker" in and out of view while falling + this.usePositionFixed = false; // true = snow does not shift vertically when scrolling. May increase CPU load, disabled by default - if enabled, used only where supported + this.usePixelPosition = false; // Whether to use pixel values for snow top/left vs. percentages. Auto-enabled if body is position:relative or targetElement is specified. + + // --- less-used bits --- + + this.freezeOnBlur = true; // Only snow when the window is in focus (foreground.) Saves CPU. + this.flakeLeftOffset = 0; // Left margin/gutter space on edge of container (eg. browser window.) Bump up these values if seeing horizontal scrollbars. + this.flakeRightOffset = 0; // Right margin/gutter space on edge of container + this.flakeWidth = 8; // Max pixel width reserved for snow element + this.flakeHeight = 8; // Max pixel height reserved for snow element + this.vMaxX = 5; // Maximum X velocity range for snow + this.vMaxY = 4; // Maximum Y velocity range for snow + this.zIndex = 0; // CSS stacking order applied to each snowflake + + // --- "No user-serviceable parts inside" past this point, yadda yadda --- + + var storm = this, + features, + // UA sniffing and backCompat rendering mode checks for fixed position, etc. + isIE = navigator.userAgent.match(/msie/i), + isIE6 = navigator.userAgent.match(/msie 6/i), + isMobile = navigator.userAgent.match(/mobile|opera m(ob|in)/i), + isBackCompatIE = (isIE && document.compatMode === 'BackCompat'), + noFixed = (isBackCompatIE || isIE6), + screenX = null, screenX2 = null, screenY = null, scrollY = null, docHeight = null, vRndX = null, vRndY = null, + windOffset = 1, + windMultiplier = 2, + flakeTypes = 6, + fixedForEverything = false, + targetElementIsRelative = false, + opacitySupported = (function(){ + try { + document.createElement('div').style.opacity = '0.5'; + } catch(e) { + return false; + } + return true; + }()), + didInit = false, + docFrag = document.createDocumentFragment(); + + features = (function() { + + var getAnimationFrame; + + /** + * hat tip: paul irish + * http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + * https://gist.github.com/838785 + */ + + function timeoutShim(callback) { + window.setTimeout(callback, 1000/(storm.animationInterval || 20)); + } + + var _animationFrame = (window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + timeoutShim); + + // apply to window, avoid "illegal invocation" errors in Chrome + getAnimationFrame = _animationFrame ? function() { + return _animationFrame.apply(window, arguments); + } : null; + + var testDiv; + + testDiv = document.createElement('div'); + + function has(prop) { + + // test for feature support + var result = testDiv.style[prop]; + return (result !== undefined ? prop : null); + + } + + // note local scope. + var localFeatures = { + + transform: { + ie: has('-ms-transform'), + moz: has('MozTransform'), + opera: has('OTransform'), + webkit: has('webkitTransform'), + w3: has('transform'), + prop: null // the normalized property value + }, + + getAnimationFrame: getAnimationFrame + + }; + + localFeatures.transform.prop = ( + localFeatures.transform.w3 || + localFeatures.transform.moz || + localFeatures.transform.webkit || + localFeatures.transform.ie || + localFeatures.transform.opera + ); + + testDiv = null; + + return localFeatures; + + }()); + + this.timer = null; + this.flakes = []; + this.disabled = false; + this.active = false; + this.meltFrameCount = 20; + this.meltFrames = []; + + this.setXY = function(o, x, y) { + + if (!o) { + return false; + } + + if (storm.usePixelPosition || targetElementIsRelative) { + + o.style.left = (x - storm.flakeWidth) + 'px'; + o.style.top = (y - storm.flakeHeight) + 'px'; + + } else if (noFixed) { + + o.style.right = (100-(x/screenX*100)) + '%'; + // avoid creating vertical scrollbars + o.style.top = (Math.min(y, docHeight-storm.flakeHeight)) + 'px'; + + } else { + + if (!storm.flakeBottom) { + + // if not using a fixed bottom coordinate... + o.style.right = (100-(x/screenX*100)) + '%'; + o.style.bottom = (100-(y/screenY*100)) + '%'; + + } else { + + // absolute top. + o.style.right = (100-(x/screenX*100)) + '%'; + o.style.top = (Math.min(y, docHeight-storm.flakeHeight)) + 'px'; + + } + + } + + }; + + this.events = (function() { + + var old = (!window.addEventListener && window.attachEvent), slice = Array.prototype.slice, + evt = { + add: (old?'attachEvent':'addEventListener'), + remove: (old?'detachEvent':'removeEventListener') + }; + + function getArgs(oArgs) { + var args = slice.call(oArgs), len = args.length; + if (old) { + args[1] = 'on' + args[1]; // prefix + if (len > 3) { + args.pop(); // no capture + } + } else if (len === 3) { + args.push(false); + } + return args; + } + + function apply(args, sType) { + var element = args.shift(), + method = [evt[sType]]; + if (old) { + element[method](args[0], args[1]); + } else { + element[method].apply(element, args); + } + } + + function addEvent() { + apply(getArgs(arguments), 'add'); + } + + function removeEvent() { + apply(getArgs(arguments), 'remove'); + } + + return { + add: addEvent, + remove: removeEvent + }; + + }()); + + function rnd(n,min) { + if (isNaN(min)) { + min = 0; + } + return (Math.random()*n)+min; + } + + function plusMinus(n) { + return (parseInt(rnd(2),10)===1?n*-1:n); + } + + this.randomizeWind = function() { + var i; + vRndX = plusMinus(rnd(storm.vMaxX,0.2)); + vRndY = rnd(storm.vMaxY,0.2); + if (this.flakes) { + for (i=0; i=0 && s.vX<0.2) { + s.vX = 0.2; + } else if (s.vX<0 && s.vX>-0.2) { + s.vX = -0.2; + } + if (s.vY>=0 && s.vY<0.2) { + s.vY = 0.2; + } + }; + + this.move = function() { + var vX = s.vX*windOffset, yDiff; + s.x += vX; + s.y += (s.vY*s.vAmp); + if (s.x >= screenX || screenX-s.x < storm.flakeWidth) { // X-axis scroll check + s.x = 0; + } else if (vX < 0 && s.x-storm.flakeLeftOffset < -storm.flakeWidth) { + s.x = screenX-storm.flakeWidth-1; // flakeWidth; + } + s.refresh(); + yDiff = screenY+scrollY-s.y+storm.flakeHeight; + if (yDiff0.998) { + // ~1/1000 chance of melting mid-air, with each frame + s.melting = true; + s.melt(); + // only incrementally melt one frame + // s.melting = false; + } + if (storm.useTwinkleEffect) { + if (s.twinkleFrame < 0) { + if (Math.random() > 0.97) { + s.twinkleFrame = parseInt(Math.random() * 8, 10); + } + } else { + s.twinkleFrame--; + if (!opacitySupported) { + s.o.style.visibility = (s.twinkleFrame && s.twinkleFrame % 2 === 0 ? 'hidden' : 'visible'); + } else { + s.o.style.opacity = (s.twinkleFrame && s.twinkleFrame % 2 === 0 ? 0 : 1); + } + } + } + } + }; + + this.animate = function() { + // main animation loop + // move, check status, die etc. + s.move(); + }; + + this.setVelocities = function() { + s.vX = vRndX+rnd(storm.vMaxX*0.12,0.1); + s.vY = vRndY+rnd(storm.vMaxY*0.12,0.1); + }; + + this.setOpacity = function(o,opacity) { + if (!opacitySupported) { + return false; + } + o.style.opacity = opacity; + }; + + this.melt = function() { + if (!storm.useMeltEffect || !s.melting) { + s.recycle(); + } else { + if (s.meltFrame < s.meltFrameCount) { + s.setOpacity(s.o,s.meltFrames[s.meltFrame]); + s.o.style.fontSize = s.fontSize-(s.fontSize*(s.meltFrame/s.meltFrameCount))+'px'; + s.o.style.lineHeight = storm.flakeHeight+2+(storm.flakeHeight*0.75*(s.meltFrame/s.meltFrameCount))+'px'; + s.meltFrame++; + } else { + s.recycle(); + } + } + }; + + this.recycle = function() { + s.o.style.display = 'none'; + s.o.style.position = (fixedForEverything?'fixed':'absolute'); + s.o.style.bottom = 'auto'; + s.setVelocities(); + s.vCheck(); + s.meltFrame = 0; + s.melting = false; + s.setOpacity(s.o,1); + s.o.style.padding = '0px'; + s.o.style.margin = '0px'; + s.o.style.fontSize = s.fontSize+'px'; + s.o.style.lineHeight = (storm.flakeHeight+2)+'px'; + s.o.style.textAlign = 'center'; + s.o.style.verticalAlign = 'baseline'; + s.x = parseInt(rnd(screenX-storm.flakeWidth-20),10); + s.y = parseInt(rnd(screenY)*-1,10)-storm.flakeHeight; + s.refresh(); + s.o.style.display = 'block'; + s.active = 1; + }; + + this.recycle(); // set up x/y coords etc. + this.refresh(); + + }; + + this.snow = function() { + var active = 0, flake = null, i, j; + for (i=0, j=storm.flakes.length; istorm.flakesMaxActive) { + storm.flakes[storm.flakes.length-1].active = -1; + } + } + storm.targetElement.appendChild(docFrag); + }; + + this.timerInit = function() { + storm.timer = true; + storm.snow(); + }; + + this.init = function() { + var i; + for (i=0; i