base.html 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{% block title %}{% endblock %}</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. {% block link %}{% endblock %}
  8. <!-- 新 Bootstrap4 核心 CSS 文件../static/css/bootstrap.min.css-->
  9. <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
  10. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  11. <script src="{{ url_for('static', filename='js/jquery-3.2.1.min.js') }}"></script>
  12. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  13. <script src="{{ url_for('static', filename='js/bootstrap.bundle.min.js') }}"></script>
  14. <!-- Rita 網頁 title 旁邊的 icon -->
  15. <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
  16. <link rel="icon" href="{{ url_for('static', filename='img/coffee.svg') }}">
  17. <link rel="stylesheet" href="{{ url_for('static', filename='css/navbars.css') }}">
  18. <link rel="stylesheet" href="{{ url_for('static', filename='css/headers.css') }}">
  19. <link rel="stylesheet" href="{{ url_for('static', filename='css/modals.css') }}">
  20. {% block script %}{% endblock %}
  21. <script>
  22. var status = '{{status}}';
  23. </script>
  24. {% block style %}{% endblock %}
  25. </head>
  26. <body>
  27. <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
  28. <div class="container-fluid">
  29. <a class="navbar-brand text-white" >
  30. <span class="h3 mx-1">{{ title }}</span>
  31. </a>
  32. <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarsExample05" aria-controls="navbarsExample05" aria-expanded="false" aria-label="Toggle navigation">
  33. <span class="navbar-toggler-icon"></span>
  34. </button>
  35. <div class="collapse navbar-collapse" id="navbarsExample05">
  36. <ul class="navbar-nav col-lg-11 justify-content-lg-end">
  37. <li class="nav-item">
  38. <a class="nav-link" aria-current="page" href="/">首頁</a>
  39. </li>
  40. <li class="nav-item dropdown">
  41. <a class="nav-link dropdown-toggle" href="" data-bs-toggle="dropdown" aria-expanded="false">貨櫃狀態</a>
  42. <ul class="dropdown-menu">
  43. <li><a style="line-height: 20px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a></li>
  44. <div class="dropdown-divider"></div>
  45. <li><a style="line-height: 20px;" class="dropdown-item" href="/clean">清洗貨櫃</a></li>
  46. <div class="dropdown-divider"></div>
  47. <li><a style="line-height: 20px;" class="dropdown-item" href="/ferment">發酵貨櫃</a></li>
  48. <div class="dropdown-divider"></div>
  49. <li><a style="line-height: 20px;" class="dropdown-item" href="/dry">乾燥貨櫃</a></li>
  50. <div class="dropdown-divider"></div>
  51. <li><a style="line-height: 20px;" class="dropdown-item" href="/board">板子燒錄</a></li>
  52. </ul>
  53. </li>
  54. <li class="nav-item dropdown">
  55. <a class="nav-link dropdown-toggle" href="" data-bs-toggle="dropdown" aria-expanded="false">感測器圖表</a>
  56. <ul class="dropdown-menu">
  57. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_CI/UltraSonic/1">清洗槽__入料</a></li>
  58. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_C/UltraSonic/1">清洗槽__桶槽</a></li>
  59. <div class="dropdown-divider"></div>
  60. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_R/UltraSonic/1">中水_桶槽</a></li>
  61. <div class="dropdown-divider"></div>
  62. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_S/UltraSonic/1">色選機__桶槽</a></li>
  63. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_SO/UltraSonic/1">色選機__出料</a></li>
  64. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_P/UltraSonic/1">脫皮機__桶槽</a></li>
  65. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_PO/UltraSonic/1">脫皮機__出料</a></li>
  66. <div class="dropdown-divider"></div>
  67. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_FI/UltraSonic/1">發酵槽__入料</a></li>
  68. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_F/UltraSonic/1">發酵槽__桶槽</a></li>
  69. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_FO/UltraSonic/1">發酵槽__出料</a></li>
  70. <div class="dropdown-divider"></div>
  71. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_DI/UltraSonic/1">乾燥槽__入料</a></li>
  72. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_D/UltraSonic/1">乾燥槽__桶槽</a></li>
  73. <li><a style="line-height: 20px;" class="dropdown-item" href="/sensor_chart_DO/UltraSonic/1">乾燥槽__出料</a></li>
  74. </ul>
  75. </li>
  76. <li class="nav-item dropdown">
  77. <a class="nav-link dropdown-toggle" href="" data-bs-toggle="dropdown" aria-expanded="false">致動器圖表</a>
  78. <ul class="dropdown-menu">
  79. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_CI/vacuum/1">清洗槽__入料</a></li>
  80. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_C/vacuum/1">清洗槽__桶槽</a></li>
  81. <div class="dropdown-divider"></div>
  82. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_R/vacuum/1">中水_桶槽</a></li>
  83. <div class="dropdown-divider"></div>
  84. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_S/vacuum/1">色選機__桶槽</a></li>
  85. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_P/vacuum/1">脫皮機__桶槽</a></li>
  86. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_PO/vacuum/1">脫皮機__出料</a></li>
  87. <div class="dropdown-divider"></div>
  88. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_FI/vacuum/1">發酵槽__入料</a></li>
  89. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_F/vacuum/1">發酵槽__桶槽</a></li>
  90. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_FO/vacuum/1">發酵槽__出料</a></li>
  91. <div class="dropdown-divider"></div>
  92. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_DI/vacuum/1">乾燥槽__入料</a></li>
  93. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_D/vacuum/1">乾燥槽__桶槽</a></li>
  94. <li><a style="line-height: 20px;" class="dropdown-item" href="/actuator_chart_DO/vacuum/1">乾燥槽__出料</a></li>
  95. </ul>
  96. </li>
  97. <li class="nav-item dropdown">
  98. <a class="nav-link dropdown-toggle" href="" data-bs-toggle="dropdown" aria-expanded="false">攝影機畫面</a>
  99. <ul class="dropdown-menu">
  100. <li><a style="line-height: 20px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a></li>
  101. <div class="dropdown-divider"></div>
  102. <li><a style="line-height: 20px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a></li>
  103. <div class="dropdown-divider"></div>
  104. <li><a style="line-height: 20px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a></li>
  105. </ul>
  106. </li>
  107. <li class="nav-item dropdown">
  108. <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown" aria-expanded="false">User</a>
  109. <ul class="dropdown-menu">
  110. {% if status == 0 %}
  111. <li><a style="line-height: 20px;" class="dropdown-item" href="#">權限:開發人員</a></li>
  112. <li><a style="line-height: 20px;" class="dropdown-item" href="#">修改使用者權限</a></li>
  113. <div class="dropdown-divider"></div>
  114. {% elif status == 1 %}
  115. <li><a style="line-height: 20px;" class="dropdown-item" href="#">權限:經銷商</a></li>
  116. <li><a style="line-height: 20px;" class="dropdown-item" href="#">修改使用者權限</a></li>
  117. <div class="dropdown-divider"></div>
  118. {% elif status == 2 %}
  119. <li><a style="line-height: 20px;" class="dropdown-item" href="#">權限:使用者</a></li>
  120. <div class="dropdown-divider"></div>
  121. {% endif %}
  122. <li><a style="line-height: 20px;" class="dropdown-item" href="/logout">帳號登出</a></li>
  123. </ul>
  124. </li>
  125. </ul>
  126. </div>
  127. </div>
  128. </nav>
  129. <main>
  130. <!-- 可供更改的部分 -->
  131. {% block main %}{% endblock %}
  132. </main>
  133. <footer class="py-3 my-4">
  134. <ul class="nav justify-content-center border-bottom pb-3 mb-3">
  135. <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">關於</a></li>
  136. <li class="nav-item"><a class="nav-link px-2 text-muted">|</a></li>
  137. <li class="nav-item"><a href="#" class="nav-link px-2 text-muted">產品與經銷商</a></li>
  138. <li class="nav-item"><a class="nav-link px-2 text-muted">|</a></li>
  139. <li class="nav-item"><a href="/" class="nav-link px-2 text-muted">回首頁</a></li>
  140. </ul>
  141. <p class="text-center text-muted">&copy; Copyright © 2022 GOLD IN TECHNOLOGY INC. 保留一切權利。</p>
  142. </footer>
  143. {% block script2 %}{% endblock %}
  144. </body>
  145. </html>