-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.min.html
13 lines (8 loc) · 15.6 KB
/
index.min.html
1
2
3
4
5
6
7
8
9
10
11
12
13
<!doctype html><html><markdown-html license="CC BY-SA 4.0 International" author=PJ568 repo=https://github.com/PJ-568/markdown.html version=1.8.0></markdown-html><head><meta charset=utf-8><meta content="HTML read markdown" name=description><meta content="width=256,initial-scale=1" name=viewport><script defer src=//lib.baomitu.com/marked/4.0.2/marked.min.js></script><script src=//lib.baomitu.com/pjax/0.2.8/pjax.min.js></script><script src=//lib.baomitu.com/translate.js/3.7.2/translate.js></script><script src=//lib.baomitu.com/Darkmode.js/1.5.7/darkmode-js.min.js></script><script>(()=>{let O=`.markdown-body`,K=`loading`,L=`%`,U=`/`,S=`.markdown-body .content`,a0=``,a4=200,aa=`click`,a6=`</ul></li>`,a9=`href`,ab=`smooth`,X=`animationend`,Q=`Animate--slideInRight`,a5=`自生成。`,_=`Animation-slideInLeft`,a8=`a[href\$=".md"]`,R=`p`,J=0,a7=`,`,a3=`text/markdown`,a1=`README.md`,Z=`Animation-slideInRight`,Y=`.content, .old-content`,M=1,P=`Animated`,$=`?p=`,V=`index.md`,a2=`content-type`,T=`http://example.com`,N=null,W=Array.from;var n=(()=>{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 D=((a=window.location.href)=>{if(j){if(k>l){history.pushState({url:a,title:document.title,uid:k},N,a);l=k++}else{l=k- M}}});var C=(()=>{if(j){document.querySelector(O).addEventListener(aa,(async(a)=>{const b=a.target.closest(a8);if(b){try{a.preventDefault();c();await z(await t(b.href))}catch(a){console.error(`自定义 PJAX 出错:`+ a)}}}))}});var m=(()=>{try{const a=window.Pjax||(()=>{console.warn(`Pjax 不存在?`)});h=new a({selectors:[`head title`,O,`.pjax-reload`],switches:{".markdown-body":a.switches.sideBySide},switchesOptions:{".markdown-body":{classNames:{remove:`Animated Animated--reverse Animate--fast Animate--noDelay`,add:P,backward:Q,forward:`Animate--slideInLeft`}}},cacheBust:!1})}catch(a){console.error(`PJAX 初始化出错:`+ a)}});var q=(()=>{try{translate.selectLanguageTag.refreshRender()}catch(a){console.error(`刷新翻译出错:`+ a)}});var H=(()=>{o();F();G();E();n();m();B();C()});var t=(async(a)=>{const b=new URL(a);const c=new URLSearchParams(b.search);a=u(c.get(R));return a});var G=(()=>{const a=document.querySelector(`.about-btn`);a.href=`?p=${r(window.location.pathname)}about.md`});var y=((a,b)=>{w(`<h1>加载失败</h1><p>加载文档<code>${a}</code>时出错:<code>${b}</code>。您可以尝试<a class="refresh-btn" href="">重新加载</a>或<a class="back-btn">返回</a>。</p>`,`加载失败`);D(window.location.origin+ window.location.pathname+ `?p=error.md`);x(document.querySelector(O),Y,[Z,_]).then(()=>{D(window.location.origin+ window.location.pathname+ (a?$+ a:a0))});d()});var B=(()=>{h._handleResponse=h.handleResponse;h.handleResponse=(async(a,b,c,d)=>{if(b.responseText.startsWith(`<!doctype html><html><markdown-html`)||b.responseText.startsWith(`<!doctype html>
<html>
<markdown-html`)){await z(await t(c))}else{h._handleResponse(a,b,c,d)}})});var I=(async()=>{q();p();translate.execute();d();window.scrollTo({top:J,behavior:ab})});var x=((a,b,c)=>new Promise(d=>{var e=J;const f=a.querySelectorAll(b);const g=f.length;const h=(b=>{if(c.includes(b.animationName)&&W(f).includes(b.target)){e++;if(e===g){a.removeEventListener(X,h);d()}}});a.addEventListener(X,h)}));var g=(async()=>await t(window.location.href));var c=(()=>{b.countLoading=b.countLoading+ M});var w=((a,b=N,c=N)=>{try{document.querySelector(O).innerHTML=`<div class="old-content Animated Animated-remove Animated--reverse Animate--fast Animate--noDelay Animate--slideInLeft">${document.querySelector(S).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 u=(a=>{if(a){if(v(a)){a=s()+ a};a=new URL(a,T).pathname;if(!a.endsWith(`.md`)){if(!a.endsWith(U)){a+=U};a+=V}};return a});var d=(()=>{b.countLoading=b.countLoading- M});var o=(()=>{try{const a=window.Darkmode||(()=>{console.warn(`Darkmode.js 不存在?`)});i=new a()}catch(a){console.error(`初始化 Darkmode.js 出错:`+ a)}});var p=(()=>{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(R);b.innerText=`当前页面已翻译。您可以:`;var c=document.createElement(R);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(S);f.insertBefore(a,f.children[M])}}catch(a){console.error(`检查并提示翻译出错:`+ a)}});var r=(a=>{a=new URL(a,T).pathname;const b=a.lastIndexOf(U);return a.substring(J,b+ M)});var s=(()=>r(window.location.href));var F=(()=>{const a=document.querySelector(`.to-home`);a.href=window.location.pathname});const a=`
# 关于
## MARKDOWN.HTML
旨在提供低依赖、一键部署的 Markdown 网页渲染方案。
详情请访问 [GitHub](https://github.com/PJ-568/MARKDOWN.HTML) 或 [Gitee](https://gitee.com/PJ-568/MARKDOWN.HTML) 仓库。
`;var b={countLoading:J};Object.defineProperty(b,`countLoading`,{get:function(){return this._countLoading},set:function(a){if(a<J){a=J};const b=document.querySelector(`.loading-bar`);const c=document.querySelector(`.loading-bar .progress`);if(this.countLoading===J&&a>J){var d=20;var f=95;b.classList.add(K);c.style.width=d+ L;clearInterval(e);e=setInterval((()=>{d+=3;if(d>f){d=f};c.style.width=d+ L}),500)}else if(this.countLoading>J&&a===J){clearInterval(e);c.style.width=`100%`;b.classList.remove(K);setTimeout((()=>{c.style.width=J}),400)};this._countLoading=a}});b.countLoading=J;var e=N;var f=N;let h;let i;const j=history&&history.pushState;var k=M;var l=J;const v=a=>!a.startsWith(U);const z=async(b,c=N)=>{if(b===N){var d=N;const a=s();if(f){d=a+ a1}else if(f===!1){d=a+ V}else{c=await fetch(s()+ V);if(c.ok&&c.headers.get(a2).startsWith(a3)){f=!1;d=a+ V}else{c=N;f=!0;d=a+ a1}}}else if(b.endsWith(`about.md`)){c=await fetch(b);if(c.ok&&c.headers.get(a2).startsWith(a3)){var e=await c.text();const b=a+ await e.replace(/^# .*/m,a0);c={ok:!0,status:a4,statusText:a5,text:async()=>b}}else{c={ok:!0,status:a4,statusText:a5,text:async()=>a+ `*无更多详细信息*`}}};try{w(await A(b?b:d,c));document.querySelector(`html`).classList.add(`loaded`);x(document.querySelector(O),Y,[Z,_]).then(async()=>{await I();D(window.location.origin+ window.location.pathname+ (b?$+ b:a0))})}catch(a){y(b?b:d,a)}};const A=async(a,b=N)=>{var c=(a=>{const b=W(a.querySelectorAll(`h1, h2, h3, h4, h5, h6`));if(b.length===J)return `<i>无目录</i>`;var c=`<ul>`;var d=[];b.forEach(a=>{const b=parseInt(a.tagName.charAt(M));const e=a.textContent.toLowerCase().replace(/ /g,`-`).replace(/[^\w\u4e00-\u9fa5-]/g,a0);a.setAttribute(`id`,e);while(d.length>J&&d[d.length- M].level>=b){d.pop();c+=a6};if(d.length===J||d[d.length- M].level<b){c+=`<li><ul>`}else{c+=`</li><li>`};c+=`<a href="#${e}">${a.textContent}</a>`;d.push({level:b})});while(d.length>J){c+=a6;d.pop()};c+=`</ul>`;return c});if(!b){b=await fetch(a);if(!b.ok&&b.headers.get(a2).startsWith(a3)){throw new Error(`请求失败:`+ a+ a7+ b.headers.get(a2)+ a7+ b.status+ a7+ b.statusText)}};var d=marked.parse(await b.text());if(d===a0){d=`<i>空文件</i>`};d=`<details class="outline"><summary><code>${decodeURIComponent(a)}</code></summary></details><hr>${d}`;const e=new DOMParser();const f=e.parseFromString(d,`text/html`);const h=c(f);f.querySelector(`.outline`).innerHTML+=h;const i=f.querySelectorAll(a8);const j=await g();i.forEach(b=>{var c=b.getAttribute(a9);if(v(c)){if(j){c=r(a)+ c}else{c=s()+ c};const d=new URL(c,T).pathname;b.setAttribute(a9,`${window.location.pathname}?p=${d}`)}else if(c.startsWith(U)){b.setAttribute(a9,`${window.location.pathname}?p=${c}`)}});return f.body.innerHTML};const E=async()=>{try{await z(await g())}catch(a){y(await g(),`初始化内容时出错:`+ a)}};window.addEventListener(`DOMContentLoaded`,()=>H());translate.listener.renderTaskFinish=(a=>{d()});document.addEventListener(`pjax:send`,(()=>{c()}));document.addEventListener(`pjax:complete`,(async()=>{await z(await g());C()}));document.addEventListener(X,function a(b){if(b.animationName===Z){const a=document.querySelector(S);a.classList.remove(P);a.classList.remove(Q)}else if(b.animationName===_){document.querySelector(`.markdown-body .old-content`).remove()}});document.addEventListener(aa,(a=>{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`)){i.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(a9);if(b!==`#`){a.preventDefault();const c=document.querySelector(b);if(c){c.scrollIntoView({behavior:ab})}else{console.error(`ID 为 ${targetId} 的元素不存在。`)}}}}));window.onpopstate=(a=>{if(k>M){--k}})})()</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{font-family:cousine nerd font mono,monospace}.markdown-body p code{background-color:#0000000d;border-radius:.1rem;padding:.2rem;font-size:small}.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-weight:700}.markdown-body summary code{cursor:text}.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=//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/instant.page/5.1.0/instantpage.min.js></script></body></html>