浏览代码

add app.css

wangweimin 5 年之前
父节点
当前提交
a716181c27
共有 2 个文件被更改,包括 58 次插入64 次删除
  1. 57 0
      pywebio/html/css/app.css
  2. 1 64
      pywebio/html/index.html

+ 57 - 0
pywebio/html/css/app.css

@@ -0,0 +1,57 @@
+.container {
+    margin: 45px auto;
+    max-width: 880px;
+}
+
+#input-container {
+    margin-top: 20px;
+}
+
+#title {
+    text-align: center;
+    position: absolute;
+    left: 50%;
+    transform: translateX(-50%)
+}
+
+.markdown-body blockquote, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul {
+    margin-bottom: 0px;
+}
+
+.CodeMirror {
+    font-size: 13px
+}
+
+.mditor {
+    height: 400px;
+    width: auto;
+}
+
+/*非固定行高模式*/
+.no-fix-height {
+
+}
+
+.no-fix-height .mditor {
+    height: initial;
+    padding-top: 0;
+    border: 0;
+}
+
+.no-fix-height .mditor .body {
+    height: initial;
+    box-shadow: unset;
+}
+
+.no-fix-height .mditor .viewer {
+    height: initial;
+    padding-bottom: 10px;
+}
+
+.no-fix-height .mditor .head {
+    display: none;
+}
+
+.no-fix-height #input-container {
+    margin: 0 10px;
+}

+ 1 - 64
pywebio/html/index.html

@@ -10,67 +10,9 @@
     <link rel="stylesheet" href="css/codemirror.css">
     <link rel="stylesheet" href="css/codemirror.css">
     <link rel="stylesheet" href="codemirror/darcula.css">
     <link rel="stylesheet" href="codemirror/darcula.css">
     <link rel="stylesheet" href="codemirror/material-ocean.css">
     <link rel="stylesheet" href="codemirror/material-ocean.css">
-    <style>
-        .container {
-            margin: 45px auto;
-            max-width: 880px;
-        }
-
-        #input-container {
-            margin-top: 20px;
-        }
-
-        #title {
-            text-align: center;
-            position: absolute;
-            left: 50%;
-            transform: translateX(-50%)
-        }
-
-        .markdown-body blockquote, .markdown-body dl, .markdown-body ol, .markdown-body p, .markdown-body pre, .markdown-body table, .markdown-body ul {
-            margin-bottom: 0px;
-        }
-
-        .CodeMirror {
-            font-size: 13px
-        }
-
-        .mditor {
-            height: 400px;
-            width: auto;
-        }
-
-        /*非固定行高模式*/
-        .no-fix-height {
-
-        }
-
-        .no-fix-height .mditor {
-            height: initial;
-            padding-top: 0;
-            border: 0;
-        }
-
-        .no-fix-height .mditor .body {
-            height: initial;
-            box-shadow: unset;
-        }
-
-        .no-fix-height .mditor .viewer {
-            height: initial;
-            padding-bottom: 10px;
-        }
-        .no-fix-height .mditor .head{
-            display: none;
-        }
-        .no-fix-height #input-container{
-            margin: 0 10px;
-        }
-    </style>
+    <link rel="stylesheet" href="css/app.css">
 </head>
 </head>
-
 <body>
 <body>
-
 <div class="container">
 <div class="container">
     <div tabindex="1" class="mditor preview">
     <div tabindex="1" class="mditor preview">
         <div class="head">
         <div class="head">
@@ -132,14 +74,9 @@
 
 
     CodeMirror.modeURL = "https://cdn.bootcss.com/codemirror/2.36.0/%N.js";
     CodeMirror.modeURL = "https://cdn.bootcss.com/codemirror/2.36.0/%N.js";
 
 
-
     var md_body = $('#markdown-body');
     var md_body = $('#markdown-body');
-
-
     var ws = new WebSocket(get_ws_addr());
     var ws = new WebSocket(get_ws_addr());
-
     var ctrl = new WebIO.WebIOController(ws, md_body, $('#input-container'));
     var ctrl = new WebIO.WebIOController(ws, md_body, $('#input-container'));
-
     var old_send = ws.send;
     var old_send = ws.send;
     ws.send = function (d) {
     ws.send = function (d) {
         // console.log('<<<', JSON.parse(d));
         // console.log('<<<', JSON.parse(d));