Parcourir la source

【修复】更新版本号并优化页面展示

- 将版本号从 1.8.0 升级到 1.8.1
- 添加页面关键词和作者信息
- 优化代码高亮显示,区分普通代码块和预格式化代码块
- 调整详情摘要样式,使字体大小一致
- 移除不必要的代码样式规则
PJ568 il y a 1 an
Parent
commit
76c4eb7065
1 fichiers modifiés avec 13 ajouts et 10 suppressions
  1. 13 10
      index.html

+ 13 - 10
index.html

@@ -1,12 +1,14 @@
 <!doctype html>
 
 <html>
-<markdown-html version="1.8.0" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
+<markdown-html version="1.8.1" author="PJ568" repo="https://github.com/PJ-568/markdown.html"
   license="CC BY-SA 4.0 International"></markdown-html>
 
 <head>
   <meta charset="utf-8">
   <meta name="description" content="HTML read markdown">
+  <meta name="keywords" content="markdown, html, renderer, low-dependency, one-click deployment">
+  <meta name="author" content="PJ568">
   <meta name="viewport" content="width=256, initial-scale=1">
   <script defer src="//lib.baomitu.com/marked/4.0.2/marked.min.js" type="text/javascript"></script>
   <script src="//lib.baomitu.com/pjax/0.2.8/pjax.min.js" type="text/javascript"></script>
@@ -113,7 +115,7 @@
             switchesOptions: {
               ".markdown-body": {
                 classNames: {
-                  remove: "Animated Animated--reverse Animate--fast Animate--noDelay",
+                  remove: "Animated Animated-remove Animated--reverse Animate--fast Animate--noDelay",
                   add: "Animated",
                   backward: "Animate--slideInRight",
                   forward: "Animate--slideInLeft"
@@ -404,7 +406,7 @@
         if (content === '') {
           content = '<i>空文件</i>';
         }
-        content = `<details class="outline"><summary><code>${decodeURIComponent(mdPath)}</code></summary></details><hr>${content}`;
+        content = `<details class="outline"><summary>${decodeURIComponent(mdPath)}</summary></details><hr>${content}`;
         const parser = new DOMParser();
         const doc = parser.parseFromString(content, 'text/html');
 
@@ -758,15 +760,19 @@
 
     .markdown-body code {
       font-family: "cousine nerd font mono", monospace;
-    }
-
-    .markdown-body p code {
       background-color: rgba(0, 0, 0, 0.05);
       font-size: small;
       padding: .2rem;
       border-radius: .1rem;
     }
 
+    .markdown-body pre code {
+      background-color: unset;
+      font-size: unset;
+      padding: unset;
+      border-radius: unset;
+    }
+
     .markdown-body blockquote {
       background-color: rgba(0, 0, 0, 0.05);
       font-size: small;
@@ -781,16 +787,13 @@
     }
 
     .markdown-body summary {
+      font-size: small;
       cursor: pointer;
       background-color: rgba(0, 0, 0, 0.05);
       padding: .4rem;
       font-weight: bold;
     }
 
-    .markdown-body summary code {
-      cursor: text;
-    }
-
     .markdown-body details a {
       margin-left: -2rem;
     }