提交 b4e27513 编写于 作者: D Dillon ZENG

Merge branch 'refs/heads/dev'

......@@ -2,7 +2,12 @@ g.classGroup text {
fill: $nodeBorder;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
font-size: 10px;
.title {
font-weight: bolder;
}
}
g.classGroup rect {
......
......@@ -56,4 +56,7 @@ $critBkgColor: #E83737;
$taskTextDarkColor: $darkTextColor;
$todayLineColor: #DB5757;
/* state colors */
$labelColor: black;
@import '../mermaid';
......@@ -54,4 +54,7 @@ $critBorderColor: #ff8888;
$critBkgColor: red;
$todayLineColor: red;
/* state colors */
$labelColor: black;
@import '../mermaid';
.label {
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
color: #333;
}
......@@ -16,6 +17,9 @@
stroke-width: 1px;
}
.node .label {
text-align: center;
}
.node.clickable {
cursor: pointer;
}
......@@ -31,6 +35,7 @@
.edgeLabel {
background-color: $edgeLabelBackground;
text-align: center;
}
.cluster rect {
......@@ -49,6 +54,7 @@ div.mermaidTooltip {
max-width: 200px;
padding: 2px;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
font-size: 12px;
background: $secondBkg;
border: 1px solid $border2;
......
......@@ -55,4 +55,7 @@ $critBorderColor: #ff8888;
$critBkgColor: red;
$todayLineColor: red;
/* state colors */
$labelColor: black;
@import '../mermaid';
/** Section styling */
.mermaid-main-font {
font-family: "trebuchet ms", verdana, arial;
font-family: var(--mermaid-font-family);
}
.section {
stroke: none;
opacity: 0.2;
......@@ -39,6 +44,9 @@
text-anchor: start;
font-size: 11px;
text-height: 14px;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
......@@ -48,6 +56,10 @@
stroke: $gridColor;
opacity: 0.3;
shape-rendering: crispEdges;
text {
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
}
.grid path {
......@@ -74,6 +86,11 @@
.taskText {
text-anchor: middle;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
.taskText:not([font-size]) {
font-size: 11px;
}
......@@ -81,6 +98,9 @@
fill: $taskTextDarkColor;
text-anchor: start;
font-size: 11px;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
.taskTextOutsideLeft {
......@@ -233,4 +253,6 @@
text-anchor: middle;
font-size: 18px;
fill: $taskTextDarkColor;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
......@@ -3,4 +3,6 @@
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
......@@ -4,3 +4,16 @@
@import 'class';
@import 'git';
@import 'pie';
@import 'state';
// .composit {
// fill: white;
// border-bottom: 1px
// }
:root {
--mermaid-font-family: '"trebuchet ms", verdana, arial';
--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive;
// --mermaid-alt-font-family: '"Lucida Console", Monaco, monospace';
}
......@@ -59,4 +59,7 @@ $critBkgColor: $critical;
$critBorderColor: darken($critBkgColor, 10%);
$todayLineColor: $critBkgColor;
/* state colors */
$labelColor: black;
@import '../mermaid';
......@@ -2,4 +2,10 @@
text-anchor: middle;
font-size: 25px;
fill: $taskTextDarkColor;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
.slice {
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
......@@ -77,6 +77,7 @@ text.actor {
fill: black;
stroke: none;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
font-size: 14px;
}
......
g.stateGroup text {
fill: $nodeBorder;
stroke: none;
font-size: 10px;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
g.stateGroup text {
fill: $nodeBorder;
stroke: none;
font-size: 10px;
}
g.stateGroup .state-title {
font-weight: bolder;
fill: $labelColor;
}
g.stateGroup rect {
fill: $nodeBkg;
stroke: $nodeBorder;
}
g.stateGroup line {
stroke: $nodeBorder;
stroke-width: 1;
}
.transition {
stroke: $nodeBorder;
stroke-width: 1;
fill: none;
}
.stateGroup .composit {
fill: white;
border-bottom: 1px
}
.state-note {
stroke: $noteBorderColor;
fill: $noteBkgColor;
text {
fill: black;
stroke: none;
font-size: 10px;
}
}
.stateLabel .box {
stroke: none;
stroke-width: 0;
fill: $nodeBkg;
opacity: 0.5;
}
.stateLabel text {
fill: $labelColor;
font-size: 10px;
font-weight: bold;
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
/** Post **/
.post-title {
margin: 0 !important;
font-size: 2rem;
font-size: 1.8rem;
line-height: 3rem;
}
......
......@@ -20,6 +20,7 @@
.navbar-header a {
padding: 0 8px;
font-size: 20px;
i {
line-height: 2em;
......@@ -65,6 +66,10 @@
padding-left: 1em;
box-sizing: border-box;
.navbar-header-title {
font-size: 20px;
}
.menu-toggle {
cursor: pointer;
line-height: 4.5em;
......@@ -72,7 +77,7 @@
span {
display: block;
background: #000;
width: 36px;
width: 24px;
height: 2px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
......
gittalk@1.5.0
gitalk@1.5.0
valine@1.3.10
jquery@3.4.1
lazysizes@5.1.2
katex@0.11.1
mermaid@8.3.1
echarts@4.3.0
typeit@6.0.3
mermaid@8.4.2
echarts@4.5.0
typeit@6.1.1
jquery-countdown@2.2.0
aplayer@1.10.1
meting@2.0.1
......
此差异已折叠。
文件模式从 100755 更改为 100644
此差异已折叠。
/*!
*
* typeit - The most versatile animated typing utility on the planet.
* Author: Alex MacArthur <alex@macarthur.me> (https://macarthur.me)
* Version: v6.0.3
* URL: https://typeitjs.com
* License: GPL-2.0
*
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypeIt=e():t.TypeIt=e()}(this,function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){"use strict";n.r(e);var i={strings:[],speed:100,cursor:!0,cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,lifeLike:!0,breakLines:!0,startDelay:250,startDelete:!1,nextStringDelay:750,loop:!1,loopDelay:null,html:!0,waitUntilVisible:!1,beforeString:!1,afterString:!1,beforeStep:!1,afterStep:!1,afterComplete:!1};function r(t){var e=t.getBoundingClientRect();return!(e.right>window.innerWidth||e.bottom>window.innerHeight)&&!(e.top<0||e.left<0)}function o(t,e){return Math.abs(Math.random()*(t+e-(t-e))+(t-e))}function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=document.createElement("style");n.id=e,n.appendChild(document.createTextNode(t)),document.head.appendChild(n)}var a=function(t,e){for(var n=Object(t),i=1;i<arguments.length;i++){var r=arguments[i];if(null!=r)for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])}return n},u=function(t){return["textarea","input"].indexOf(t.tagName.toLowerCase())>-1},l=function(t){return Array.isArray(t)?t.slice(0):t.split("<br>")};function c(t){return t.replace(/&(.+);/,function(t){var e=document.createElement("textarea");return e.innerHTML=t,e.value})}function f(t){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var h="{%}";var p=function(t){var e=function(t){var e=(new DOMParser).parseFromString(t,"text/html"),n=[].slice.call(e.body.querySelectorAll("*"));return(n=n.filter(function(e){return!(e.outerHTML.indexOf("></")>-1&&(t=t.replace(e.outerHTML,""),1))})).forEach(function(e){t=t.replace(new RegExp("<".concat(e.tagName,"(.*?)/?>((.*?)</").concat(e.tagName,">)?"),"i"),h)}),{string:t,nodes:n}}(t),n=e.string,i=e.nodes,r=c(n).split(""),o=[];return r.forEach(function(t,e){if(r.slice(e,e+3).join("")===h){var n=e,s=i.shift(),a=c(s.innerHTML).split(""),u=[].slice.call(s.attributes).map(function(t){return{name:t.name,value:t.nodeValue}});a.length?a.forEach(function(t,i){o.push({tag:s.tagName,attributes:u,content:t,isFirstCharacter:n===e,isLastCharacter:i+1===a.length}),n++}):o.push({tag:s.tagName,attributes:u,content:null})}else o.push(t)}),o=function(t){for(var e=!0;e;)t.some(function(e,n){return!("object"!==f(e)||!e.isLastCharacter&&null!==e.content||"%}"!==t.slice(n+1,n+3).join("")||(t.splice(n+1,2),0))})||(e=!1);return t}(o)},d=function(t){var e=t.tag,n=t.attributes,i=void 0===n?[]:n,r=t.content,o=void 0===r?"":r,s=document.createElement(e);return void 0!==i&&i.forEach(function(t){s.setAttribute(t.name,t.value)}),o&&(s.innerHTML=o),s.outerHTML},y=function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?t.value="":[].slice.call(t.childNodes).forEach(function(e){void 0!==e.classList&&e.classList.contains("ti-wrapper")&&(t.innerHTML="")})};function v(t){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function g(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function m(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var b=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.executed=[],this.waiting=e,!e.length&&n&&this.add(n)}var e,n,i;return e=t,(n=[{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.waiting[e?"unshift":"push"](t),this}},{key:"delete",value:function(t){return this.waiting.splice(t,1),this}},{key:"reset",value:function(){return this.waiting=[].concat(g(this.executed),g(this.waiting)),this.executed=[],this}}])&&m(e.prototype,n),i&&m(e,i),t}();function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function S(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var k="display:inline;position:relative;font:inherit;color:inherit;line-height:inherit;",q=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.element,r=e.id,o=e.options,s=e.queue,c=void 0===s?[]:s;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.status={started:!1,complete:!1,frozen:!1,destroyed:!1},this.timeouts=[],this.id=r,this.$e=n,this.isInput=u(n),this.opts=a({},i,o),this.opts.strings=l(this.opts.strings),this.opts.html=!this.isInput&&this.opts.html,this.queue=new b(c,[this.pause,this.opts.startDelay]),y(n,this.isInput),this.prepareDelay("nextStringDelay"),this.prepareDelay("loopDelay");var f=this.$e.innerHTML;this.prepDOM(),this.handleHardCoded(f),this.opts.strings=this.opts.strings.map(function(t){return t.replace(/<\!--.*?-->/g,"")}),!this.opts.strings.length||this.queue.waiting.length>1||this.generateQueue()}var e,n,c;return e=t,(n=[{key:"reset",value:function(){return this.queue.reset(),new t({element:this.$e,id:this.id,options:this.opts,queue:this.queue.waiting})}},{key:"init",value:function(){var t=this;if(!this.status.started){if(this.cursor(),!this.opts.waitUntilVisible||r(this.$e))return this.status.started=!0,this.fire();window.addEventListener("scroll",function e(){r(t.$e)&&!t.status.started&&(t.fire(),window.removeEventListener("scroll",e))})}}},{key:"fire",value:function(){for(var t=this,e=this.queue.waiting.slice(),n=Promise.resolve(),i=function(i){var r=e[i],o=[r,t.queue,t];n=n.then(function(){return new Promise(function(e,n){if(t.status.frozen)return n();var i,s;(t.setPace(),r[2]&&r[2].isFirst&&t.opts.beforeString)&&(i=t.opts).beforeString.apply(i,o);t.opts.beforeStep&&(s=t.opts).beforeStep.apply(s,o);r[0].call(t,r[1],r[2]).then(function(){var n,i,s=t.queue.waiting.shift();if(r[2]&&r[2].isPhantom)return e();r[2]&&r[2].isLast&&t.opts.afterString&&(n=t.opts).afterString.apply(n,o);t.opts.afterStep&&(i=t.opts).afterStep.apply(i,o);return t.queue.executed.push(s),e()})})})},r=0;r<e.length;r++)i(r);n.then(function(){if(t.opts.loop){var e=t.opts.loopDelay?t.opts.loopDelay:t.opts.nextStringDelay;t.wait(function(){t.loopify(e),t.fire()},e.after)}t.status.completed=!0,t.opts.afterComplete&&t.opts.afterComplete(t)}).catch(function(){})}},{key:"loopify",value:function(t){var e=this;this.queue.reset().delete(0).add([this.pause,t.before],!0),this.getNoderized().forEach(function(t){e.queue.add([e.delete,null,{isPhantom:!0}],!0)})}},{key:"prepDOM",value:function(){this.isInput||(this.$e.innerHTML='\n <span style="'.concat(k,'" class="ti-wrapper">\n <span style="').concat(k,'" class="ti-container"></span>\n </span>\n '),this.$e.setAttribute("data-typeit-id",this.id),this.$eContainer=this.$e.querySelector(".ti-container"),this.$eWrapper=this.$e.querySelector(".ti-wrapper"),s("\n .".concat(this.$eContainer.className,":before {\n content: '.';\n display: inline-block;\n width: 0;\n visibility: hidden;\n }\n ")))}},{key:"setContents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.isInput?this.$e.value=t:this.$eContainer[this.opts.html?"innerHTML":"innerText"]=t}},{key:"getRaw",value:function(){return this.isInput?this.$e.value:this.opts.html?this.$eContainer.innerHTML:this.$eContainer.innerText}},{key:"getNoderized",value:function(){return this.maybeNoderize(this.getRaw())}},{key:"prepareDelay",value:function(t){var e=this.opts[t];if(e){var n=Array.isArray(e),i=n?null:e/2;this.opts[t]={before:n?e[0]:i,after:n?e[1]:i,total:n?e[0]+e[1]:e}}}},{key:"generateQueue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;e&&this.queue.add(e),this.opts.strings.forEach(function(e,n){t.queueString(e);var i=t.queue.waiting.length;if(n+1!==t.opts.strings.length){if(t.opts.breakLines)return t.queue.add([t.type,"<br>"]),void t.addSplitPause(i);t.queueDeletions(e),t.addSplitPause(i,e.length)}})}},{key:"queueDeletions",value:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e="string"==typeof t?this.maybeNoderize(t).length:t,n=0;n<e;n++)this.queue.add([this.delete])}},{key:"maybeNoderize",value:function(t){return this.opts.html?p(t):t.split("")}},{key:"queueString",value:function(t){var e=this,n=(t=this.maybeNoderize(t)).length;t.forEach(function(t,i){var r=[e.type,t];0===i&&r.push({isFirst:!0}),i+1===n&&r.push({isLast:!0}),e.queue.add(r)})}},{key:"addSplitPause",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.queue.waiting.splice(t,0,[this.pause,this.opts.nextStringDelay.before]),this.queue.waiting.splice(t+e+1,0,[this.pause,this.opts.nextStringDelay.after])}},{key:"cursor",value:function(){if(!this.isInput){var t="display: none;";this.opts.cursor&&(s("\n @keyframes blink-".concat(this.id," {\n 0% {opacity: 0}\n 49% {opacity: 0}\n 50% {opacity: 1}\n }\n\n [data-typeit-id='").concat(this.id,"'] .ti-cursor {\n animation: blink-").concat(this.id," ").concat(this.opts.cursorSpeed/1e3,"s infinite;\n }\n "),this.id),t=""),this.$eWrapper.insertAdjacentHTML("beforeend",'<span style="'.concat(k).concat(t,'left: -.25ch;" class="ti-cursor">').concat(this.opts.cursorChar,"</span>"))}}},{key:"insert",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.isInput?this.$e.value="".concat(this.$e.value).concat(t):((e?this.$eContainer.lastChild:this.$eContainer).insertAdjacentHTML("beforeend",t),this.setContents(this.getRaw().split("").join("")))}},{key:"handleHardCoded",value:function(t){return!!t.length&&(this.opts.startDelete?(this.insert(t),this.queue.add([this.delete,!0]),void this.addSplitPause(1)):void(this.opts.strings=[].concat(w(l(t.trim())),w(this.opts.strings))))}},{key:"wait",value:function(t,e){this.timeouts.push(setTimeout(t,e))}},{key:"setPace",value:function(){var t=this.opts.speed,e=null!==this.opts.deleteSpeed?this.opts.deleteSpeed:this.opts.speed/3,n=t/2,i=e/2;this.typePace=this.opts.lifeLike?o(t,n):t,this.deletePace=this.opts.lifeLike?o(e,i):e}},{key:"pause",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(n,i){t.wait(function(){return n()},e||t.opts.nextStringDelay.total)})}},{key:"type",value:function(t){var e=this;return new Promise(function(n,i){e.wait(function(){return"string"==typeof t?(e.insert(t),n()):t.isFirstCharacter||null===t.content?(e.insert(d({tag:t.tag,attributes:t.attributes,content:t.content})),n()):(e.insert(t.content,!0),n())},e.typePace)})}},{key:"empty",value:function(){var t=this;return new Promise(function(e){return t.setContents(""),e()})}},{key:"delete",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(n,i){t.wait(function(){var i=t.getNoderized();return i.splice(-1,1),i=function(t){return(t=t.map(function(e,n){if("object"===v(e)&&(e.isFirstCharacter||null===e.content)){for(var i=n,r=[e.content],o=!1;!o;){var s=t[++i];void 0!==s&&r.push(s.content),(void 0===s||s.isLastCharacter)&&(o=!0)}return d({tag:e.tag,attributes:e.attributes,content:r.join("")})}return e})).filter(function(t){return"object"!==v(t)})}(i),t.setContents(i.join("")),e&&i.length>0?t.delete(!0).then(function(){return n()}):n()},t.deletePace)})}},{key:"setOptions",value:function(t){var e=this;return new Promise(function(n){return e.opts=a({},e.opts,t),n()})}}])&&S(e.prototype,n),c&&S(e,c),t}(),C=function(t){return"string"==typeof t?t=document.querySelectorAll(t):t instanceof NodeList||(t=[t]),[].slice.call(t)};function j(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}n.d(e,"default",function(){return x});var x=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.instances=C(e).map(function(t){return new q({element:t,id:Math.random().toString(36).substring(2,15),options:n,queue:[]})})}var e,n,i;return e=t,(n=[{key:"each",value:function(t){var e=this;this.instances.forEach(function(n){t.call(e,n)})}},{key:"queueUp",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.each(function(r){for(var o="string"!=typeof t,s=o?t:r[t],a=o?e:n,u=0;u<i;u++)r.queue.add([s,a])})}},{key:"is",value:function(t){return e=this.instances,n=t,i=!0,!!e.length&&e.filter(function(t){return t.status[n]===i}).length===e.length;var e,n,i}},{key:"freeze",value:function(){this.each(function(t){t.status.frozen=!0})}},{key:"unfreeze",value:function(){this.each(function(t){t.status.frozen&&(t.status.frozen=!1,t.fire())})}},{key:"type",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.each(function(e){return e.queueString(t)}),this}},{key:"delete",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.queueUp("delete",null===t,null===t?1:t),this}},{key:"pause",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return this.queueUp("pause",t),this}},{key:"break",value:function(){return this.queueUp("type","<br>"),this}},{key:"options",value:function(t){return this.queueUp("setOptions",t),this}},{key:"exec",value:function(t){return this.queueUp(t),this}},{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.each(function(e){e.timeouts.forEach(function(t){clearTimeout(t)}),e.timeouts=[];var n=e.isInput?null:e.$eWrapper.querySelector(".ti-cursor");t&&e.opts.cursor&&null!==n&&e.$eWrapper.removeChild(n),e.status.destroyed=!0})}},{key:"empty",value:function(){return this.queueUp("empty"),this}},{key:"reset",value:function(){return this.destroy(),this.instances=this.instances.map(function(t){return t.reset()}),this}},{key:"go",value:function(){return this.each(function(t){t.init()}),this}}])&&j(e.prototype,n),i&&j(e,i),t}()}]).default});
\ No newline at end of file
/*!
*
* TypeIt - The most versatile animated typing utility on the planet.
* Author: Alex MacArthur <alex@macarthur.me> (https://macarthur.me)
* Version: v6.1.1
* License: GPL-2.0
* URL: https://typeitjs.com
*
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TypeIt=e():t.TypeIt=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";i.r(e);var n={strings:[],speed:100,cursor:!0,cursorChar:"|",cursorSpeed:1e3,deleteSpeed:null,lifeLike:!0,breakLines:!0,startDelay:250,startDelete:!1,nextStringDelay:750,loop:!1,loopDelay:750,html:!0,waitUntilVisible:!1,beforeString:()=>{},afterString:()=>{},beforeStep:()=>{},afterStep:()=>{},afterComplete:()=>{}},s=function(){var t=this;let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.insert=(t,e)=>{this.waiting.splice(t,0,e)},this.add=function(e){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return Array.isArray(e[0])?(t.waiting=t.waiting.concat(e),t):(t.waiting[i?"unshift":"push"](e),t)},this.delete=t=>(this.waiting.splice(t,1),this),this.reset=()=>(this.waiting=this.executed.concat(this.waiting),this.executed=[],this),this.executed=[],this.waiting=e,!e.length&&i&&this.add(i)},r=t=>document.createElement(t);function o(t,e){return Math.abs(Math.random()*(t+e-(t-e))+(t-e))}function u(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=r("style");i.id=e,i.appendChild(document.createTextNode(t)),document.head.appendChild(i)}var l=t=>["textarea","input"].indexOf(t.tagName.toLowerCase())>-1,a=t=>Array.isArray(t)?t:[t],h=t=>[].slice.call(t);const c=(t,e)=>{let i=t.nextSibling;return!!i&&!i.isEqualNode(e)};var p=(t,e)=>{let i=e;if(l(t))return void(t.value="".concat(t.value).concat(i));let n=h(t.childNodes).filter(t=>t.classList&&t.classList.contains("ti-cursor"));if(n=n.length?n[0]:null,"object"==typeof e&&!(e instanceof HTMLElement)){let s=e.ancestorTree.slice(0).reverse().join(" "),o=h(t.querySelectorAll("".concat(s))),u=o[o.length-1];if(u&&((t,e)=>{if(!t)return!1;let i=!1,n=[],s=t;for(;!i;)n.push(c(s,e)),(s=s.parentNode)&&!s.hasAttribute("data-typeit-id")||(i=!0);return!n.some(t=>t)})(u,n))t=u,i=e.content;else if(i=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=r(t);return e.forEach(t=>{n.setAttribute(t.name,t.value)}),n.innerHTML=i,n}(e.ancestorTree[0],e.attributes,e.content),e.ancestorTree.length>1){let i=h(t.querySelectorAll(e.ancestorTree[1]));t=i[i.length-1]}}i="object"==typeof i?i:document.createTextNode(i),t.insertBefore(i,n&&t.hasAttribute("data-typeit-id")?n:null)},d=t=>{let e=[];return e.concat.apply(e,t)},f=t=>{let e=document.implementation.createHTMLDocument("");return e.body.innerHTML=t,e.body};const y=t=>h(t.attributes).map(t=>({name:t.name,value:t.nodeValue})),g=t=>h(t.childNodes).map(t=>3===t.nodeType?t.nodeValue.split(""):t),m=(t,e,i)=>({ancestorTree:e,attributes:y(t),content:i}),b=(t,e)=>{let i=m(t,e,""),n=g(t).map((i,n)=>Array.isArray(i)?i.map((i,n)=>m(t,e,i)):i);return n.unshift(i),d(n)},v=t=>t instanceof HTMLElement&&"BR"!==t.tagName,w=function t(e){let i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=e.map(t=>{if(v(t)){if(!i)return h(t.childNodes);let e=t.parentNode,n=[t.tagName];for(;["BODY","HTML"].indexOf(e.tagName)<0;)n.push(e.tagName),e=e.parentNode;return b(t,n)}return t});return(n=d(n)).some(t=>v(t))?t(n,i):n};function S(t){let e=f(t),i=g(e);return w(i)}function q(t){return!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?S(t):t.split("")}var x=(t,e)=>{e?t.value="":t.querySelector(".ti-cursor")&&(t.innerHTML="")},T=function(t,e){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=!Array.isArray(t),s=t.length;return(t=n?new Array(t).fill(0):t).map((t,r)=>{if(n)return e;let o=[e,t];return i&&(0===r&&o.push({isFirst:!0}),r+1===s&&o.push({isLast:!0})),o})},A=t=>{t.parentNode.removeChild(t)};const N=t=>3!==t.nodeType&&"BR"!==t.tagName&&!t.firstChild,L=t=>t.some(t=>N(t));var M=t=>{let e=h(t.querySelectorAll("*")),i=L(e);for(;e.length&&i;){let n=!1;e.forEach(t=>{N(t)&&(A(t),n=!0)}),n&&(e=h(t.querySelectorAll("*"))),i=L(e)}return e},D=t=>(Array.isArray(t)||(t=[t/2,t/2]),{before:t[0],after:t[1],total:t[0]+t[1]}),$=function(t,e,i){let n=(e=null!==e?e:t/3)/2;return i?[o(t,t/2),o(e,n)]:[t,e]};function j(){var t=this;let{typeIt:e,element:i,id:o,options:c,queue:d=[],isAReset:y=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const g=()=>{let t=h(this.$e.childNodes).filter(t=>!t.isEqualNode(L));return w(t,!1)},m=function(e){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=t.opts.nextStringDelay;t.queue.insert(e,[t.pause,n.before]),t.queue.insert(e+i+1,[t.pause,n.after])},b=()=>{!E&&this.opts.cursor&&(u("@keyframes blink-".concat(o," { 0% {opacity: 0} 49% {opacity: 0} 50% {opacity: 1} }[data-typeit-id='").concat(o,"'] .ti-cursor { animation: blink-").concat(o," ").concat(this.opts.cursorSpeed/1e3,"s infinite; }"),o),(L=r("span")).innerHTML=f(this.opts.cursorChar).innerHTML,L.className="ti-cursor",L.setAttribute("style","display:inline;position:relative;font:inherit;color:inherit;line-height:inherit;"),this.$e.appendChild(L))};this.wait=function(t,e){this.timeouts.push(setTimeout(t,e))};const v=()=>{this.opts.strings.forEach((t,e)=>{let i=q(t,this.opts.html);this.queue.add(T(i,this.type,!0));let n=this.queue.waiting.length;if(e+1!==this.opts.strings.length){if(this.opts.breakLines)return this.queue.add([this.type,r("BR")]),void m(n);this.queue.add(T(i,this.delete)),m(n,t.length)}})},N=t=>{this.queue.reset().delete(0).add([this.pause,t.before],!0);for(let t=0;t<g().length;t++)this.queue.add([this.delete,null,{isPhantom:!0}],!0)};this.pause=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((e,i)=>{this.wait(()=>e(),t||this.opts.nextStringDelay.total)})},this.reset=function(){return this.queue.reset(),new j({typeIt:e,element:this.$e,id:o,options:this.opts,queue:this.queue.waiting,isAReset:!0})},this.init=function(){if(this.status.started)return;if(b(),!this.opts.waitUntilVisible)return this.status.started=!0,this.fire();new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&(this.fire(),e.unobserve(this.$e))})},{threshold:1}).observe(this.$e)},this.fire=function(){let t=this.queue.waiting.slice(),i=Promise.resolve();for(let n=0;n<t.length;n++){let s=t[n],r=[s,this.queue,e];i=i.then(()=>new Promise((t,e)=>{if(this.status.frozen)return e();this.pace=$(this.opts.speed,this.opts.deleteSpeed,this.opts.lifeLike),s[2]&&s[2].isFirst&&this.opts.beforeString(...r),this.opts.beforeStep(...r),s[0].call(this,s[1],s[2]).then(()=>{let e=this.queue.waiting.shift();return s[2]&&s[2].isPhantom?t():(s[2]&&s[2].isLast&&this.opts.afterString(...r),this.opts.afterStep(...r),this.queue.executed.push(e),t())})}))}i.then(()=>{if(this.opts.loop){let t=this.opts.loopDelay?this.opts.loopDelay:this.opts.nextStringDelay;this.wait(()=>{N(t),this.fire()},t.after)}this.status.completed=!0,this.opts.afterComplete(e)}).catch(()=>{})},this.type=function(t){return"object"!=typeof t||t.content?new Promise(e=>{this.wait(()=>(p(this.$e,t),e()),this.pace[0])}):(p(this.$e,t),Promise.resolve())},this.empty=function(){return new Promise(t=>(E?this.$e.value="":h(this.$e.childNodes).forEach(t=>{L.isEqualNode(t)||A(t)}),t()))},this.delete=function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(e=>{this.wait(()=>{let i=g();return i.length&&A(i[i.length-1]),M(this.$e),t&&i.length-1>0?this.delete(!0).then(()=>e()):e()},this.pace[1])})},this.setOptions=function(t){return new Promise(e=>(this.opts=Object.assign({},this.opts,t),e()))};let L=null,E=l(i);this.status={started:!1,complete:!1,frozen:!1,destroyed:!1},this.$e=i,this.timeouts=[],this.opts=Object.assign({},n,c),this.opts.html=!E&&this.opts.html,this.opts.nextStringDelay=D(this.opts.nextStringDelay),this.opts.loopDelay=D(this.opts.loopDelay),this.queue=new s(d,[this.pause,this.opts.startDelay]),this.$e.setAttribute("data-typeit-id",o),u("[data-typeit-id]:before {content: '.'; display: inline-block; width: 0; visibility: hidden;}"),x(i,E);let O=a(this.opts.strings);O=(t=>{let e=this.$e.innerHTML;return e?(this.$e.innerHTML="",this.opts.startDelete?(S(e).forEach(t=>{p(this.$e,t)}),this.queue.add([this.delete,!0]),m(1),t):[e.trim()].concat(t)):t})(O),this.opts.strings=O.map(t=>t.replace(/<\!--.*?-->/g,"")),this.opts.strings.length&&!y&&v()}var E=function(t,e,i){return!!t.length&&!t.some((function(t){return t.status[e]!==i}))},O=function(t){return"string"==typeof t?t=document.querySelectorAll(t):t.forEach||(t=[t]),h(t)};function P(t,e){var i=this;this.instances=O(t).map(t=>new j({typeIt:this,element:t,id:Math.random().toString(36).substring(2,15),options:e,queue:[],isAReset:!1}));const n=t=>{this.instances.forEach(e=>{t.call(this,e)})},s=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;n(n=>{let r="string"!=typeof t,o=r?t:n[t],u=T(s,[o,r?i:e]);n.queue.add(u)})};this.is=function(t){return E(this.instances,t,!0)},this.freeze=function(){n(t=>{t.status.frozen=!0})},this.unfreeze=function(){n(t=>{t.status.frozen&&(t.status.frozen=!1,t.fire())})},this.type=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return n(e=>{let i=q(t,e.opts.html);e.queue.add(T(i,e.type,!0))}),this},this.delete=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return s("delete",null===t,null===t?1:t),this},this.pause=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return s("pause",t),this},this.break=function(){return s("type",r("BR")),this},this.options=function(t){return s("setOptions",t),this},this.exec=function(t){return s(t),this},this.destroy=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.instances=this.instances.map(e=>{if(e.timeouts.forEach(t=>{clearTimeout(t)}),e.timeouts=[],t){let t=e.isInput?null:e.$e.querySelector(".ti-cursor");t&&e.$e.removeChild(t)}return e.status.destroyed=!0,e})},this.empty=function(){return s("empty"),this},this.reset=function(){return this.destroy(),this.instances=this.instances.map(t=>t.reset()),this},this.go=function(){return n(t=>{t.init()}),this}}i.d(e,"default",(function(){return P}))}]).default}));
\ No newline at end of file
<nav class="navbar">
<div class="navbar-container">
<div class="navbar-header">
<div class="navbar-header animated bounceIn">
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
</div>
<div class="navbar-menu">
......@@ -15,7 +15,9 @@
<nav class="navbar-mobile">
<div class="navbar-container">
<div class="navbar-header">
<div><a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a><a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a></div>
<div class="navbar-header-title animated bounceIn">
<a href="{{.Site.BaseURL}}">{{ .Site.Title }}</a>
</div>
<div class="menu-toggle" id="menu-toggle">
<span></span><span></span><span></span>
</div>
......@@ -25,6 +27,7 @@
{{ range .Site.Menus.main }}
<a class="menu-item" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name | safeHTML }}</a>
{{ end }}
<a href="javascript:void(0);" class="theme-switch"><i class="fas fa-adjust fa-rotate-180 fa-fw"></i></a>
</div>
</div>
</nav>
\ No newline at end of file
......@@ -76,7 +76,7 @@
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js }}
{{ $typeit = .Site.Params.cdn.typeit_js }}
{{ else }}
{{ $res := resources.Get "js/lib/typeit/typeit.min.js" | resources.Minify }}
{{ $res := resources.Get "js/lib/typeit/typeit.modern.min.js" | resources.Minify }}
{{ $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
{{ end }}
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown -->
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册