Browse Source

上傳檔案到 'app/templates'

rita 2 years ago
parent
commit
2208912bfa
6 changed files with 6118 additions and 3609 deletions
  1. 1127 1127
      app/templates/clean.html
  2. 1669 948
      app/templates/demo.html
  3. 1192 834
      app/templates/dry_block.html
  4. 1430 0
      app/templates/dry_block_empty.html
  5. 477 477
      app/templates/header.html
  6. 223 223
      app/templates/index_new.html

File diff suppressed because it is too large
+ 1127 - 1127
app/templates/clean.html


File diff suppressed because it is too large
+ 1669 - 948
app/templates/demo.html


File diff suppressed because it is too large
+ 1192 - 834
app/templates/dry_block.html


File diff suppressed because it is too large
+ 1430 - 0
app/templates/dry_block_empty.html


+ 477 - 477
app/templates/header.html

@@ -1,478 +1,478 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="UTF-8">
-    <title>{{ title }}</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-    <!-- <meta http-equiv="refresh" content="300" />  每 content 秒網頁自動更新-->
-
-    <!-- 新 Bootstrap4 核心 CSS 文件 -->
-    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
-    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
-    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
-    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
-    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
-    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
-    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
-    <!--可用來建立使用者小圖示-->
-    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
-    <!-- Rita 網頁 title 旁邊的 icon --> <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
-    <link rel="icon" href="..\static\img\skyeye-2.ico" type="image/x-icon">
-
-    <!-- 參考資料 -->
-    <!-- https://ithelp.ithome.com.tw/articles/10244121 -->
-
-    <script>
-        var status = '{{status}}';
-        var username = '{{username}}';
-        $(document).ready(function(){
-            $('#navbarDropdown_user_pc').text(username)
-            $('#navbarDropdown_user_phone').text(username)
-            console.log('status: ' + status)
-            console.log('username: ' + username)
-            // if ( (status == 2) || (status == 8)  || (status == 9) ) {
-            //     $('input').prop('disabled', true);
-            //     $('button').prop('disabled', true);
-            // } else if ( (status == 0) || (status == 1) ) {
-            //     $('input').prop('disabled', false);
-            //     $('button').prop('disabled', false);   
-            // }
-        });
-    </script>
-
-
-    <style>
-        .footer{
-            position: absolute;
-            width: 100%;
-            background-color: #eee;
-            text-align: center;
-        }
-        body {
-            margin: 0;
-        }
-        /* 文字輸入框 */
-        .input-text {
-            height: 25px;
-            width: 40px;
-            text-align: center;
-            margin-left: 2px;
-            margin-right: 5px;
-        }
-        /* 致動器狀態表格置中 */
-        .label_ActuatorStatus {
-            margin: auto;
-        }
-        /* 致動器 ON 樣式 */
-        .input-button-on {
-            color: #008CBA;
-            border: 2px rgb(182, 181, 181) solid;
-            background-color: whitesmoke;
-            padding: 1px 3px;
-            width: 45px;
-        }
-        /* 致動器 OFF 樣式 */
-        .input-button-off {
-            color: #707070;
-            border: 2px rgb(192, 192, 192) solid;
-            background-color: whitesmoke;
-            padding: 1px 3px;
-            width: 45px;
-        }
-        /* 輸入按鈕 */
-        .input-button {
-            font-size: 14px;
-            color: #008CBA;
-            border: 2px rgb(182, 181, 181) solid;
-            background-color: whitesmoke;
-            padding: 1px 3px;
-        }
-        /* 大表格樣式 */
-        .table-all {
-            font-size:18px; 
-            border:2px #cccccc solid; 
-            margin-left: 10px; 
-            margin-right: 10px; 
-            width: 98%;
-        }
-
-        /* ---------------------------------------------------------- */
-
-        html,
-        body {
-            height: 100%;
-        }
-
-        #wrapper {
-            /* 設定高度最小為100%, 如果內容區塊很多, 可以長大 */
-            min-height: 100%;
-            /* 位置設為relative, 作為footer區塊位置的參考 */
-            position: relative;
-        }
-
-        .navbar-dark .navbar-nav .nav-link {
-            color: white;
-            cursor: pointer;
-            text-decoration: none;
-            width: 110px;
-            height: 46px;
-        }
-
-        .nav-top {
-            line-height: 40px;
-            background-color: #C4C4C4;
-        }
-
-        .website_title {
-            font-family: Roboto;
-            font-style: normal;
-            font-weight: normal;
-            font-size: 30px;
-            color: #000000;
-        }
-
-        .navbar-nav>li {
-            float: none;
-            display: inline-block;
-            width: 100px;
-            margin: 0 auto;
-            text-align: center;
-        }
-
-        .navbar-nav>li a {
-            font-size: 20px;
-        }
-
-        .main-page {
-            margin-top: 200px;
-        }
-
-        .page-title {
-            font-family: Roboto;
-            font-style: normal;
-            font-weight: bold;
-            font-size: 36px;
-        }
-
-
-        .flex {
-            display: flex;
-            flex-direction: row;
-            flex-wrap: wrap;
-            justify-content: center;
-        }
-
-        .set-link {
-            display: inline-block;
-            width: 350px;
-            height: 100px;
-            line-height: 100px;
-            background: #008CBA;
-            border: 1px solid #CFCFCF;
-            box-sizing: border-box;
-            color: #FFFFFF;
-            border-radius: 10px;
-            font-size: 36px;
-        }
-
-        .cmn-toggle {
-            position: absolute;
-            margin-left: 0px;
-            visibility: hidden;
-        }
-
-        .cmn-toggle+label {
-            display: block;
-            position: relative;
-            cursor: pointer;
-            outline: none;
-            user-select: none;
-        }
-
-        input.cmn-toggle-round-flat+label {
-            padding: 2px;
-            width: 60px;
-            height: 30px;
-            background-color: #C0C0C0;
-            border-radius: 60px;
-            transition: background 0.4s;
-        }
-
-        input.cmn-toggle-round-flat+label:before,
-        input.cmn-toggle-round-flat+label:after {
-            display: block;
-            position: absolute;
-            content: "";
-        }
-
-        input.cmn-toggle-round-flat+label:before {
-            top: 2px;
-            left: 2px;
-            bottom: 2px;
-            right: 2px;
-            background-color: #fff;
-            border-radius: 60px;
-            transition: background 0.4s;
-        }
-
-        input.cmn-toggle-round-flat+label:after {
-            top: 4px;
-            left: 4px;
-            bottom: 4px;
-            width: 24px;
-            background-color: #dddddd;
-            border-radius: 52px;
-            transition: margin 0.4s, background 0.4s;
-        }
-
-        input.cmn-toggle-round-flat:checked+label {
-            background-color: #C0C0C0;
-        }
-
-        input.cmn-toggle-round-flat:checked+label:after {
-            margin-left: 27px;
-            background-color: #008CBA;
-        }
-
-
-        .main-menu li {
-            position: relative;
-            transition: .5s;
-            list-style-type: none;
-        }
-
-        .main-menu li a {
-            padding: 0 15px;
-            line-height: 60px;
-            font-size: 18px;
-        }
-
-
-        .main-menu li::after {
-            content: '';
-            position: absolute;
-            height: 4px;
-            left: 50%;
-            right: 50%;
-            bottom: 0;
-            background-color: #bbb;
-            transition: .5s;
-        }
-
-        .main-menu li:hover {
-            background-color: #ddd;
-        }
-
-        .main-menu li:hover::after {
-            left: 0;
-            right: 0;
-        }
-
-
-
-
-        @media(max-width:373px) {
-            .card {
-                margin-right: 0px;
-            }
-
-            .set-link {
-                width: 250px;
-            }
-        }
-
-        @media(max-width:577px) {}
-
-        @media(min-width:576px) {}
-
-        @media(min-width:768px) {
-            .navbar-nav>li {
-                margin-left: 0px;
-            }
-
-            .navbar-nav .li-block {
-                display: none;
-            }
-        }
-
-        @media(max-width:1050px) {
-            .nav-list-pc {
-                display: none;
-            }
-            .nav-list-phone {
-                display: block;
-            }
-        }
-
-        @media(min-width:1050px) {
-            .nav-list-pc {
-                display: block;
-            }
-            .nav-list-phone {
-                display: none;
-            }
-        }
-
-        @media(min-width:991px) {
-            .navbar-nav>li {
-                margin-left: 20px;
-            }
-
-            .navbar-nav .li-block {
-                display: none;
-            }
-        }
-
-        @media(min-width:1200px) {
-            .navbar-nav>li {
-                margin-left: 50px;
-            }
-
-            .navbar-nav .li-block {
-                display: inline-block;
-                width: 100px;
-            }
-        }
-
-        @media(min-width:1400px) {
-            .navbar-nav .li-block {
-                display: inline-block;
-                width: 200px;
-            }
-        }
-
-
-        @media(min-width:1689px) {
-            .navbar-nav>li {
-                margin-left: 50px;
-            }
-
-            .navbar-nav .li-block {
-                display: inline-block;
-                width: 500px;
-            }
-        }
-    </style>
-
-</head>
-
-<body>
-    <header class="main-header navbar-expand-lg display: flex;" style="background-color: #eee;">
-        <div class="navbar" style="display: flex; padding: 0px 85px 0px 15px; margin-bottom: 15px;">
-            <!--style="display: flex; margin: 0px;">-->
-            <!--justify-content: space-between; padding: 0px;-->
-            <a class="navbar-brand mr-auto" style="line-height: 50px; font-size: 24px;" href="/index_new">Smart Coffee</a>
-            <!--<span style="font-size: 24px; line-height: 60px; margin: 0px">發酵槽 F2 控制_感測器抽水雙核隔膜泵</span>-->
-            <nav class="nav-list-pc">
-                <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
-                    <span id="coffee_title_pc" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
-                    <li class="nav-item dropdown">
-                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_container"
-                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-                            貨櫃狀態
-                        </a>
-                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_container">
-                            <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
-                        </div>
-                    </li>
-                    <li class="nav-item dropdown">
-                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_chart" data-toggle="dropdown"
-                            aria-haspopup="true" aria-expanded="false">
-                            感測器圖表
-                        </a>
-                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_chart">
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__桶槽</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__出料</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__桶槽</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__出料</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__桶槽</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__出料</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item"
-                                href="/chart_FI/UltraSonic/1">發酵槽__入料</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/chart_F/UltraSonic/1">發酵槽__桶槽</a>
-                            <a style="line-height: 40px;" class="dropdown-item"
-                                href="/chart_FO/UltraSonic/1">發酵槽__出料</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item"
-                                href="/chart_DI/UltraSonic/1">乾燥槽__入料</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/chart_D/UltraSonic/1">乾燥槽__桶槽</a>
-                            <a style="line-height: 40px;" class="dropdown-item"
-                                href="/chart_DO/UltraSonic/1">乾燥槽__出料</a>
-                        </div>
-                    </li>
-
-                    <li class="nav-item dropdown">
-                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_camera" data-toggle="dropdown"
-                            aria-haspopup="true" aria-expanded="false">
-                            攝影機畫面
-                        </a>
-                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_camera">
-                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a>
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a>
-                        </div>
-                    </li>
-                    <li class="nav-item dropdown">
-                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_pc" data-toggle="dropdown"
-                            aria-haspopup="true" aria-expanded="false">
-                            User
-                        </a>
-                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_user_pc">
-                            {% if status == 0 %}
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:開發人員</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
-                            {% elif status == 1 %}
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:經銷商</a>
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
-                            {% elif status == 2 %}
-                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:使用者</a>
-                            {% endif %}
-                            <div class="dropdown-divider"></div>
-                            <a style="line-height: 40px;" class="dropdown-item" href="/logout">帳號登出</a>
-                        </div>
-                    </li>
-                </ul>
-            </nav>
-
-            <nav class="nav-list-phone">
-                <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
-                    <span id="coffee_title_phone" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
-                    <!-- <li class="nav-item dropdown">
-                        <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
-                    </li>
-                    <li class="nav-item dropdown">
-                        <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
-                    </li>
-                    <li class="nav-item dropdown">
-                        <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
-                    </li>
-                    <li class="nav-item dropdown">
-                        <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
-                    </li> -->
-                    <li class="nav-item dropdown">
-                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_phone" data-toggle="dropdown"
-                            aria-haspopup="true" aria-expanded="false">
-                            User
-                        </a>
-                    </li>
-                </ul> 
-            </nav>
-
-
-
-        </div>
-    </header>
-
-</body>
-
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <title>{{ title }}</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+    <!-- <meta http-equiv="refresh" content="300" />  每 content 秒網頁自動更新-->
+
+    <!-- 新 Bootstrap4 核心 CSS 文件 -->
+    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
+    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
+    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
+    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
+    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
+    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
+    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
+    <!--可用來建立使用者小圖示-->
+    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
+    <!-- Rita 網頁 title 旁邊的 icon --> <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
+    <link rel="icon" href="..\static\img\skyeye-2.ico" type="image/x-icon">
+
+    <!-- 參考資料 -->
+    <!-- https://ithelp.ithome.com.tw/articles/10244121 -->
+
+    <script>
+        var status = '{{status}}';
+        var username = '{{username}}';
+        $(document).ready(function(){
+            $('#navbarDropdown_user_pc').text(username)
+            $('#navbarDropdown_user_phone').text(username)
+            console.log('header_status: ' + status)
+            console.log('header_username: ' + username)
+            // if ( (status == 2) || (status == 8)  || (status == 9) ) {
+            //     $('input').prop('disabled', true);
+            //     $('button').prop('disabled', true);
+            // } else if ( (status == 0) || (status == 1) ) {
+            //     $('input').prop('disabled', false);
+            //     $('button').prop('disabled', false);   
+            // }
+        });
+    </script>
+
+
+    <style>
+        .footer{
+            position: absolute;
+            width: 100%;
+            background-color: #eee;
+            text-align: center;
+        }
+        body {
+            margin: 0;
+        }
+        /* 文字輸入框 */
+        .input-text {
+            height: 25px;
+            width: 40px;
+            text-align: center;
+            margin-left: 2px;
+            margin-right: 5px;
+        }
+        /* 致動器狀態表格置中 */
+        .label_ActuatorStatus {
+            margin: auto;
+        }
+        /* 致動器 ON 樣式 */
+        .input-button-on {
+            color: #008CBA;
+            border: 2px rgb(182, 181, 181) solid;
+            background-color: whitesmoke;
+            padding: 1px 3px;
+            width: 45px;
+        }
+        /* 致動器 OFF 樣式 */
+        .input-button-off {
+            color: #707070;
+            border: 2px rgb(192, 192, 192) solid;
+            background-color: whitesmoke;
+            padding: 1px 3px;
+            width: 45px;
+        }
+        /* 輸入按鈕 */
+        .input-button {
+            font-size: 14px;
+            color: #008CBA;
+            border: 2px rgb(182, 181, 181) solid;
+            background-color: whitesmoke;
+            padding: 1px 3px;
+        }
+        /* 大表格樣式 */
+        .table-all {
+            font-size:18px; 
+            border:2px #cccccc solid; 
+            margin-left: 10px; 
+            margin-right: 10px; 
+            width: 98%;
+        }
+
+        /* ---------------------------------------------------------- */
+
+        html,
+        body {
+            height: 100%;
+        }
+
+        #wrapper {
+            /* 設定高度最小為100%, 如果內容區塊很多, 可以長大 */
+            min-height: 100%;
+            /* 位置設為relative, 作為footer區塊位置的參考 */
+            position: relative;
+        }
+
+        .navbar-dark .navbar-nav .nav-link {
+            color: white;
+            cursor: pointer;
+            text-decoration: none;
+            width: 110px;
+            height: 46px;
+        }
+
+        .nav-top {
+            line-height: 40px;
+            background-color: #C4C4C4;
+        }
+
+        .website_title {
+            font-family: Roboto;
+            font-style: normal;
+            font-weight: normal;
+            font-size: 30px;
+            color: #000000;
+        }
+
+        .navbar-nav>li {
+            float: none;
+            display: inline-block;
+            width: 100px;
+            margin: 0 auto;
+            text-align: center;
+        }
+
+        .navbar-nav>li a {
+            font-size: 20px;
+        }
+
+        .main-page {
+            margin-top: 200px;
+        }
+
+        .page-title {
+            font-family: Roboto;
+            font-style: normal;
+            font-weight: bold;
+            font-size: 36px;
+        }
+
+
+        .flex {
+            display: flex;
+            flex-direction: row;
+            flex-wrap: wrap;
+            justify-content: center;
+        }
+
+        .set-link {
+            display: inline-block;
+            width: 350px;
+            height: 100px;
+            line-height: 100px;
+            background: #008CBA;
+            border: 1px solid #CFCFCF;
+            box-sizing: border-box;
+            color: #FFFFFF;
+            border-radius: 10px;
+            font-size: 36px;
+        }
+
+        .cmn-toggle {
+            position: absolute;
+            margin-left: 0px;
+            visibility: hidden;
+        }
+
+        .cmn-toggle+label {
+            display: block;
+            position: relative;
+            cursor: pointer;
+            outline: none;
+            user-select: none;
+        }
+
+        input.cmn-toggle-round-flat+label {
+            padding: 2px;
+            width: 60px;
+            height: 30px;
+            background-color: #C0C0C0;
+            border-radius: 60px;
+            transition: background 0.4s;
+        }
+
+        input.cmn-toggle-round-flat+label:before,
+        input.cmn-toggle-round-flat+label:after {
+            display: block;
+            position: absolute;
+            content: "";
+        }
+
+        input.cmn-toggle-round-flat+label:before {
+            top: 2px;
+            left: 2px;
+            bottom: 2px;
+            right: 2px;
+            background-color: #fff;
+            border-radius: 60px;
+            transition: background 0.4s;
+        }
+
+        input.cmn-toggle-round-flat+label:after {
+            top: 4px;
+            left: 4px;
+            bottom: 4px;
+            width: 24px;
+            background-color: #dddddd;
+            border-radius: 52px;
+            transition: margin 0.4s, background 0.4s;
+        }
+
+        input.cmn-toggle-round-flat:checked+label {
+            background-color: #C0C0C0;
+        }
+
+        input.cmn-toggle-round-flat:checked+label:after {
+            margin-left: 27px;
+            background-color: #008CBA;
+        }
+
+
+        .main-menu li {
+            position: relative;
+            transition: .5s;
+            list-style-type: none;
+        }
+
+        .main-menu li a {
+            padding: 0 15px;
+            line-height: 60px;
+            font-size: 18px;
+        }
+
+
+        .main-menu li::after {
+            content: '';
+            position: absolute;
+            height: 4px;
+            left: 50%;
+            right: 50%;
+            bottom: 0;
+            background-color: #bbb;
+            transition: .5s;
+        }
+
+        .main-menu li:hover {
+            background-color: #ddd;
+        }
+
+        .main-menu li:hover::after {
+            left: 0;
+            right: 0;
+        }
+
+
+
+
+        @media(max-width:373px) {
+            .card {
+                margin-right: 0px;
+            }
+
+            .set-link {
+                width: 250px;
+            }
+        }
+
+        @media(max-width:577px) {}
+
+        @media(min-width:576px) {}
+
+        @media(min-width:768px) {
+            .navbar-nav>li {
+                margin-left: 0px;
+            }
+
+            .navbar-nav .li-block {
+                display: none;
+            }
+        }
+
+        @media(max-width:1050px) {
+            .nav-list-pc {
+                display: none;
+            }
+            .nav-list-phone {
+                display: block;
+            }
+        }
+
+        @media(min-width:1050px) {
+            .nav-list-pc {
+                display: block;
+            }
+            .nav-list-phone {
+                display: none;
+            }
+        }
+
+        @media(min-width:991px) {
+            .navbar-nav>li {
+                margin-left: 20px;
+            }
+
+            .navbar-nav .li-block {
+                display: none;
+            }
+        }
+
+        @media(min-width:1200px) {
+            .navbar-nav>li {
+                margin-left: 50px;
+            }
+
+            .navbar-nav .li-block {
+                display: inline-block;
+                width: 100px;
+            }
+        }
+
+        @media(min-width:1400px) {
+            .navbar-nav .li-block {
+                display: inline-block;
+                width: 200px;
+            }
+        }
+
+
+        @media(min-width:1689px) {
+            .navbar-nav>li {
+                margin-left: 50px;
+            }
+
+            .navbar-nav .li-block {
+                display: inline-block;
+                width: 500px;
+            }
+        }
+    </style>
+
+</head>
+
+<body>
+    <header class="main-header navbar-expand-lg display: flex;" style="background-color: #eee;">
+        <div class="navbar" style="display: flex; padding: 0px 85px 0px 15px; margin-bottom: 15px;">
+            <!--style="display: flex; margin: 0px;">-->
+            <!--justify-content: space-between; padding: 0px;-->
+            <a class="navbar-brand mr-auto" style="line-height: 50px; font-size: 24px;" href="/index_new">Smart Coffee</a>
+            <!--<span style="font-size: 24px; line-height: 60px; margin: 0px">發酵槽 F2 控制_感測器抽水雙核隔膜泵</span>-->
+            <nav class="nav-list-pc">
+                <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
+                    <span id="coffee_title_pc" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
+                    <li class="nav-item dropdown">
+                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_container"
+                            data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+                            貨櫃狀態
+                        </a>
+                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_container">
+                            <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
+                        </div>
+                    </li>
+                    <li class="nav-item dropdown">
+                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_chart" data-toggle="dropdown"
+                            aria-haspopup="true" aria-expanded="false">
+                            感測器圖表
+                        </a>
+                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_chart">
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__桶槽</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__出料</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__桶槽</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__出料</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__桶槽</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__出料</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item"
+                                href="/chart_FI/UltraSonic/1">發酵槽__入料</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/chart_F/UltraSonic/1">發酵槽__桶槽</a>
+                            <a style="line-height: 40px;" class="dropdown-item"
+                                href="/chart_FO/UltraSonic/1">發酵槽__出料</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item"
+                                href="/chart_DI/UltraSonic/1">乾燥槽__入料</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/chart_D/UltraSonic/1">乾燥槽__桶槽</a>
+                            <a style="line-height: 40px;" class="dropdown-item"
+                                href="/chart_DO/UltraSonic/1">乾燥槽__出料</a>
+                        </div>
+                    </li>
+
+                    <li class="nav-item dropdown">
+                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_camera" data-toggle="dropdown"
+                            aria-haspopup="true" aria-expanded="false">
+                            攝影機畫面
+                        </a>
+                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_camera">
+                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a>
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a>
+                        </div>
+                    </li>
+                    <li class="nav-item dropdown">
+                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_pc" data-toggle="dropdown"
+                            aria-haspopup="true" aria-expanded="false">
+                            User
+                        </a>
+                        <div class="dropdown-menu" aria-labelledby="navbarDropdown_user_pc">
+                            {% if status == 0 %}
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:開發人員</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
+                            {% elif status == 1 %}
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:經銷商</a>
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
+                            {% elif status == 2 %}
+                            <a style="line-height: 40px;" class="dropdown-item" href="#">權限:使用者</a>
+                            {% endif %}
+                            <div class="dropdown-divider"></div>
+                            <a style="line-height: 40px;" class="dropdown-item" href="/logout">帳號登出</a>
+                        </div>
+                    </li>
+                </ul>
+            </nav>
+
+            <nav class="nav-list-phone">
+                <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
+                    <span id="coffee_title_phone" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
+                    <!-- <li class="nav-item dropdown">
+                        <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
+                    </li>
+                    <li class="nav-item dropdown">
+                        <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
+                    </li>
+                    <li class="nav-item dropdown">
+                        <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
+                    </li>
+                    <li class="nav-item dropdown">
+                        <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
+                    </li> -->
+                    <li class="nav-item dropdown">
+                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_phone" data-toggle="dropdown"
+                            aria-haspopup="true" aria-expanded="false">
+                            User
+                        </a>
+                    </li>
+                </ul> 
+            </nav>
+
+
+
+        </div>
+    </header>
+
+</body>
+
 </html>

+ 223 - 223
app/templates/index_new.html

@@ -1,224 +1,224 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-    <meta charset="UTF-8">
-    <title>{{ title }}</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-
-    <!-- 新 Bootstrap4 核心 CSS 文件 -->
-    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
-
-    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
-    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
-
-    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
-    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
-
-    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
-    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
-    <!-- Rita 網頁 title 旁邊的 icon -->
-    <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
-    <link rel="icon" href="..\static\img\icon-3.ico" type="image/x-icon">
-    <!--
-    <script src="../static/js/sign_in.js"></script>
-
-    <link rel="stylesheet" href="../static/css/sign_in.css">
--->
-    <script>
-        $(document).ready(function () {
-            $("#coffee_title_pc").text('Smart Coffee 總貨櫃系統');
-            $("#coffee_title_phone").text('總貨櫃系統');
-            loading_status();
-        });
-
-        function loading_status(){
-            $.get('/loading/container', '', function (res) {
-                if (res.Clean_container == 'Waiting') {
-                    $("#CleanContainer_status").css("background-color", "#C0C0C0") 
-                } else if (res.Clean_container == 'Working') {
-                    $("#CleanContainer_status").css("background-color", "forestgreen")
-                } else if (res.Clean_container == 'Warning') {
-                    $("#CleanContainer_status").css("background-color", "crimson")
-                }
-
-                if (res.ColorSelect_container == 'Waiting') {
-                    $("#ColorContainer_status").css("background-color", "#C0C0C0") 
-                } else if (res.ColorSelect_container == 'Working') {
-                    $("#ColorContainer_status").css("background-color", "forestgreen")
-                } else if (res.ColorSelect_container == 'Warning') {
-                    $("#ColorContainer_status").css("background-color", "crimson")
-                }
-
-                if (res.Peel_container == 'Waiting') {
-                    $("#PeelContainer_status").css("background-color", "#C0C0C0") 
-                } else if (res.Peel_container == 'Working') {
-                    $("#PeelContainer_status").css("background-color", "forestgreen")
-                } else if (res.Peel_container == 'Warning') {
-                    $("#PeelContainer_status").css("background-color", "crimson")
-                }
-
-                if (res.Ferment_container == 'Waiting') {
-                    $("#FermentContainer_status").css("background-color", "#C0C0C0") 
-                } else if (res.Ferment_container == 'Working') {
-                    $("#FermentContainer_status").css("background-color", "forestgreen")
-                } else if (res.Ferment_container == 'Warning') {
-                    $("#FermentContainer_status").css("background-color", "crimson")
-                }
-
-                if (res.Dry_container == 'Waiting') {
-                    $("#DryContainer_status").css("background-color", "#C0C0C0") 
-                } else if (res.Dry_container == 'Working') {
-                    $("#DryContainer_status").css("background-color", "forestgreen")
-                } else if (res.Dry_container == 'Warning') {
-                    $("#DryContainer_status").css("background-color", "crimson")
-                }
-            }, 'json');
-        }
-
-    </script>
-
-    <style>
-        /* .Container_position {
-            position: absolute;
-            top: 100px;
-            left: 125px;
-            width: 1295px;
-            height: 100px;
-        } */
-        /* 桶槽狀態顯示的顏色條 */
-        .div-Container-Status {
-            width: 100%; 
-            height: 20px; 
-            background-color: #c0c0c0; 
-            text-align: center;
-            background-color: black;
-        }
-        /* 各桶槽圖片大小的共同 CSS, 詳細位置數值如下 */
-        .div_Container_position {
-            text-align: center;
-            font-weight: bold;
-            border: 1px aquamarine solid;
-        }
-        #CleanContainer {
-            position: absolute;
-            top: 85px;
-            left: 115px;
-            width: 245px;
-            height: 590px;
-        }
-        #ColorContainer {
-            position: absolute;
-            top: 85px;
-            left: 370px;
-            width: 255px;
-            height: 590px;
-        }
-        #PeelContainer {
-            position: absolute;
-            top: 85px;
-            left: 635px;
-            width: 250px;
-            height: 590px;
-        }
-        #FermentContainer {
-            position: absolute;
-            top: 85px;
-            left: 900px;
-            width: 220px;
-            height: 590px;
-        }
-        #DryContainer {
-            position: absolute;
-            top: 85px;
-            left: 1135px;
-            width: 280px;
-            height: 590px;
-        }
-    </style>
-</head>
-
-<body>
-    <div id="wrapper">
-        <div id="coffee_header">
-            <!-- 匯入共同使用的 header.html 內容 -->
-            {% include 'header.html' %}
-        </div>
-
-        <div style="height: 605px;">
-            <br>
-            <br>
-            <!-- 底圖 各貨櫃示意圖 -->
-            <!-- <center><img src="../static/img/Coffee_home.png" style="margin: auto; width: 1300px;"></center> -->
-
-            <!-- 清洗浮選槽 -->
-            <div id="CleanContainer" tabindex="0" class="div_Container_position" role="button">
-                清洗浮選狀態
-                <div id="CleanContainer_status" class="div-Container-Status"></div>
-                <img src="../static/img/clean.png" width="100%">
-            </div>
-
-            <!-- 色選機 -->
-            <div id="ColorContainer" tabindex="0" class="div_Container_position" role="button">
-                色選機狀態
-                <div id="ColorContainer_status" class="div-Container-Status"></div>
-                <img src="../static/img/color.png" width="100%">
-            </div>
-
-            <!-- 脫皮機 -->
-            <div id="PeelContainer" tabindex="0" class="div_Container_position" role="button">
-                脫皮機狀態
-                <div id="PeelContainer_status" class="div-Container-Status"></div>
-                <img src="../static/img/peel.png" width="100%">
-            </div>
-
-            <!-- 發酵槽 -->
-            <div id="FermentContainer" tabindex="0" class="div_Container_position" role="button">
-                發酵槽狀態
-                <div id="FermentContainer_status" class="div-Container-Status"></div>
-                <img src="../static/img/ferment.png" width="100%">
-            </div>
-            
-            <!-- 乾燥槽 -->
-            <div id="DryContainer" tabindex="0" class="div_Container_position" role="button">
-                乾燥槽狀態
-                <div id="DryContainer_status" class="div-Container-Status"></div>
-                <img src="../static/img/dry.png" width="100%">
-            </div>
-
-            <br>
-            <br>
-
-        </div>
-        <script>
-            var button_CleanContainer = document.getElementById('CleanContainer');
-            button_CleanContainer.addEventListener('click', function () {
-                window.location.href = '/clean';
-            });
-            var button_ColorContainer = document.getElementById('ColorContainer');
-            button_ColorContainer.addEventListener('click', function () {
-                window.location.href = '/clean';
-            });
-            var button_PeelContainer = document.getElementById('PeelContainer');
-            button_PeelContainer.addEventListener('click', function () {
-                window.location.href = '/clean';
-            });
-            var button_FermentContainer = document.getElementById('FermentContainer');
-            button_FermentContainer.addEventListener('click', function () {
-                window.location.href = '/ferment';
-            });
-            var button_DryContainer = document.getElementById('DryContainer');
-            button_DryContainer.addEventListener('click', function () {
-                window.location.href = '/dry';
-            });
-        </script>
-
-        <div id="coffee_footer">
-            <!-- 匯入共同使用的 footer.html 內容 -->
-            {% include 'footer.html' %}
-        </div>
-    </div>
-
-</body>
-
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+    <meta charset="UTF-8">
+    <title>{{ title }}</title>
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
+
+    <!-- 新 Bootstrap4 核心 CSS 文件 -->
+    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
+
+    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
+    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
+
+    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
+    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
+
+    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
+    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
+    <!-- Rita 網頁 title 旁邊的 icon -->
+    <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
+    <link rel="icon" href="..\static\img\icon-3.ico" type="image/x-icon">
+    <!--
+    <script src="../static/js/sign_in.js"></script>
+
+    <link rel="stylesheet" href="../static/css/sign_in.css">
+-->
+    <script>
+        $(document).ready(function () {
+            $("#coffee_title_pc").text('Smart Coffee 總貨櫃系統');
+            $("#coffee_title_phone").text('總貨櫃系統');
+            loading_status();
+        });
+
+        function loading_status(){
+            $.get('/loading/container', '', function (res) {
+                if (res.Clean_container == 'Waiting') {
+                    $("#CleanContainer_status").css("background-color", "#C0C0C0") 
+                } else if (res.Clean_container == 'Working') {
+                    $("#CleanContainer_status").css("background-color", "forestgreen")
+                } else if (res.Clean_container == 'Warning') {
+                    $("#CleanContainer_status").css("background-color", "crimson")
+                }
+
+                if (res.ColorSelect_container == 'Waiting') {
+                    $("#ColorContainer_status").css("background-color", "#C0C0C0") 
+                } else if (res.ColorSelect_container == 'Working') {
+                    $("#ColorContainer_status").css("background-color", "forestgreen")
+                } else if (res.ColorSelect_container == 'Warning') {
+                    $("#ColorContainer_status").css("background-color", "crimson")
+                }
+
+                if (res.Peel_container == 'Waiting') {
+                    $("#PeelContainer_status").css("background-color", "#C0C0C0") 
+                } else if (res.Peel_container == 'Working') {
+                    $("#PeelContainer_status").css("background-color", "forestgreen")
+                } else if (res.Peel_container == 'Warning') {
+                    $("#PeelContainer_status").css("background-color", "crimson")
+                }
+
+                if (res.Ferment_container == 'Waiting') {
+                    $("#FermentContainer_status").css("background-color", "#C0C0C0") 
+                } else if (res.Ferment_container == 'Working') {
+                    $("#FermentContainer_status").css("background-color", "forestgreen")
+                } else if (res.Ferment_container == 'Warning') {
+                    $("#FermentContainer_status").css("background-color", "crimson")
+                }
+
+                if (res.Dry_container == 'Waiting') {
+                    $("#DryContainer_status").css("background-color", "#C0C0C0") 
+                } else if (res.Dry_container == 'Working') {
+                    $("#DryContainer_status").css("background-color", "forestgreen")
+                } else if (res.Dry_container == 'Warning') {
+                    $("#DryContainer_status").css("background-color", "crimson")
+                }
+            }, 'json');
+        }
+
+    </script>
+
+    <style>
+        /* .Container_position {
+            position: absolute;
+            top: 100px;
+            left: 125px;
+            width: 1295px;
+            height: 100px;
+        } */
+        /* 桶槽狀態顯示的顏色條 */
+        .div-Container-Status {
+            width: 100%; 
+            height: 20px; 
+            background-color: #c0c0c0; 
+            text-align: center;
+            background-color: black;
+        }
+        /* 各桶槽圖片大小的共同 CSS, 詳細位置數值如下 */
+        .div_Container_position {
+            text-align: center;
+            font-weight: bold;
+            border: 1px aquamarine solid;
+        }
+        #CleanContainer {
+            position: absolute;
+            top: 85px;
+            left: 115px;
+            width: 245px;
+            height: 590px;
+        }
+        #ColorContainer {
+            position: absolute;
+            top: 85px;
+            left: 370px;
+            width: 255px;
+            height: 590px;
+        }
+        #PeelContainer {
+            position: absolute;
+            top: 85px;
+            left: 635px;
+            width: 250px;
+            height: 590px;
+        }
+        #FermentContainer {
+            position: absolute;
+            top: 85px;
+            left: 900px;
+            width: 220px;
+            height: 590px;
+        }
+        #DryContainer {
+            position: absolute;
+            top: 85px;
+            left: 1135px;
+            width: 280px;
+            height: 590px;
+        }
+    </style>
+</head>
+
+<body>
+    <div id="wrapper">
+        <div id="coffee_header">
+            <!-- 匯入共同使用的 header.html 內容 -->
+            {% include 'header.html' %}
+        </div>
+
+        <div style="height: 605px;">
+            <br>
+            <br>
+            <!-- 底圖 各貨櫃示意圖 -->
+            <!-- <center><img src="../static/img/Coffee_home.png" style="margin: auto; width: 1300px;"></center> -->
+
+            <!-- 清洗浮選槽 -->
+            <div id="CleanContainer" tabindex="0" class="div_Container_position" role="button">
+                清洗浮選狀態
+                <div id="CleanContainer_status" class="div-Container-Status"></div>
+                <img src="../static/img/clean.png" width="100%">
+            </div>
+
+            <!-- 色選機 -->
+            <div id="ColorContainer" tabindex="0" class="div_Container_position" role="button">
+                色選機狀態
+                <div id="ColorContainer_status" class="div-Container-Status"></div>
+                <img src="../static/img/color.png" width="100%">
+            </div>
+
+            <!-- 脫皮機 -->
+            <div id="PeelContainer" tabindex="0" class="div_Container_position" role="button">
+                脫皮機狀態
+                <div id="PeelContainer_status" class="div-Container-Status"></div>
+                <img src="../static/img/peel.png" width="100%">
+            </div>
+
+            <!-- 發酵槽 -->
+            <div id="FermentContainer" tabindex="0" class="div_Container_position" role="button">
+                發酵槽狀態
+                <div id="FermentContainer_status" class="div-Container-Status"></div>
+                <img src="../static/img/ferment.png" width="100%">
+            </div>
+            
+            <!-- 乾燥槽 -->
+            <div id="DryContainer" tabindex="0" class="div_Container_position" role="button">
+                乾燥槽狀態
+                <div id="DryContainer_status" class="div-Container-Status"></div>
+                <img src="../static/img/dry.png" width="100%">
+            </div>
+
+            <br>
+            <br>
+
+        </div>
+        <script>
+            var button_CleanContainer = document.getElementById('CleanContainer');
+            button_CleanContainer.addEventListener('click', function () {
+                window.location.href = '/clean';
+            });
+            var button_ColorContainer = document.getElementById('ColorContainer');
+            button_ColorContainer.addEventListener('click', function () {
+                window.location.href = '/clean';
+            });
+            var button_PeelContainer = document.getElementById('PeelContainer');
+            button_PeelContainer.addEventListener('click', function () {
+                window.location.href = '/clean';
+            });
+            var button_FermentContainer = document.getElementById('FermentContainer');
+            button_FermentContainer.addEventListener('click', function () {
+                window.location.href = '/ferment';
+            });
+            var button_DryContainer = document.getElementById('DryContainer');
+            button_DryContainer.addEventListener('click', function () {
+                window.location.href = '/dry';
+            });
+        </script>
+
+        <div id="coffee_footer">
+            <!-- 匯入共同使用的 footer.html 內容 -->
+            {% include 'footer.html' %}
+        </div>
+    </div>
+
+</body>
+
 </html>