From 6dc5b0ad9964462c47c1fa17dd0eca1395a3abaf Mon Sep 17 00:00:00 2001 From: Azhs Date: Wed, 1 Jun 2022 22:18:04 +0800 Subject: [PATCH] Solve the problem of URL inaccessibility --- docs/index.html | 22 +++--- docs/js/docsify-plugin-flexible-alerts.min.js | 9 +++ docs/js/docsify-sidebar-collapse.min.js | 1 + docs/js/docsify-tabs.min.js | 9 +++ docs/js/index.js | 61 ++++++++++++++++ docs/js/progress.js | 70 +++++++++++++++++++ docs/js/time-updater.min.js | 1 + docs/zh/README.md | 4 +- 8 files changed, 165 insertions(+), 12 deletions(-) create mode 100644 docs/js/docsify-plugin-flexible-alerts.min.js create mode 100644 docs/js/docsify-sidebar-collapse.min.js create mode 100644 docs/js/docsify-tabs.min.js create mode 100644 docs/js/index.js create mode 100644 docs/js/progress.js create mode 100644 docs/js/time-updater.min.js diff --git a/docs/index.html b/docs/index.html index 5a83b8cbff..c615dae444 100644 --- a/docs/index.html +++ b/docs/index.html @@ -17,7 +17,7 @@
- + - - + + - + + - + - + + - + - + - + - + diff --git a/docs/js/docsify-plugin-flexible-alerts.min.js b/docs/js/docsify-plugin-flexible-alerts.min.js new file mode 100644 index 0000000000..f06031f6b2 --- /dev/null +++ b/docs/js/docsify-plugin-flexible-alerts.min.js @@ -0,0 +1,9 @@ +/*! + * docsify-plugin-flexible-alerts + * v1.1.0 + * https://github.com/fzankl/docsify-plugin-flexible-alerts#readme + * (c) 2020 Fabian Zankl + * MIT license + */ +!function(){"use strict";function h(t){return(h="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 e;!function(t,e){void 0===e&&(e={});var a,l,o=e.insertAt;t&&"undefined"!=typeof document&&(a=document.head||document.getElementsByTagName("head")[0],(l=document.createElement("style")).type="text/css","top"===o&&a.firstChild?a.insertBefore(l,a.firstChild):a.appendChild(l),l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t)))}(".alert{display:block;position:relative;word-wrap:break-word;word-break:break-word;padding:.75rem 1.25rem!important;margin-bottom:1rem!important}.alert>*{max-width:100%}.alert>:first-child{margin-top:0}.alert>:last-child{margin-bottom:0}.alert:before{content:unset!important}.alert+.alert{margin-top:-.25rem!important}.alert p{margin-top:.5rem;margin-bottom:.5rem}.alert .title{display:flex;align-items:center;flex-wrap:wrap;font-weight:600;margin:0}.icon{display:inline-block;width:16px;height:16px;background-repeat:no-repeat;margin-right:.5rem}.alert.callout{border:1px solid #eee;border-left-width:.25rem;border-radius:.25rem;background:var(--background)}.alert.callout.note{border-left-color:#17a2b8!important}.alert.callout.note .title{color:#17a2b8}.alert.callout.note .icon-note{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='%2317a2b8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 108 0a8 8 0 000 16zm.93-9.412l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM8 5.5a1 1 0 100-2 1 1 0 000 2z'/%3E%3C/svg%3E\")}.alert.callout.tip{border-left-color:#28a745!important}.alert.callout.tip .title{color:#28a745}.alert.callout.tip .icon-tip{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 352 512' fill='%2328a745' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0026.64 14.28h61.71a31.99 31.99 0 0026.64-14.28l17.09-25.69a31.989 31.989 0 005.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z'/%3E%3C/svg%3E\")}.alert.callout.warning{border-left-color:#f0ad4e!important}.alert.callout.warning .title{color:#f0ad4e}.alert.callout.warning .icon-warning{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 17 16' fill='%23f0ad4e' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8.982 1.566a1.13 1.13 0 00-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5a.905.905 0 00-.9.995l.35 3.507a.552.552 0 001.1 0l.35-3.507A.905.905 0 008 5zm.002 6a1 1 0 100 2 1 1 0 000-2z'/%3E%3C/svg%3E\")}.alert.callout.attention{border-left-color:#dc3545!important}.alert.callout.attention .title{color:#dc3545}.alert.callout.attention .icon-attention{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='%23dc3545' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8 15A7 7 0 108 1a7 7 0 000 14zm0 1A8 8 0 108 0a8 8 0 000 16z'/%3E%3Cpath fill-rule='evenodd' d='M11.354 4.646a.5.5 0 010 .708l-6 6a.5.5 0 01-.708-.708l6-6a.5.5 0 01.708 0z'/%3E%3C/svg%3E\")}.alert.flat{border-radius:.125rem;color:#383d41;background-color:#e2e3e5;border:1px solid #d6d8db}.alert.flat.note{color:#02587f;background-color:#cdeefd;border-color:#b4e6fc}.alert.flat.note .title{color:#01354d}.alert.flat.note .icon-note{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='%2301354d' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8 16A8 8 0 108 0a8 8 0 000 16zm.93-9.412l-2.29.287-.082.38.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246-.275 0-.375-.193-.304-.533L8.93 6.588zM8 5.5a1 1 0 100-2 1 1 0 000 2z'/%3E%3C/svg%3E\")}.alert.flat.tip{color:#285b2a;background-color:#dbefdc;border-color:#c9e7cb}.alert.flat.tip .title{color:#18381a}.alert.flat.tip .icon-tip{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 352 512' fill='%2318381a' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M96.06 454.35c.01 6.29 1.87 12.45 5.36 17.69l17.09 25.69a31.99 31.99 0 0026.64 14.28h61.71a31.99 31.99 0 0026.64-14.28l17.09-25.69a31.989 31.989 0 005.36-17.69l.04-38.35H96.01l.05 38.35zM0 176c0 44.37 16.45 84.85 43.56 115.78 16.52 18.85 42.36 58.23 52.21 91.45.04.26.07.52.11.78h160.24c.04-.26.07-.51.11-.78 9.85-33.22 35.69-72.6 52.21-91.45C335.55 260.85 352 220.37 352 176 352 78.61 272.91-.3 175.45 0 73.44.31 0 82.97 0 176zm176-80c-44.11 0-80 35.89-80 80 0 8.84-7.16 16-16 16s-16-7.16-16-16c0-61.76 50.24-112 112-112 8.84 0 16 7.16 16 16s-7.16 16-16 16z'/%3E%3C/svg%3E\")}.alert.flat.warning{color:#852d12;background-color:#ffddd3;border-color:#ffc9ba}.alert.flat.warning .title{color:#581e0c}.alert.flat.warning .icon-warning{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 17 16' fill='%23581e0c' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8.982 1.566a1.13 1.13 0 00-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5a.905.905 0 00-.9.995l.35 3.507a.552.552 0 001.1 0l.35-3.507A.905.905 0 008 5zm.002 6a1 1 0 100 2 1 1 0 000-2z'/%3E%3C/svg%3E\")}.alert.flat.attention{color:#7f231c;background-color:#fdd9d7;border-color:#fcc2bf}.alert.flat.attention .title{color:#551713}.alert.flat.attention .icon-attention{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='1em' height='1em' viewBox='0 0 16 16' fill='%23551713' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' d='M8 15A7 7 0 108 1a7 7 0 000 14zm0 1A8 8 0 108 0a8 8 0 000 16z'/%3E%3Cpath fill-rule='evenodd' d='M11.354 4.646a.5.5 0 010 .708l-6 6a.5.5 0 01-.708-.708l6-6a.5.5 0 01.708 0z'/%3E%3C/svg%3E\")}"),e={style:"callout",note:{label:"Note",icon:"icon-note",className:"note"},tip:{label:"Tip",icon:"icon-tip",className:"tip"},warning:{label:"Warning",icon:"icon-warning",className:"warning"},attention:{label:"Attention",icon:"icon-attention",className:"attention"},typeMappings:{info:"note",danger:"attention"}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[].concat(function(t,f){function p(t,e,a,l){var o=(t||"").match(new RegExp("".concat(e,":(([\\s\\w\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF-]*))")));return o?l?l(o[1]):o[1]:l?l(a):a}var w=function t(e,a,l){var o,r=2]*>(?:

|[\S\n]*)?\[!(\w*)((?:\|[\w*:[\s\w\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF-]*)*?)\]([\s\S]*?)(?:<\/p>)?<\s*\/\s*blockquote>/g,function(t,e,a,l){!w[e.toLowerCase()]&&w.typeMappings[e.toLowerCase()]&&(e=w.typeMappings[e.toLowerCase()]);var o=w[e.toLowerCase()];if(!o)return t;var r,n=p(a,"style",w.style),i=p(a,"iconVisibility","visible",function(t){return"hidden"!==t}),c=p(a,"labelVisibility","visible",function(t){return"hidden"!==t}),d=p(a,"label",o.label),s=p(a,"icon",o.icon),g=p(a,"className",o.className);"object"===h(d)&&((r=Object.keys(d).filter(function(t){return-1'),u='

'.concat(i?m:"").concat(c?d:"","

");return'
\n ').concat(i||c?u:"","\n

").concat(l,"

\n
")}))})},window.$docsify.plugins)}(); +//# sourceMappingURL=docsify-plugin-flexible-alerts.min.js.map \ No newline at end of file diff --git a/docs/js/docsify-sidebar-collapse.min.js b/docs/js/docsify-sidebar-collapse.min.js new file mode 100644 index 0000000000..2b067c7e25 --- /dev/null +++ b/docs/js/docsify-sidebar-collapse.min.js @@ -0,0 +1 @@ +!function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,n){var t,a=(n=void 0===n?{}:n).insertAt;e&&"undefined"!=typeof document&&(t=document.head||document.getElementsByTagName("head")[0],(n=document.createElement("style")).type="text/css","top"===a&&t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)))}var t;function a(e){e&&null!=t&&(e=e.getBoundingClientRect().top,document.querySelector(".sidebar").scrollBy(0,e-t))}function n(){requestAnimationFrame(function(){var e=document.querySelector(".app-sub-sidebar > .active");if(e)for(e.parentNode.parentNode.querySelectorAll(".app-sub-sidebar").forEach(function(e){return e.classList.remove("open")});e.parentNode.classList.contains("app-sub-sidebar")&&!e.parentNode.classList.contains("open");)e.parentNode.classList.add("open"),e=e.parentNode})}function o(e){t=e.target.getBoundingClientRect().top;var n=d(e.target,"LI",2);n&&(n.classList.contains("open")?(n.classList.remove("open"),setTimeout(function(){n.classList.add("collapse")},0)):(function(e){if(e)for(e.classList.remove("open","active");e&&"sidebar-nav"!==e.className&&e.parentNode;)"LI"!==e.parentNode.tagName&&"app-sub-sidebar"!==e.parentNode.className||e.parentNode.classList.remove("open"),e=e.parentNode}(s()),i(n),setTimeout(function(){n.classList.remove("collapse")},0)),a(n))}function s(){var e=document.querySelector(".sidebar-nav .active");return e||(e=d(document.querySelector('.sidebar-nav a[href="'.concat(decodeURIComponent(location.hash).replace(/ /gi,"%20"),'"]')),"LI",2))&&e.classList.add("active"),e}function i(e){if(e)for(e.classList.add("open","active");e&&"sidebar-nav"!==e.className&&e.parentNode;)"LI"!==e.parentNode.tagName&&"app-sub-sidebar"!==e.parentNode.className||e.parentNode.classList.add("open"),e=e.parentNode}function d(e,n,t){if(e&&e.tagName===n)return e;for(var a=0;e;){if(t<++a)return;if(e.parentNode.tagName===n)return e.parentNode;e=e.parentNode}}e(".sidebar-nav > ul > li ul {\n display: none;\n}\n\n.app-sub-sidebar {\n display: none;\n}\n\n.app-sub-sidebar.open {\n display: block;\n}\n\n.sidebar-nav .open > ul:not(.app-sub-sidebar),\n.sidebar-nav .active:not(.collapse) > ul {\n display: block;\n}\n\n/* 抖动 */\n.sidebar-nav li.open:not(.collapse) > ul {\n display: block;\n}\n\n.active + ul.app-sub-sidebar {\n display: block;\n}\n"),document.addEventListener("scroll",n);e("@media screen and (max-width: 768px) {\n /* 移动端适配 */\n .markdown-section {\n max-width: none;\n padding: 16px;\n }\n /* 改变原来按钮热区大小 */\n .sidebar-toggle {\n padding: 0 0 10px 10px;\n }\n /* my pin */\n .sidebar-pin {\n appearance: none;\n outline: none;\n position: fixed;\n bottom: 0;\n border: none;\n width: 40px;\n height: 40px;\n background: transparent;\n }\n}\n");var r,c="DOCSIFY_SIDEBAR_PIN_FLAG";function l(){var e="true"===(e=localStorage.getItem(c));localStorage.setItem(c,!e),e?(document.querySelector(".sidebar").style.transform="translateX(0)",document.querySelector(".content").style.transform="translateX(0)"):(document.querySelector(".sidebar").style.transform="translateX(300px)",document.querySelector(".content").style.transform="translateX(300px)")}768 ul"),1),a(t),n(e)}),e.ready(function(){document.querySelector(".sidebar-nav").addEventListener("click",o)})})}); \ No newline at end of file diff --git a/docs/js/docsify-tabs.min.js b/docs/js/docsify-tabs.min.js new file mode 100644 index 0000000000..db7fea6483 --- /dev/null +++ b/docs/js/docsify-tabs.min.js @@ -0,0 +1,9 @@ +/*! + * docsify-tabs + * v1.5.2 + * https://jhildenbiddle.github.io/docsify-tabs/ + * (c) 2018-2021 John Hildenbiddle + * MIT license + */ +!function(){"use strict";!function(t,o){void 0===o&&(o={});var a=o.insertAt;if(t&&"undefined"!=typeof document){var e=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===a&&e.firstChild?e.insertBefore(c,e.firstChild):e.appendChild(c),c.styleSheet?c.styleSheet.cssText=t:c.appendChild(document.createTextNode(t))}}(':root{--docsifytabs-border-color:#ededed;--docsifytabs-border-px:1px;--docsifytabs-border-radius-px: ;--docsifytabs-margin:1.5em 0;--docsifytabs-tab-background:#f8f8f8;--docsifytabs-tab-background--active:var(--docsifytabs-content-background);--docsifytabs-tab-color:#999;--docsifytabs-tab-color--active:inherit;--docsifytabs-tab-highlight-px:3px;--docsifytabs-tab-highlight-color:var(--theme-color,currentColor);--docsifytabs-tab-padding:0.6em 1em;--docsifytabs-content-background:inherit;--docsifytabs-content-padding:1.5rem}.docsify-tabs:before,.docsify-tabs__tab{z-index:1}.docsify-tabs__tab--active,.docsify-tabs__tab:focus{z-index:2}.docsify-tabs{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;position:relative}.docsify-tabs:before{-ms-flex-order:0;content:"";-ms-flex:1 1;flex:1 1;order:0}.docsify-tabs__tab{-ms-flex-order:-1;appearance:none;font-size:inherit;margin:0;order:-1;position:relative}.docsify-tabs__content{height:0;overflow:hidden;position:absolute;visibility:hidden;width:100%}.docsify-tabs__content :first-child{margin-top:0}.docsify-tabs__content :first-child~:last-child,.docsify-tabs__content :last-child{margin-bottom:0}.docsify-tabs__tab--active+.docsify-tabs__content{height:auto;overflow:auto;position:relative;visibility:visible}[class*=docsify-tabs--]{margin:1.5em 0;margin:var(--docsifytabs-margin)}[class*=docsify-tabs--] .docsify-tabs__tab{background:#f8f8f8;background:var(--docsifytabs-tab-background);color:#999;color:var(--docsifytabs-tab-color);padding:.6em 1em;padding:var(--docsifytabs-tab-padding)}[class*=docsify-tabs--] .docsify-tabs__tab--active{background:inherit;background:var(--docsifytabs-tab-background--active);color:inherit;color:var(--docsifytabs-tab-color--active)}[class*=docsify-tabs--] .docsify-tabs__content{background:inherit;background:var(--docsifytabs-content-background);padding:1.5rem;padding:var(--docsifytabs-content-padding)}.docsify-tabs--classic .docsify-tabs__content,.docsify-tabs--classic .docsify-tabs__tab,.docsify-tabs--classic:before{border-color:#ededed;border-width:1px;border:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color)}.docsify-tabs--classic:before{border-left-width:0;border-right-width:0;border-top-width:0;margin-right:1px;margin-right:var(--docsifytabs-border-px)}.docsify-tabs--classic .docsify-tabs__tab:first-of-type{border-top-left-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic .docsify-tabs__tab:last-of-type{border-top-right-radius:var(--docsifytabs-border-radius-px)}.docsify-tabs--classic .docsify-tabs__tab~.docsify-tabs__tab{margin-left:-1px;margin-left:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--classic .docsify-tabs__tab--active{border-bottom-width:0;box-shadow:inset 0 3px 0 0 var(--theme-color,currentColor);box-shadow:inset 0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--classic .docsify-tabs__content{border-radius:0;border-radius:0 var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px) var(--docsifytabs-border-radius-px);border-top:0;margin-top:-1px;margin-top:calc(0px - var(--docsifytabs-border-px))}.docsify-tabs--material .docsify-tabs__tab{background:transparent;border:0;margin-bottom:2px;margin-bottom:calc(var(--docsifytabs-tab-highlight-px) - var(--docsifytabs-border-px))}.docsify-tabs--material .docsify-tabs__tab--active{background:transparent;box-shadow:0 3px 0 0 var(--theme-color,currentColor);box-shadow:0 var(--docsifytabs-tab-highlight-px) 0 0 var(--docsifytabs-tab-highlight-color)}.docsify-tabs--material .docsify-tabs__content{border-color:#ededed;border-width:1px 0;border-bottom:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color);border-left:0 solid var(--docsifytabs-border-color);border-right:0 solid var(--docsifytabs-border-color);border-top:var(--docsifytabs-border-px) solid var(--docsifytabs-border-color)}',{insertAt:"top"});var t="tabs:replace",o={tabsContainer:"content",tabBlock:"docsify-tabs",tabButton:"docsify-tabs__tab",tabButtonActive:"docsify-tabs__tab--active",tabContent:"docsify-tabs__content"},a={codeMarkup:/(```[\s\S]*?```)/gm,commentReplaceMarkup:new RegExp("\x3c!-- ".concat(t," (.*) --\x3e")),tabBlockMarkup:/[\r\n]*(\s*)()[\r\n]+([\s|\S]*?)[\r\n\s]+()/m,tabCommentMarkup:/[\r\n]*(\s*)[\r\n]+([\s\S]*?)[\r\n]*\s*(?=)/m},e={persist:!0,sync:!0,theme:"classic",tabComments:!0,tabHeadings:!0};function c(t,o){if(Element.prototype.closest)return t.closest(o);for(;t;){if(r(t,o))return t;t=t.parentNode||null}return t}function r(t,o){return(Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector).call(t,o)}function s(t){var a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=c(t,".".concat(o.tabButton));if(r){var n=r.getAttribute("data-tab"),i=document.querySelector(".".concat(o.tabsContainer)),d=r.parentNode,b=Array.apply(null,d.querySelectorAll(".".concat(o.tabButton))),f=d.offsetTop;if(b.forEach((function(t){return t.classList.remove(o.tabButtonActive)})),r.classList.add(o.tabButtonActive),!a){if(e.persist){var l=i?Array.apply(null,i.querySelectorAll(".".concat(o.tabBlock))):[],u=l.indexOf(d),y=JSON.parse(sessionStorage.getItem(window.location.href))||{};y[u]=n,sessionStorage.setItem(window.location.href,JSON.stringify(y))}if(e.sync){var p=i?Array.apply(null,i.querySelectorAll(".".concat(o.tabButton,'[data-tab="').concat(n,'"]'))):[],m=JSON.parse(sessionStorage.getItem("*"))||[];p.forEach((function(t){s(t,!0)})),window.scrollBy(0,0-(f-d.offsetTop)),m.indexOf(n)>0&&m.splice(m.indexOf(n),1),0!==m.indexOf(n)&&(m.unshift(n),sessionStorage.setItem("*",JSON.stringify(m)))}}}}function n(){var t=decodeURIComponent((window.location.hash.match(/(?:id=)([^&]+)/)||[])[1]),a=t&&".".concat(o.tabBlock," #").concat(t);if(t&&document.querySelector(a)){var e,c=document.querySelector("#".concat(t));if(c.closest)e=c.closest(".".concat(o.tabContent));else for(e=c.parentNode;e!==document.body&&!e.classList.contains("".concat(o.tabContent));)e=e.parentNode;s(e.previousElementSibling)}}window&&(window.$docsify=window.$docsify||{},window.$docsify.tabs=window.$docsify.tabs||{},Object.keys(window.$docsify.tabs).forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=window.$docsify.tabs[t])})),window.$docsify.tabs.version="1.5.2",(e.tabComments||e.tabHeadings)&&(window.$docsify.plugins=[].concat((function(c,r){var i=!1;c.beforeEach((function(c){return(i=a.tabBlockMarkup.test(c))&&(c=function(c,r){for(var s,n,i=c.match(a.codeMarkup)||[],d=i.map((function(o,a){var e="\x3c!-- ".concat(t," CODEBLOCK").concat(a," --\x3e");return c=c.replace(o,(function(){return e})),e})),b=e.theme?"".concat(o.tabBlock,"--").concat(e.theme):"",f=document.createElement("div"),l=1,u=function(){var i=s[0],d="",u="",y=e.tabComments&&a.tabCommentMarkup.test(i),p=e.tabHeadings&&a.tabHeadingMarkup.test(i),m=s[1],h=s[2],g=s[4];if(y||p){d="\x3c!-- ".concat(t,'
--\x3e'),u="\n".concat(m,"\x3c!-- ").concat(t,"
--\x3e");for(var v=function(){f.innerHTML=n[2].trim()?r.compiler.compile(n[2]).replace(/<\/?p>/g,""):"Tab ".concat(l);var a=f.innerHTML,e=(n[3]||"").trim(),c=(f.textContent||f.firstChild.getAttribute("alt")||f.firstChild.getAttribute("src")).trim().toLowerCase();i=i.replace(n[0],(function(){return["\n".concat(m,"\x3c!-- ").concat(t,' --\x3e"),"\n".concat(m,"\x3c!-- ").concat(t,'
--\x3e'),"\n\n".concat(m).concat(e),"\n\n".concat(m,"\x3c!-- ").concat(t,"
--\x3e")].join("")})),l++};null!==(n=(e.tabComments?a.tabCommentMarkup.exec(i):null)||(e.tabHeadings?a.tabHeadingMarkup.exec(i):null));)v()}i=(i=i.replace(h,(function(){return d}))).replace(g,(function(){return u})),c=c.replace(s[0],(function(){return i}))};null!==(s=a.tabBlockMarkup.exec(c));)u();return d.forEach((function(t,o){c=c.replace(t,(function(){return i[o]}))})),c}(c,r)),c})),c.afterEach((function(t,o){i&&(t=function(t){for(var o,e=function(){var a=o[0],e=o[1]||"";t=t.replace(a,(function(){return e}))};null!==(o=a.commentReplaceMarkup.exec(t));)e();return t}(t)),o(t)})),c.doneEach((function(){var t,a,c,r;i&&(a=(t=document.querySelector(".".concat(o.tabsContainer)))?Array.apply(null,t.querySelectorAll(".".concat(o.tabBlock))):[],c=JSON.parse(sessionStorage.getItem(window.location.href))||{},r=JSON.parse(sessionStorage.getItem("*"))||[],n(),a.forEach((function(t,a){var s=t.querySelector(".".concat(o.tabButtonActive));s||(e.sync&&r.length&&(s=r.map((function(a){return t.querySelector(".".concat(o.tabButton,'[data-tab="').concat(a,'"]'))})).filter((function(t){return t}))[0]),!s&&e.persist&&(s=t.querySelector(".".concat(o.tabButton,'[data-tab="').concat(c[a],'"]'))),(s=s||t.querySelector(".".concat(o.tabButton)))&&s.classList.add(o.tabButtonActive))})))})),c.mounted((function(){var t=document.querySelector(".".concat(o.tabsContainer));t&&t.addEventListener("click",(function(t){s(t.target)})),window.addEventListener("hashchange",n,!1)}))}),window.$docsify.plugins||[])))}(); +//# sourceMappingURL=docsify-tabs.min.js.map diff --git a/docs/js/index.js b/docs/js/index.js new file mode 100644 index 0000000000..4a6ec1bc59 --- /dev/null +++ b/docs/js/index.js @@ -0,0 +1,61 @@ +;(function(win) { + function isFunction(functionToCheck) { + return functionToCheck && {}.toString.call(functionToCheck) === '[object Function]' + } + + win.EditOnGithubPlugin = {} + + function create(docBase, docEditBase, title) { + title = title || 'Edit on github' + docEditBase = docEditBase || docBase.replace(/\/blob\//, '/edit/') + + function editDoc(event, vm) { + var docName = vm.route.file + + if (docName) { + var editLink = docEditBase + docName + window.open(editLink) + event.preventDefault() + return false + } else { + return true + } + } + + win.EditOnGithubPlugin.editDoc = editDoc + + function generateHeader(title) { + return header = [ + '
', + '

', + title, + '

', + '
' + ].join('') + } + + return function(hook, vm) { + win.EditOnGithubPlugin.onClick = function(event) { + EditOnGithubPlugin.editDoc(event, vm) + } + + if (isFunction(title)) { + + hook.afterEach(function (html) { + return generateHeader(title(vm.route.file)) + html + }) + } else { + var header = generateHeader(title) + + hook.afterEach(function (html) { + return header + html + }) + } + + + } + } + + win.EditOnGithubPlugin.create = create +}) (window) diff --git a/docs/js/progress.js b/docs/js/progress.js new file mode 100644 index 0000000000..087951e8a8 --- /dev/null +++ b/docs/js/progress.js @@ -0,0 +1,70 @@ +function plugin(hook, vm) { + let marginTop + hook.mounted(function () { + const content = document.getElementsByClassName("content")[0] + marginTop = parseFloat( + window.getComputedStyle(content).paddingTop.replace("px", "") + ) + + let insertDOM = ` +
+
+
+ ` + const mainDOM = document.getElementsByTagName("body")[0] + mainDOM.innerHTML = mainDOM.innerHTML + insertDOM + + function switcher() { + const body = document.getElementsByTagName("body")[0] + if (!body.classList.contains("close")) { + body.classList.add("close") + } else { + body.classList.remove("close") + } + } + + const btn = document.querySelector("div.sidebar-toggle-button") + btn.addEventListener("click", function (e) { + e.stopPropagation() + switcher() + }) + }) + hook.ready(function () { + window.addEventListener("scroll", function (e) { + let totalHeight = + marginTop + + parseFloat( + window + .getComputedStyle(document.getElementById("main")) + .height.replace("px", "") + ) + let scrollTop = + document.body.scrollTop + document.documentElement.scrollTop + let remain = totalHeight - document.body.offsetHeight + document.getElementById("progress-display").style.width = + Math.ceil((scrollTop / remain) * 100) + "%" + }) + }) +} + +// Docsify plugin options +window.$docsify["progress"] = Object.assign( + { + position: "top", + color: "var(--theme-color,#42b983)", + height: "3px", + }, + window.$docsify["progress"] +) +window.$docsify.plugins = [].concat(plugin, window.$docsify.plugins) diff --git a/docs/js/time-updater.min.js b/docs/js/time-updater.min.js new file mode 100644 index 0000000000..5e891b480e --- /dev/null +++ b/docs/js/time-updater.min.js @@ -0,0 +1 @@ +let defaultDocsifyUpdatedOptions={text:">Last Modify: {docsify-updated}",formatUpdated:"{YYYY}/{MM}/{DD}",whereToPlace:"bottom"};function plugin(t,d){let o=d.config.timeUpdater.text,i=String(d.config.timeUpdater.whereToPlace).toLowerCase();t.beforeEach(function(t){return"top"!==i?t+"\n\n"+o:o+"\n\n"+t})}window.$docsify=window.$docsify||{},window.$docsify.formatUpdated=(window.$docsify.timeUpdater||defaultDocsifyUpdatedOptions).formatUpdated,window.$docsify.timeUpdater=Object.assign(defaultDocsifyUpdatedOptions,window.$docsify.timeUpdater),window.$docsify.plugins=(window.$docsify.plugins||[]).concat(plugin); \ No newline at end of file diff --git a/docs/zh/README.md b/docs/zh/README.md index 0c5f9451b4..9152ae7645 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -49,7 +49,7 @@ Layotto 提供了多种语言版本的 SDK,SDK 通过 gRPC 与 Layotto 进行 如果您想把应用部署到不同的云平台(例如将阿里云上的应用部署到 AWS),您只需要在 Layotto 提供的 [配置文件](https://github.com/mosn/layotto/blob/main/configs/runtime_config.json) 里修改配置、指定自己想用的基础设施类型,不需要修改应用的代码就能让应用拥有"跨云部署"能力,大大提高了程序的可移植性。 -![系统架构图](https://raw.githubusercontent.com/mosn/layotto/main/docs/img/runtime-architecture.png) +![系统架构图](../img/runtime-architecture.png) ## 快速开始 @@ -134,7 +134,7 @@ Layotto enriches the CNCF CLOUD N | 平台 | 联系方式 | | :-------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- | -| 💬 [钉钉](https://www.dingtalk.com/zh) (用户群) | 群号: 31912621 或者扫描下方二维码

| +| 💬 [钉钉](https://www.dingtalk.com/zh) (用户群) | 群号: 31912621 或者扫描下方二维码

| | 💬 [钉钉](https://www.dingtalk.com/zh) (社区会议群) | 群号:41585216
[Layotto 在每周五晚 8 点进行社区会议,欢迎所有人](zh/community/meeting.md) | [comment]: <> (| 💬 [微信](https://www.wechat.com/) | 扫描下方二维码添加好友,她会邀请您加入微信群
)