index.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <!doctype html>
  2. <html>
  3. <!-- 作者:PJ568 -->
  4. <!-- 项目地址:https://github.com/PJ-568/markdown.html/ -->
  5. <!-- 本项目遵循 CC BY-SA 4.0 International 许可协议 -->
  6. <!-- v 1.2.1 -->
  7. <head>
  8. <meta charset="utf-8">
  9. <meta name="description" content="HTML read markdown">
  10. <meta name="viewport" content="width=256, initial-scale=1">
  11. <script defer src="//lib.baomitu.com/marked/4.0.2/marked.min.js" type="text/javascript"></script>
  12. <script src="//lib.baomitu.com/pjax/0.2.8/pjax.min.js" type="text/javascript"></script>
  13. <script src="//lib.baomitu.com/translate.js/3.7.2/translate.js" type="text/javascript"></script>
  14. <script src="//lib.baomitu.com/Darkmode.js/1.5.7/darkmode-js.min.js" type="text/javascript"></script>
  15. <script>
  16. // 使用 IIFE 包裹以避免全局变量污染
  17. (function () {
  18. // 加载动画相关
  19. var timer = null;
  20. // 文档解析功能相关
  21. var existIndexPage = true; // 是否存在索引页
  22. async function getPValue() {
  23. return await decodeMDPath(window.location.href);
  24. }
  25. // PJAX 相关
  26. let PJAX;
  27. // 深色模式相关
  28. let darkmode;
  29. // 自定义 PJAX 相关
  30. const existPushState = (history && history.pushState);
  31. var level = 1; // 当前页面的层级
  32. var lastLevel = 0;
  33. // 开始加载动画
  34. function startLoad() {
  35. const loadingBar = document.querySelector('.loading-bar');
  36. const progress = document.querySelector('.loading-bar .progress');
  37. var loadingBarWidth = 20;
  38. var MAX_LOADING_WIDTH = 95;
  39. loadingBar.classList.add('loading');
  40. progress.style.width = loadingBarWidth + '%';
  41. clearInterval(timer);
  42. timer = setInterval(function () {
  43. loadingBarWidth += 3;
  44. if (loadingBarWidth > MAX_LOADING_WIDTH) {
  45. loadingBarWidth = MAX_LOADING_WIDTH;
  46. }
  47. progress.style.width = loadingBarWidth + '%';
  48. }, 500);
  49. }
  50. // 停止加载动画
  51. function endLoad() {
  52. const loadingBar = document.querySelector('.loading-bar');
  53. const progress = document.querySelector('.loading-bar .progress');
  54. clearInterval(timer);
  55. progress.style.width = '100%';
  56. loadingBar.classList.remove('loading');
  57. setTimeout(function () {
  58. progress.style.width = 0;
  59. }, 400);
  60. }
  61. // 初始化 PJAX
  62. function initPJAX() {
  63. try {
  64. const Pjax = window.Pjax || function () { };
  65. PJAX = new Pjax({
  66. selectors: [
  67. 'head title',
  68. '.markdown-body',
  69. '.pjax-reload'
  70. ],
  71. cacheBust: false
  72. });
  73. } catch (e) {
  74. console.error('PJAX 初始化出错:' + e);
  75. }
  76. }
  77. // translate-js 翻译系统
  78. //// 初始化翻译系统
  79. function initTranslate() {
  80. try {
  81. translate.service.use('client.edge');
  82. translate.request.listener.start();
  83. translate.setAutoDiscriminateLocalLanguage();
  84. translate.language.setUrlParamControl();
  85. translate.ignore.class.push('notTranslate');
  86. translate.execute();
  87. } catch (e) {
  88. console.error('翻译系统出错:' + e);
  89. }
  90. }
  91. // Darkmode.js 深色模式
  92. function initDarkmode() {
  93. try {
  94. const Darkmode = window.Darkmode || function () {
  95. console.warn('Darkmode.js 不存在?');
  96. return;
  97. };
  98. darkmode = new Darkmode();
  99. } catch (e) {
  100. console.error('初始化 Darkmode.js 出错:' + e);
  101. }
  102. }
  103. //// 检查并提示翻译
  104. function infoTranslate() {
  105. try {
  106. var currentLang = translate.language.getCurrent();
  107. var originalLang = translate.language.getLocal();
  108. if (currentLang !== originalLang) {
  109. const translateInfo = document.querySelectorAll('.translate-info');
  110. if (translateInfo) {
  111. translateInfo.forEach(function (item) {
  112. item.remove();
  113. })
  114. }
  115. // 获取 .markdown-body 元素
  116. var mainElements = document.querySelector('.markdown-body');
  117. var bq = document.createElement('blockquote');
  118. bq.classList.add('translate-info');
  119. var infoBody = document.createElement('p');
  120. infoBody.innerText = '当前页面已翻译。您可以:';
  121. var msgBody = document.createElement('p');
  122. var switchButton = document.createElement('a');
  123. switchButton.classList.add('translate-switch');
  124. switchButton.href = 'javascript:;';
  125. switchButton.title = '切换到原语言';
  126. switchButton.innerText = '切换到文章原本的语言';
  127. bq.appendChild(infoBody);
  128. bq.appendChild(switchButton);
  129. mainElements.insertBefore(bq, mainElements.children[1]);
  130. }
  131. } catch (e) {
  132. console.error('检查并提示翻译出错:' + e);
  133. }
  134. }
  135. //// 刷新翻译
  136. function refreshTranslate() {
  137. try {
  138. translate.selectLanguageTag.refreshRender();
  139. } catch (e) {
  140. console.error('刷新翻译出错:' + e);
  141. }
  142. }
  143. // 获取文件所在目录
  144. function getDirectory(path) {
  145. path = new URL(path, 'http://example.com').pathname;
  146. const lastSlashIndex = path.lastIndexOf('/');
  147. return path.substring(0, lastSlashIndex + 1);
  148. }
  149. // 获取 markdown.html 的当前路径
  150. function getPath() {
  151. return getDirectory(window.location);
  152. }
  153. // 将 ?p= 后面的值转换为绝对路径
  154. /*
  155. 输出的值是 /path/to/file.md
  156. 当其为 null 时,根据是否存在 index.md 文件来决定返回的值
  157. */
  158. async function decodeMDPath(path) {
  159. const url = new URL(path);
  160. const params = new URLSearchParams(url.search);
  161. path = formatMDPath(params.get('p'));
  162. // 如果 path 为 null
  163. if (!path) {
  164. const currentDir = getPath();
  165. // 如果存在 index.md 文件,则返回 index.md,否则返回 README.md
  166. if (existIndexPage) {
  167. const response = await fetch(currentDir + 'index.md');
  168. if (response.ok) {
  169. path = currentDir + 'index.md';
  170. } else {
  171. existIndexPage = false;
  172. path = currentDir + 'README.md';
  173. }
  174. } else {
  175. path = currentDir + 'README.md';
  176. }
  177. }
  178. return path;
  179. }
  180. // 格式化路径
  181. /*
  182. 如果 mdPath 为 null,则返回 null,如果 mdPath 是路径,则返回该路径下 /index.md
  183. return: 返回格式化后的文件路径,一定是绝对路径,或者 null
  184. */
  185. function formatMDPath(mdPath) {
  186. if (mdPath) {
  187. mdPath = new URL(mdPath, 'http://example.com').pathname;
  188. if (!mdPath.endsWith('.md')) {
  189. if (!mdPath.endsWith('/')) {
  190. mdPath += '/';
  191. }
  192. mdPath += 'index.md';
  193. }
  194. }
  195. return mdPath;
  196. }
  197. // 判断路径是否为相对路径
  198. const isRelativePath = (path) => !path.startsWith('/');
  199. // 处理错误
  200. async function handleError(errorMessage) {
  201. document.title = '加载失败'
  202. document.querySelector('.markdown-body').innerHTML = `<h1>加载失败</h1><p>加载文档<code>${await getPValue()}</code>时出错:<code>${errorMessage}</code>。您可以尝试<a class="refresh-btn" href="">重新加载</a>或<a class="back-btn">返回</a>。</p>`;
  203. }
  204. // 更新页面的 markdown 内容
  205. /*
  206. path: 要加载的 markdown 文件路径,最好是带主机名的绝对路径(要用于 fetch())
  207. response: fetch() 的返回值,用于防止二次访问
  208. */
  209. const showMarkdown = async (mdPath, response = null) => {
  210. try {
  211. const content = await getMarkdown(mdPath, response);
  212. document.querySelector('.markdown-body').innerHTML = content;
  213. const firstH1 = document.querySelector('h1');
  214. document.title = firstH1 ? firstH1.textContent : mdPath;
  215. showMarkdownEnded();
  216. customPushState(window.location.origin + getPath() + '?p=' + mdPath);
  217. } catch (error) {
  218. handleError(error)
  219. }
  220. }
  221. // 读取并解析指定文件
  222. const getMarkdown = async (mdPath, response = null) => {
  223. // 生成目录
  224. function generateOutline(doc) {
  225. let outline = '<ul>';
  226. let headings = Array.from(doc.querySelectorAll('h1, h2, h3, h4, h5, h6'));
  227. let stack = [];
  228. headings.forEach(heading => {
  229. let level = parseInt(heading.tagName.charAt(1));
  230. // 设置 id 属性以便链接跳转
  231. heading.setAttribute('id', heading.textContent);
  232. while (stack.length > 0 && stack[stack.length - 1].level >= level) {
  233. stack.pop();
  234. outline += '</ul></li>';
  235. }
  236. if (stack.length === 0 || stack[stack.length - 1].level < level) {
  237. outline += '<li><ul>';
  238. } else {
  239. outline += '</li><li>';
  240. }
  241. outline += `<a href="#${heading.textContent}">${heading.textContent}</a>`;
  242. stack.push({ level: level });
  243. });
  244. while (stack.length > 0) {
  245. outline += '</ul></li>';
  246. stack.pop();
  247. }
  248. outline += '</ul>';
  249. return outline;
  250. }
  251. if (!response) {
  252. response = await fetch(mdPath);
  253. if (!response.ok) {
  254. throw new Error('请求失败:' + mdPath + ',' + response.status + ',' + response.statusText);
  255. }
  256. }
  257. var content = marked.parse(await response.text());
  258. content = `<details class="outline"><summary><code>${decodeURIComponent(mdPath)}</code></summary></details><hr>${content}`;
  259. const parser = new DOMParser();
  260. const doc = parser.parseFromString(content, 'text/html');
  261. const outline = generateOutline(doc);
  262. doc.querySelector('.outline').innerHTML += outline;
  263. const links = doc.querySelectorAll('a[href$=".md"]');
  264. const pValue = await getPValue()
  265. links.forEach(link => {
  266. var href = link.getAttribute('href');
  267. /*
  268. 如果 href 是相对路径,则在其前加上当前读取的文档的绝对路径;
  269. 如果不存在当前读取的文档(默认读取的 index.md 或 README.md),
  270. 则在其前加上 markdown.html 的绝对路径。
  271. */
  272. if (isRelativePath(href)) {
  273. if (pValue) {
  274. href = getDirectory(mdPath) + href;
  275. } else {
  276. href = getPath() + href;
  277. }
  278. const absoluteHref = new URL(href, 'http://example.com').pathname;
  279. link.setAttribute('href', `${window.location.pathname}?p=${absoluteHref}`);
  280. } else if (href.startsWith('/')) {
  281. link.setAttribute('href', `${window.location.pathname}?p=${href}`);
  282. }
  283. });
  284. return doc.body.innerHTML;
  285. };
  286. // 初始化自定义 PJAX
  287. function initCustomPJAX() {
  288. // 覆写 PJAX 处理响应的函数,在内容插入页面之前实现 markdown 的渲染
  289. PJAX._handleResponse = PJAX.handleResponse;
  290. PJAX.handleResponse = async function (responseText, request, href, options) {
  291. if (request.responseText.startsWith('<!doctype html>\n<html>\n<!-- 作者:PJ568 -->')) {
  292. await showMarkdown(await decodeMDPath(href));
  293. } else {
  294. PJAX._handleResponse(responseText, request, href, options);
  295. }
  296. }
  297. // 监听自定义链接的点击事件
  298. if (existPushState) {
  299. document.querySelector('.markdown-body').addEventListener('click', async function (event) {
  300. const link = event.target.closest('a[href$=".md"]');
  301. if (link) {
  302. try {
  303. event.preventDefault();
  304. startLoad();
  305. await showMarkdown(await decodeMDPath(link.href));
  306. } catch (e) {
  307. console.error('自定义 PJAX 出错:' + e);
  308. }
  309. }
  310. });
  311. }
  312. }
  313. // 自定义推送状态
  314. function customPushState(url = window.location.href) {
  315. if (existPushState) {
  316. if (level > lastLevel) {
  317. history.pushState({ url: url, title: document.title, uid: level }, null, url);
  318. lastLevel = level++;
  319. } else {
  320. lastLevel = level - 1;
  321. }
  322. }
  323. }
  324. // 初始化内容
  325. const initContent = async () => {
  326. try {
  327. await showMarkdown(await getPValue());
  328. } catch (error) {
  329. handleError('初始化内容时出错:', error);
  330. }
  331. };
  332. // 初始化返回首页按钮
  333. function initHomeBtn() {
  334. const homeBtn = document.querySelector('.to-home');
  335. homeBtn.href = window.location.pathname;
  336. }
  337. // 初始化
  338. function initialize() {
  339. initDarkmode(); //// 初始化深色模式
  340. initHomeBtn(); //// 初始化返回首页按钮
  341. initContent(); //// 初始化内容
  342. initTranslate(); //// 初始化页面翻译
  343. initPJAX(); //// 初始化 PJAX
  344. initCustomPJAX(); //// 初始化自定义 PJAX
  345. }
  346. // 触发器
  347. //// 网页加载完毕后触发初始化
  348. window.addEventListener('DOMContentLoaded', () => initialize());
  349. //// 翻译执行完成后触发
  350. // translate.listener.renderTaskFinish = function (_task) {
  351. // }
  352. //// PJAX 开始时执行的函数
  353. document.addEventListener('pjax:send', function () {
  354. startLoad();
  355. });
  356. //// 监听 PJAX 完成后,重新加载
  357. document.addEventListener('pjax:complete', function () {
  358. initCustomPJAX(); //// 初始化自定义 PJAX
  359. });
  360. //// 点击事件委托
  361. document.addEventListener('click', function (event) {
  362. if (event.target.closest('.back-btn')) {
  363. window.history.back();
  364. } else if (event.target.closest('.refresh-btn')) {
  365. window.location.reload();
  366. } else if (event.target.closest('.dark-btn')) {
  367. darkmode.toggle();
  368. } else if (event.target.closest('.translate-switch')) {
  369. translate.changeLanguage(translate.language.getLocal());
  370. }
  371. });
  372. //// 文档内容加载完毕时触发
  373. function showMarkdownEnded() {
  374. refreshTranslate();
  375. infoTranslate(); //// 检查并提示翻译
  376. translate.execute(); //// 手动触发翻译,但是理论上 translate-js 会监听页面变化
  377. endLoad();
  378. document.querySelector('html').classList.add('loaded'); //// 防止缓存的页面被自定义 PJAX 中覆写的处理响应的函数捕获
  379. window.scrollTo({
  380. top: 0,
  381. behavior: 'smooth'
  382. });
  383. }
  384. //// 浏览器返回时触发
  385. window.onpopstate = function (event) {
  386. if (level > 1) {
  387. --level;
  388. }
  389. };
  390. })();
  391. </script>
  392. <title>加载中</title>
  393. <style>
  394. /* 全局 */
  395. * {
  396. font-family: 'Exo', sans-serif;
  397. text-decoration: none;
  398. }
  399. :root {
  400. background-color: #e6e6e6;
  401. }
  402. ::selection {
  403. background-color: #DCEDC8;
  404. }
  405. body {
  406. margin: 0;
  407. }
  408. a {
  409. color: #66BB6A;
  410. cursor: pointer;
  411. text-decoration: none;
  412. }
  413. a:hover {
  414. color: #2E7D32;
  415. }
  416. /* 背景 */
  417. .background {
  418. position: fixed;
  419. left: 0;
  420. top: 0;
  421. height: 100%;
  422. width: 100%;
  423. z-index: -1;
  424. background-color: #e6e6e6;
  425. }
  426. /* 导航栏 */
  427. nav {
  428. position: fixed;
  429. top: 0;
  430. right: 0;
  431. width: min-content;
  432. background-color: #616161;
  433. display: flex;
  434. justify-content: space-between;
  435. align-items: center;
  436. }
  437. nav a {
  438. color: #FAFAFA;
  439. padding: .3rem;
  440. transition:
  441. color .2s,
  442. background-color .2s;
  443. }
  444. nav a:hover {
  445. color: #FFF;
  446. background-color: #212121;
  447. }
  448. /* 主要内容 */
  449. .markdown-body {
  450. margin: 3rem auto;
  451. width: 100%;
  452. max-width: 950px;
  453. min-height: 300px;
  454. background-color: #FAFAFA;
  455. color: #212121;
  456. box-sizing: border-box;
  457. overflow-x: hidden;
  458. padding: 30px;
  459. box-shadow: 0 2px 6px rgba(100, 100, 100, .3);
  460. }
  461. .markdown-body img,
  462. .markdown-body video,
  463. .markdown-body iframe,
  464. .markdown-body object,
  465. .markdown-body embed,
  466. .markdown-body svg,
  467. .markdown-body canvas,
  468. .markdown-body audio {
  469. max-width: 100%;
  470. }
  471. /* Markdown 样式 */
  472. .markdown-body a {
  473. transition:
  474. color .2s,
  475. background-color .2s;
  476. }
  477. .markdown-body a:hover {
  478. background-color: rgba(255, 255, 255, 0.1);
  479. }
  480. .markdown-body ul,
  481. .markdown-body ol {
  482. padding-left: 2rem;
  483. }
  484. .markdown-body pre {
  485. background-color: rgba(0, 0, 0, 0.05);
  486. padding: .4rem;
  487. border-radius: .1rem;
  488. overflow-y: scroll;
  489. }
  490. .markdown-body code {
  491. font-family: "cousine nerd font mono", monospace;
  492. }
  493. .markdown-body p code {
  494. background-color: rgba(0, 0, 0, 0.05);
  495. font-size: small;
  496. padding: .2rem;
  497. border-radius: .1rem;
  498. }
  499. .markdown-body blockquote {
  500. background-color: rgba(0, 0, 0, 0.05);
  501. font-size: small;
  502. padding: .4rem;
  503. margin: .5rem 2rem;
  504. border-left: 5px solid rgba(0, 0, 0, 0.1);
  505. }
  506. .markdown-body details {
  507. border: 1px solid rgba(0, 0, 0, 0.1);
  508. border-radius: .1rem;
  509. }
  510. .markdown-body summary {
  511. background-color: rgba(0, 0, 0, 0.05);
  512. padding: .4rem;
  513. font-weight: bold;
  514. }
  515. .markdown-body details a {
  516. margin-left: -2rem;
  517. }
  518. .markdown-body table {
  519. border-spacing: 0;
  520. border-radius: .1rem;
  521. width: 100%;
  522. border-collapse: separate;
  523. border: .1rem solid rgba(0, 0, 0, 0.05);
  524. }
  525. .markdown-body table td,
  526. .markdown-body table th {
  527. border-right: .1rem solid rgba(0, 0, 0, 0.05);
  528. }
  529. .markdown-body table td,
  530. .markdown-body table th {
  531. border-top: .1rem solid rgba(0, 0, 0, 0.05);
  532. }
  533. .markdown-body table td:last-child,
  534. .markdown-body th:last-child {
  535. border-right-color: transparent;
  536. }
  537. .markdown-body table thead tr:first-child>* {
  538. border-top: .1rem solid transparent;
  539. }
  540. /* 加载进度条 */
  541. .loading-bar {
  542. position: fixed;
  543. top: 0;
  544. left: 0;
  545. z-index: 99999;
  546. opacity: 0;
  547. transition: opacity .4s linear;
  548. .progress {
  549. position: fixed;
  550. top: 0;
  551. left: 0;
  552. width: 0;
  553. height: 4px;
  554. background-color: #FFF;
  555. box-shadow: 0 0 10px rgba(102, 187, 106, .7);
  556. }
  557. &.loading {
  558. opacity: 1;
  559. transition: none;
  560. .progress {
  561. transition: width .4s ease;
  562. }
  563. }
  564. }
  565. /* 翻译按钮相关 */
  566. .translateSelectLanguage {
  567. background-color: #616161;
  568. color: inherit;
  569. z-index: 10;
  570. width: 17%;
  571. height: 100%;
  572. opacity: 0;
  573. cursor: pointer;
  574. position: absolute;
  575. top: 0;
  576. left: 50%;
  577. }
  578. /* 深色模式相关 */
  579. .darkmode--activated .markdown-body img,
  580. .darkmode--activated .markdown-body svg {
  581. isolation: isolate;
  582. mix-blend-mode: difference
  583. }
  584. .darkmode-layer,
  585. .darkmode-toggle {
  586. z-index: 2
  587. }
  588. /* 小屏响应式优化 */
  589. @media only screen and (max-width: 950px) {
  590. html,
  591. body,
  592. .markdown-body {
  593. height: 100%;
  594. }
  595. .markdown-body {
  596. overflow-y: scroll;
  597. min-width: 256px;
  598. top: 0;
  599. margin: 0 0;
  600. }
  601. }
  602. </style>
  603. </head>
  604. <body>
  605. <!-- 导航栏 -->
  606. <nav>
  607. <a title="返回" class="back-btn">
  608. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  609. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  610. class="icon icon-tabler icons-tabler-outline icon-tabler-arrow-back">
  611. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  612. <path d="M9 11l-4 4l4 4m-4 -4h11a4 4 0 0 0 0 -8h-1" />
  613. </svg>
  614. </a>
  615. <a title="刷新" class="refresh-btn" href="">
  616. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  617. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  618. class="icon icon-tabler icons-tabler-outline icon-tabler-refresh">
  619. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  620. <path d="M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4" />
  621. <path d="M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" />
  622. </svg>
  623. </a>
  624. <a title="主页" class="to-home">
  625. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  626. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  627. class="icon icon-tabler icons-tabler-outline icon-tabler-home">
  628. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  629. <path d="M5 12l-2 0l9 -9l9 9l-2 0" />
  630. <path d="M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-7" />
  631. <path d="M9 21v-6a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v6" />
  632. </svg>
  633. </a>
  634. <a title="更改语言" id="translate">
  635. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  636. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  637. class="icon icon-tabler icons-tabler-outline icon-tabler-language">
  638. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  639. <path d="M4 5h7" />
  640. <path d="M9 3v2c0 4.418 -2.239 8 -5 8" />
  641. <path d="M5 9c0 2.144 2.952 3.908 6.7 4" />
  642. <path d="M12 20l4 -9l4 9" />
  643. <path d="M19.1 18h-6.2" />
  644. </svg>
  645. </a>
  646. <a title="切换显示模式" class="dark-btn" href="javascript:;">
  647. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  648. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  649. class="icon icon-tabler icons-tabler-outline icon-tabler-brightness">
  650. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  651. <path d="M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0" />
  652. <path d="M12 3l0 18" />
  653. <path d="M12 9l4.65 -4.65" />
  654. <path d="M12 14.3l7.37 -7.37" />
  655. <path d="M12 19.6l8.85 -8.85" />
  656. </svg>
  657. </a>
  658. <a title="关于" href="https://github.com/PJ-568/markdown.html/">
  659. <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"
  660. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
  661. class="icon icon-tabler icons-tabler-outline icon-tabler-info-circle">
  662. <path stroke="none" d="M0 0h24v24H0z" fill="none" />
  663. <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
  664. <path d="M12 9h.01" />
  665. <path d="M11 12h1v4h1" />
  666. </svg>
  667. </a>
  668. </nav>
  669. <!-- 内容主体 -->
  670. <div class="markdown-body">
  671. <h1>加载中……</h1>
  672. <p>请稍等。</p>
  673. </div>
  674. <!-- 加载动画 -->
  675. <div class="loading-bar">
  676. <div class="progress"></div>
  677. </div>
  678. <div class="background"></div>
  679. <script src="//lf6-cdn-tos.bytecdntp.com/cdn/expire-1-y/instant.page/5.1.0/instantpage.min.js"
  680. type="text/javascript"></script>
  681. </body>
  682. </html>