index.html 23 KB

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