1
0

index.min.html 16 KB

12345678910111213
  1. <!doctype html><html><markdown-html license="CC BY-SA 4.0 International" author=PJ568 repo=https://github.com/PJ-568/markdown.html version=1.10.2></markdown-html><head><meta charset=utf-8><meta content="HTML read markdown" name=description><meta content="markdown, html, renderer, low-dependency, one-click deployment" name=keywords><meta content=PJ568 name=author><meta content="width=256,initial-scale=1" name=viewport><script defer src=https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/marked/4.0.2/marked.min.js></script><script src=https://lib.baomitu.com/pjax/0.2.8/pjax.min.js></script><script src=https://lib.baomitu.com/translate.js/3.7.2/translate.js></script><script src=https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/Darkmode.js/1.5.7/darkmode-js.min.js></script><script src=https://lf9-cdn-tos.bytecdntp.com/cdn/expire-1-y/mermaid/8.14.0/mermaid.min.js></script><script>(()=>{let K=0,Q=`Animated`,a0=`?p=`,P=`.markdown-body`,L=`loading`,Y=`animationend`,$=`Animation-slideInLeft`,N=1,R=`Animate--slideInRight`,S=`p`,_=`Animation-slideInRight`,a9=`click`,a1=``,O=null,U=`http://example.com`,aa=`_blank`,a7=`</ul></li>`,a6=`自生成。`,Z=`.content, .old-content`,a5=200,W=`index.md`,a3=`content-type`,a8=`,`,ab=`smooth`,V=`/`,M=`%`,T=`.markdown-body .content`,a4=`text/markdown`,a2=`README.md`,X=Array.from;var c=(()=>{b.countLoading=b.countLoading+ N});var n=(()=>{try{const a=window.Pjax||(()=>{console.warn(`Pjax 不存在?`)});i=new a({selectors:[`head title`,P,`.pjax-reload`],switches:{".markdown-body":a.switches.sideBySide},switchesOptions:{".markdown-body":{classNames:{remove:`Animated Animated-remove Animated--reverse Animate--fast Animate--noDelay`,add:Q,backward:R,forward:`Animate--slideInLeft`}}},cacheBust:!1})}catch(a){console.error(`PJAX 初始化出错:`+ a)}});var z=((a,b)=>{x(`<h1>加载失败</h1><p>加载文档<code>${a}</code>时出错:<code>${b}</code>。您可以尝试<a class="refresh-btn" href="">重新加载</a>或<a class="back-btn">返回</a>。</p>`,`加载失败`);E(window.location.origin+ window.location.pathname+ `?p=error.md`);y(document.querySelector(P),Z,[_,$]).then(()=>{E(window.location.origin+ window.location.pathname+ (a?a0+ a:a1))});d()});var D=(()=>{if(k){document.querySelector(P).addEventListener(a9,(async(a)=>{const b=a.target.closest(`a[href\$=".md"]`);if(b){try{a.preventDefault();c();await A(await u(b.href))}catch(a){console.error(`自定义 PJAX 出错:`+ a)}}}))}});var x=((a,b=O,c=O)=>{try{document.querySelector(P).innerHTML=`<div class="old-content Animated Animated-remove Animated--reverse Animate--fast Animate--noDelay Animate--slideInLeft">${document.querySelector(T).innerHTML}</div><div class="content Animated Animate--slideInRight">${a}</div>`;firstH1=document.querySelector(`.markdown-body .content h1`);document.title=b?b:(firstH1?firstH1.textContent:c)}catch(a){throw a}});var d=(()=>{b.countLoading=b.countLoading- N});var u=(async(a)=>{const b=new URL(a);const c=new URLSearchParams(b.search);a=v(c.get(S));return a});var C=(()=>{i._handleResponse=i.handleResponse;i.handleResponse=(async(a,b,c,d)=>{if(b.responseText.startsWith(`<!doctype html><html><markdown-html`)||b.responseText.startsWith(`<!doctype html>
  2. <html>
  3. <markdown-html`)){await A(await u(c))}else{i._handleResponse(a,b,c,d)}})});var E=((a=window.location.href)=>{if(k){if(l>m){history.pushState({url:a,title:document.title,uid:l},O,a);m=l++}else{m=l- N}}});var r=(()=>{try{translate.selectLanguageTag.refreshRender()}catch(a){console.error(`刷新翻译出错:`+ a)}});var s=(a=>{a=new URL(a,U).pathname;const b=a.lastIndexOf(V);return a.substring(K,b+ N)});var y=((a,b,c)=>new Promise(d=>{var e=K;const f=a.querySelectorAll(b);const g=f.length;const h=(b=>{if(c.includes(b.animationName)&&X(f).includes(b.target)){e++;if(e===g){a.removeEventListener(Y,h);d()}}});a.addEventListener(Y,h)}));var p=(()=>{try{const a=window.Darkmode||(()=>{console.warn(`Darkmode.js 不存在?`)});j=new a()}catch(a){console.error(`初始化 Darkmode.js 出错:`+ a)}});var o=(()=>{try{translate.service.use(`client.edge`);translate.request.listener.start();translate.setAutoDiscriminateLocalLanguage();translate.language.setUrlParamControl();translate.ignore.class.push(`notTranslate`);translate.execute()}catch(a){console.error(`翻译系统出错:`+ a)}});var h=(async()=>{if(g){return g}else{return await u(window.location.href)}});var G=(()=>{const a=document.querySelector(`.to-home`);a.href=window.location.pathname});var w=(a=>!a.match(/^\//));var I=(()=>{p();G();H();F();o();n();C();D()});var H=(()=>{const a=document.querySelector(`.about-btn`);a.href=`?p=${s(window.location.pathname)}about.md`});var q=(()=>{try{const e=translate.language.getCurrent();const f=translate.language.getLocal();if(e!==f){const e=document.querySelectorAll(`.translate-info`);if(e){e.forEach((a=>{a.remove()}))};var a=document.createElement(`blockquote`);a.classList.add(`translate-info`);var b=document.createElement(S);b.innerText=`当前页面已翻译。您可以:`;var c=document.createElement(S);var d=document.createElement(`a`);d.classList.add(`translate-switch`);d.href=`javascript:;`;d.title=`切换到原语言`;d.innerText=`切换到文章原本的语言`;a.appendChild(b);a.appendChild(d);const f=document.querySelector(T);f.insertBefore(a,f.children[N])}}catch(a){console.error(`检查并提示翻译出错:`+ a)}});var v=(a=>{if(a){if(w(a)){a=t()+ a};a=new URL(a,U).pathname;if(!a.endsWith(`.md`)){if(!a.endsWith(V)){a+=V};a+=W}};return a});var t=(()=>s(window.location.href));var J=(async()=>{r();q();await mermaid.init({noteMargin:10},`.language-mermaid`);translate.execute();d();window.scrollTo({top:K,behavior:ab})});const a=`
  4. # 关于
  5. ## MARKDOWN.HTML
  6. 旨在提供低依赖、一键部署的 Markdown 网页渲染方案。
  7. 详情请访问 [GitHub](https://github.com/PJ-568/MARKDOWN.HTML) 或 [Gitee](https://gitee.com/PJ-568/MARKDOWN.HTML) 仓库。
  8. `;var b={countLoading:K};Object.defineProperty(b,`countLoading`,{get:function(){return this._countLoading},set:function(a){if(a<K){a=K};const b=document.querySelector(`.loading-bar`);const c=document.querySelector(`.loading-bar .progress`);if(this.countLoading===K&&a>K){var d=20;var f=95;b.classList.add(L);c.style.width=d+ M;clearInterval(e);e=setInterval((()=>{d+=3;if(d>f){d=f};c.style.width=d+ M}),500)}else if(this.countLoading>K&&a===K){clearInterval(e);c.style.width=`100%`;b.classList.remove(L);setTimeout((()=>{c.style.width=K}),400)};this._countLoading=a}});b.countLoading=K;var e=O;var f=O;var g=O;let i;let j;const k=history&&history.pushState;var l=N;var m=K;const A=async(b,c=O)=>{if(b===O){var d=O;const a=t();if(f){d=a+ a2}else if(f===!1){d=a+ W}else{c=await fetch(t()+ W);if(c.ok&&c.headers.get(a3).startsWith(a4)){f=!1;d=a+ W}else{c=O;f=!0;d=a+ a2}}}else if(b.endsWith(`about.md`)){c=await fetch(b);if(c.ok&&c.headers.get(a3).startsWith(a4)){var e=await c.text();const b=a+ await e.replace(/^# .*/m,a1);c={ok:!0,status:a5,statusText:a6,text:async()=>b}}else{c={ok:!0,status:a5,statusText:a6,text:async()=>a+ `*无更多详细信息*`}}};try{g=b?b:d;x(await B(b?b:d,c));document.querySelector(`html`).classList.add(`loaded`);y(document.querySelector(P),Z,[_,$]).then(async()=>{await J();E(window.location.origin+ window.location.pathname+ (b?a0+ b:a1))})}catch(a){z(b?b:d,a)}};const B=async(a,b=O)=>{var c=(a=>{const b=X(a.querySelectorAll(`h1, h2, h3, h4, h5, h6`));if(b.length===K)return `<i>无目录</i>`;var c=`<ul>`;var d=[];b.forEach(a=>{const b=parseInt(a.tagName.charAt(N));const e=a.textContent.toLowerCase().replace(/ /g,`-`).replace(/[^\w\u4e00-\u9fa5-]/g,a1);a.setAttribute(`id`,e);while(d.length>K&&d[d.length- N].level>=b){d.pop();c+=a7};if(d.length===K||d[d.length- N].level<b){c+=`<li><ul>`}else{c+=`</li><li>`};c+=`<a href="#${e}">${a.textContent}</a>`;d.push({level:b})});while(d.length>K){c+=a7;d.pop()};c+=`</ul>`;return c});if(!b){b=await fetch(a);if(!b.ok&&b.headers.get(a3).startsWith(a4)){throw new Error(`请求失败:`+ a+ a8+ b.headers.get(a3)+ a8+ b.status+ a8+ b.statusText)}};var d=await b.text();const e=d.match(/\[.*\]\(.*\.md\)/g);if(e){e.forEach(b=>{const c=b.match(/\[.*\]/)[K].slice(N,-N);var e=b.match(/\(.*\)/)[K].slice(N,-N);if(w(e)){if(g){e=s(a)+ e}else{e=t()+ e};console.log(w(e),e,g);e=new URL(e,U).pathname};const f=`[${c}](${window.location.pathname}?p=${e})`;d=d.replace(b,f)})};var f=marked.parse(d);if(f===a1){f=`<i>空文件</i>`};f=`<details class="outline"><summary>${decodeURIComponent(a)}</summary></details><hr>${f}`;const h=new DOMParser();const i=h.parseFromString(f,`text/html`);const j=c(i);i.querySelector(`.outline`).innerHTML+=j;return i.body.innerHTML};const F=async()=>{try{await A(await h())}catch(a){z(await h(),`初始化内容时出错:`+ a)}};window.addEventListener(`DOMContentLoaded`,()=>I());translate.listener.renderTaskFinish=(a=>{d()});document.addEventListener(`pjax:send`,(()=>{c()}));document.addEventListener(`pjax:complete`,(async()=>{await A(await h());D()}));document.addEventListener(Y,function a(b){if(b.animationName===_){const a=document.querySelector(T);a.classList.remove(Q);a.classList.remove(R)}else if(b.animationName===$){document.querySelector(`.markdown-body .old-content`).remove()}});document.addEventListener(a9,(a=>{const b=a.target.closest(`.content img, .content svg`);if(b){const c=b.getAttribute(`src`)||b.getAttribute(`xlink:href`);if(c){window.open(c,aa);a.preventDefault();return}else{const c=window.open(a1,aa);c.document.write(b.outerHTML);c.document.close();a.preventDefault();return}};if(a.target.closest(`.back-btn`)){window.history.back()}else if(a.target.closest(`.refresh-btn`)){window.location.reload()}else if(a.target.closest(`.dark-btn`)){j.toggle()}else if(a.target.closest(`.translate-switch`)){translate.changeLanguage(translate.language.getLocal())}else if(a.target.closest(`a[href^="#"]`)){const b=a.target.getAttribute(`href`);if(b!==`#`){a.preventDefault();const c=document.querySelector(b);if(c){c.scrollIntoView({behavior:ab})}else{console.error(`ID 为 ${targetId} 的元素不存在。`)}}}}));window.onpopstate=(a=>{if(l>N){--l}})})()</script><title>加载中</title><style>*{font-family:Exo,sans-serif;text-decoration:none}:root{background-color:#e6e6e6}::selection{background-color:#dcedc8}body{margin:0}a{color:#66bb6a;cursor:pointer;text-decoration:none}a:hover{color:#2e7d32}.background{z-index:-1;background-color:#e6e6e6;width:100%;height:100%;position:fixed;top:0;left:0}nav{z-index:1;background-color:#616161;justify-content:space-between;align-items:center;width:min-content;display:flex;position:fixed;top:0;right:0}nav a{color:#fafafa;padding:.3rem;transition:color .2s,background-color .2s}nav a:hover{color:#fff;background-color:#212121}.Animated{animation-duration:1s;animation-fill-mode:both}.Animated-remove{position:absolute}.Animated--reverse{animation-direction:reverse}.Animate--fast{animation-duration:.5s}.Animate--noDelay{animation-delay:0s!important}.Animate--slideInRight{animation-name:Animation-slideInRight}@keyframes Animation-slideInRight{0%{transform:translate(200%)}to{transform:translate(0)}}.Animate--slideInLeft{animation-name:Animation-slideInLeft}@keyframes Animation-slideInLeft{0%{transform:translate(-100%)}to{transform:translate(0)}}.markdown-body{color:#212121;box-sizing:border-box;background-color:#fafafa;width:100%;max-width:950px;min-height:300px;margin:3rem auto;position:relative;overflow-x:hidden;box-shadow:0 2px 6px #6464644d}.markdown-body .content,.markdown-body .old-content{margin:2rem}.markdown-body img,.markdown-body video,.markdown-body iframe,.markdown-body object,.markdown-body embed,.markdown-body svg,.markdown-body canvas,.markdown-body audio{max-width:100%}.markdown-body a{transition:color .2s,background-color .2s}.markdown-body a:hover{background-color:#ffffff1a}.markdown-body ul,.markdown-body ol{padding-left:2rem}.markdown-body pre{background-color:#0000000d;border-radius:.1rem;padding:.4rem;overflow-y:scroll}.markdown-body code{background-color:#0000000d;border-radius:.1rem;padding:.2rem;font-family:cousine nerd font mono,monospace;font-size:small}.markdown-body pre code{background-color:unset;font-size:unset;padding:unset;border-radius:unset}.markdown-body blockquote{background-color:#0000000d;border-left:5px solid #0000001a;margin:.5rem 2rem;padding:.4rem;font-size:small}.markdown-body details{border:1px solid #0000001a;border-radius:.1rem}.markdown-body summary{cursor:pointer;background-color:#0000000d;padding:.4rem;font-size:small;font-weight:700}.markdown-body details a{margin-left:-2rem}.markdown-body table{border-spacing:0;border-collapse:separate;border:.1rem solid #0000000d;border-radius:.1rem;width:100%}.markdown-body table td,.markdown-body table th{border-top:.1rem solid #0000000d;border-right:.1rem solid #0000000d}.markdown-body table td:last-child,.markdown-body th:last-child{border-right-color:#0000}.markdown-body table thead tr:first-child>*{border-top:.1rem solid #0000}.loading-bar{z-index:2;opacity:0;transition:opacity .4s linear;position:fixed;top:0;left:0;& .progress{background-color:#2e7d32;width:0;height:4px;position:fixed;top:0;left:0;box-shadow:0 0 10px #66bb6ab3}&.loading{opacity:1;transition:none;& .progress{transition:width .4s}}}.translateSelectLanguage{color:inherit;z-index:3;opacity:0;cursor:pointer;background-color:#616161;width:17%;height:100%;position:absolute;top:0;left:50%}.darkmode--activated .markdown-body img,.darkmode--activated .markdown-body svg{isolation:isolate;mix-blend-mode:difference}.darkmode-layer,.darkmode-toggle{z-index:3}@media only screen and (width<=950px){html,body,.markdown-body{height:100%}.markdown-body{min-width:256px;margin:0;top:0;overflow-y:scroll}}</style></head><body><nav><a class=back-btn title=返回> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-back" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M9 11l-4 4l4 4m-4 -4h11a4 4 0 0 0 0 -8h-1"/></svg> </a><a class=refresh-btn href title=刷新> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-refresh" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4"/><path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg> </a><a class=to-home title=主页> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-home" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M5 12l-2 0l9 -9l9 9l-2 0"/><path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7"/><path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6"/></svg> </a><a id=translate title=更改语言> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-language" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M4 5h7"/><path d="M9 3v2c0 4.418 -2.239 8 -5 8"/><path d="M5 9c0 2.144 2.952 3.908 6.7 4"/><path d="M12 20l4 -9l4 9"/><path d="M19.1 18h-6.2"/></svg> </a><a class=dark-btn href=javascript:; title=切换显示模式> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-brightness" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0"/><path d="M12 3l0 18"/><path d="M12 9l4.65 -4.65"/><path d="M12 14.3l7.37 -7.37"/><path d="M12 19.6l8.85 -8.85"/></svg> </a><a class=about-btn title=关于> <svg class="icon icon-tabler icons-tabler-outline icon-tabler-info-circle" viewbox="0 0 24 24" fill=none height=24 stroke=currentColor stroke-linecap=round stroke-linejoin=round stroke-width=2 width=24 xmlns=http://www.w3.org/2000/svg><path d="M0 0h24v24H0z" fill=none stroke=none /><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0"/><path d="M12 9h.01"/><path d="M11 12h1v4h1"/></svg> </a></nav><div class=markdown-body><div class=content><h1>加载中……</h1><p>请稍等。</p></div></div><div class=loading-bar><div class=progress></div></div><div class=background></div><script src=https://lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/instant.page/5.1.0/instantpage.min.js></script></body></html>