Browse Source

index.css

aaron-1015 3 years ago
parent
commit
b114b336c2
2 changed files with 75 additions and 38 deletions
  1. 36 1
      static/index.css
  2. 39 37
      templates/index.html

+ 36 - 1
static/index.css

@@ -1,3 +1,38 @@
+#sitebody{
+    width:1200px;
+    margin:0 auto;
+    font-size:13px;
+}
+
+
+#top-side-bar{
+    /* background-color; */
+    width:600px;
+    height:120px;
+    text-align:center;
+    line-height:100px;
+    float:center;
+}
+
+#logo{
+    float:left;
+
+
+}
 #member{
-    float: right;
+    float:right
+}
+
+#nav-side-bar{
+    /* background-color; */
+    /* width:120px; */
+/*     height:120px; */
+/*     text-align:center; */
+    line-height:60px;
+    float:left;
 }
+
+
+#content{
+    float:center;
+}

+ 39 - 37
templates/index.html

@@ -1,47 +1,49 @@
 <!DOCTYPE html>
 <html lang='zh-TW'>
-    <head>
-        <meta charset="UTF-8">
-        <meta name="viewport" content="width=device-width, initial-scale=1.0">
-        <!-- link -->
-        <link rel="stylesheet" href="static/index.css">
-        
-        <title set-lan="html:title">機械所水塔監控網站 - {% block title %}{% endblock %}</title>
-    </head>
+  <head>
+      <meta charset="UTF-8">
+      <meta name="viewport" content="width=device-width, initial-scale=1.0">
+      <!-- link -->
+      <link rel="stylesheet" href="static/index.css">
+      
+      <title set-lan="html:title">機械所水塔監控網站 - {% block title %}{% endblock %}</title>
+  </head>
 
     
-    <body>
-      <div>
-        <nav class="nav-top">
-          <div class="logo"></div>
-            <img src="static/img/logo.png" alt="Logo" />
-          <div class="member">
-              <button >訊息通知</button>
-              <button onclick="javascript:location.href='/login'">會員登入</button>
-          </div>
-          
-        </nav>
-      </div>
-      <div class="nav-side-bar">
-        <nav class="nav-side-bar">
-          <ul>
-            <li><a href="/home">總覽</a></li>
-            <li><a href="/tower">水塔監控</a></li>
-            <li><a href="/optim">智能最佳化</a></li>
-            <li><a href="/vibration">震動監控</a></li>
-            <li><a href="/history">歷史資料</a></li>
-            <li><a href="/device">設備設定</a></li>
-            <li><a href="/system">系統設定</a></li>
-          </ul>
-        </nav>
-      </div>
-      {% block body %}
-    
-    {% endblock %}
+  <body>
+      <div id='sitebody'>
+        <div id="top-side-bar">
+            <div id="logo">
+              <img src="static/img/logo.png" alt="Logo" />
+            </div>
+            <div id="member">
+                <button >訊息通知</button>
+                <button onclick="javascript:location.href='/login'">會員登入</button>
+            </div>
+        </div>
+        <div id="nav-side-bar" class="nav-side-bar">
+            <ul>
+              <li><a href="/home">總覽</a></li>
+              <li><a href="/tower">水塔監控</a></li>
+              <li><a href="/optim">智能最佳化</a></li>
+              <li><a href="/vibration">震動監控</a></li>
+              <li><a href="/history">歷史資料</a></li>
+              <li><a href="/device">設備設定</a></li>
+              <li><a href="/system">系統設定</a></li>
+            </ul>
+        </div>
+        <div id='content'>
+            {% block body %}
+      
+            {% endblock %}
+        </div>
+      
         
           <script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
           <script type="text/javascript" src="static/index.js"></script>
       
-        </body>
+
+      </div>
+    </body>
 
 </html>