index.html 25 KB

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