header.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>{{ title }}</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <!-- <meta http-equiv="refresh" content="300" /> 每 content 秒網頁自動更新-->
  8. <!-- 新 Bootstrap4 核心 CSS 文件 -->
  9. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">
  10. <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
  11. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  12. <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->
  13. <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  14. <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->
  15. <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
  16. <!--可用來建立使用者小圖示-->
  17. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  18. <!-- Rita 網頁 title 旁邊的 icon --> <!-- 參考資料 https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/26839/ -->
  19. <link rel="icon" href="..\static\img\skyeye-2.ico" type="image/x-icon">
  20. <!-- 參考資料 -->
  21. <!-- https://ithelp.ithome.com.tw/articles/10244121 -->
  22. <script>
  23. var status = '{{status}}';
  24. var username = '{{username}}';
  25. $(document).ready(function(){
  26. $('#navbarDropdown_user').text(username)
  27. /*
  28. if (status == 2) {
  29. $('input').prop('disabled', true);
  30. $('button').prop('disabled', true);
  31. } else if ( (status == 0) || (status == 1) ) {
  32. $('input').prop('disabled', false);
  33. $('button').prop('disabled', false);
  34. }
  35. */
  36. });
  37. </script>
  38. <style>
  39. .footer {
  40. height: 40px;
  41. box-sizing: border-box;
  42. /* 設定footer絕對位置在底部 */
  43. position: absolute;
  44. bottom: 0px;
  45. width: 100%;
  46. background-color: #eee;
  47. text-align: center;
  48. }
  49. html,
  50. body {
  51. height: 100%;
  52. }
  53. #wrapper {
  54. /* 設定高度最小為100%, 如果內容區塊很多, 可以長大 */
  55. min-height: 100%;
  56. /* 位置設為relative, 作為footer區塊位置的參考 */
  57. position: relative;
  58. }
  59. .navbar-dark .navbar-nav .nav-link {
  60. color: white;
  61. cursor: pointer;
  62. text-decoration: none;
  63. width: 110px;
  64. height: 46px;
  65. }
  66. .nav-top {
  67. line-height: 40px;
  68. background-color: #C4C4C4;
  69. }
  70. .website_title {
  71. font-family: Roboto;
  72. font-style: normal;
  73. font-weight: normal;
  74. font-size: 30px;
  75. color: #000000;
  76. }
  77. .navbar-nav>li {
  78. float: none;
  79. display: inline-block;
  80. width: 100px;
  81. margin: 0 auto;
  82. text-align: center;
  83. }
  84. .navbar-nav>li a {
  85. font-size: 20px;
  86. }
  87. .main-page {
  88. margin-top: 200px;
  89. }
  90. .page-title {
  91. font-family: Roboto;
  92. font-style: normal;
  93. font-weight: bold;
  94. font-size: 36px;
  95. }
  96. .flex {
  97. display: flex;
  98. flex-direction: row;
  99. flex-wrap: wrap;
  100. justify-content: center;
  101. }
  102. .set-link {
  103. display: inline-block;
  104. width: 350px;
  105. height: 100px;
  106. line-height: 100px;
  107. background: #008CBA;
  108. border: 1px solid #CFCFCF;
  109. box-sizing: border-box;
  110. color: #FFFFFF;
  111. border-radius: 10px;
  112. font-size: 36px;
  113. }
  114. .cmn-toggle {
  115. position: absolute;
  116. margin-left: 0px;
  117. visibility: hidden;
  118. }
  119. .cmn-toggle+label {
  120. display: block;
  121. position: relative;
  122. cursor: pointer;
  123. outline: none;
  124. user-select: none;
  125. }
  126. input.cmn-toggle-round-flat+label {
  127. padding: 2px;
  128. width: 60px;
  129. height: 30px;
  130. background-color: #C0C0C0;
  131. border-radius: 60px;
  132. transition: background 0.4s;
  133. }
  134. input.cmn-toggle-round-flat+label:before,
  135. input.cmn-toggle-round-flat+label:after {
  136. display: block;
  137. position: absolute;
  138. content: "";
  139. }
  140. input.cmn-toggle-round-flat+label:before {
  141. top: 2px;
  142. left: 2px;
  143. bottom: 2px;
  144. right: 2px;
  145. background-color: #fff;
  146. border-radius: 60px;
  147. transition: background 0.4s;
  148. }
  149. input.cmn-toggle-round-flat+label:after {
  150. top: 4px;
  151. left: 4px;
  152. bottom: 4px;
  153. width: 24px;
  154. background-color: #dddddd;
  155. border-radius: 52px;
  156. transition: margin 0.4s, background 0.4s;
  157. }
  158. input.cmn-toggle-round-flat:checked+label {
  159. background-color: #C0C0C0;
  160. }
  161. input.cmn-toggle-round-flat:checked+label:after {
  162. margin-left: 27px;
  163. background-color: #008CBA;
  164. }
  165. .main-menu li {
  166. position: relative;
  167. transition: .5s;
  168. list-style-type: none;
  169. }
  170. .main-menu li a {
  171. padding: 0 15px;
  172. line-height: 60px;
  173. font-size: 18px;
  174. }
  175. .main-menu li::after {
  176. content: '';
  177. position: absolute;
  178. height: 4px;
  179. left: 50%;
  180. right: 50%;
  181. bottom: 0;
  182. background-color: #bbb;
  183. transition: .5s;
  184. }
  185. .main-menu li:hover {
  186. background-color: #ddd;
  187. }
  188. .main-menu li:hover::after {
  189. left: 0;
  190. right: 0;
  191. }
  192. @media(max-width:373px) {
  193. .card {
  194. margin-right: 0px;
  195. }
  196. .set-link {
  197. width: 250px;
  198. }
  199. }
  200. @media(max-width:577px) {}
  201. @media(min-width:576px) {}
  202. @media(min-width:768px) {
  203. .navbar-nav>li {
  204. margin-left: 0px;
  205. }
  206. .navbar-nav .li-block {
  207. display: none;
  208. }
  209. }
  210. @media(min-width:991px) {
  211. .navbar-nav>li {
  212. margin-left: 20px;
  213. }
  214. .navbar-nav .li-block {
  215. display: none;
  216. }
  217. }
  218. @media(min-width:1200px) {
  219. .navbar-nav>li {
  220. margin-left: 50px;
  221. }
  222. .navbar-nav .li-block {
  223. display: inline-block;
  224. width: 100px;
  225. }
  226. }
  227. @media(min-width:1400px) {
  228. .navbar-nav .li-block {
  229. display: inline-block;
  230. width: 200px;
  231. }
  232. }
  233. @media(min-width:1689px) {
  234. .navbar-nav>li {
  235. margin-left: 50px;
  236. }
  237. .navbar-nav .li-block {
  238. display: inline-block;
  239. width: 500px;
  240. }
  241. }
  242. </style>
  243. </head>
  244. <body>
  245. <header class="main-header navbar-expand-lg display: flex;" style="background-color: #eee;">
  246. <div class="navbar" style="display: flex; padding: 0px 95px 0px 15px; margin-bottom: 15px;">
  247. <!--style="display: flex; margin: 0px;">-->
  248. <!--justify-content: space-between; padding: 0px;-->
  249. <a class="navbar-brand mr-auto" style="line-height: 50px; font-size: 24px;" href="/index_new">Smart Coffee</a>
  250. <!--<span style="font-size: 24px; line-height: 60px; margin: 0px">發酵槽 F2 控制_感測器抽水雙核隔膜泵</span>-->
  251. <nav>
  252. <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
  253. <span id="coffee_title" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
  254. <li class="nav-item dropdown">
  255. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_container"
  256. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  257. 貨櫃狀態
  258. </a>
  259. <div class="dropdown-menu" aria-labelledby="navbarDropdown_container">
  260. <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
  261. <div class="dropdown-divider"></div>
  262. <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
  263. <div class="dropdown-divider"></div>
  264. <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
  265. </div>
  266. </li>
  267. <li class="nav-item dropdown">
  268. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_chart" data-toggle="dropdown"
  269. aria-haspopup="true" aria-expanded="false">
  270. 感測器圖表
  271. </a>
  272. <div class="dropdown-menu" aria-labelledby="navbarDropdown_chart">
  273. <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__桶槽</a>
  274. <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__出料</a>
  275. <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__桶槽</a>
  276. <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__出料</a>
  277. <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__桶槽</a>
  278. <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__出料</a>
  279. <div class="dropdown-divider"></div>
  280. <a style="line-height: 40px;" class="dropdown-item"
  281. href="/chart_FI/UltraSonic/1">發酵槽__入料</a>
  282. <a style="line-height: 40px;" class="dropdown-item" href="/chart_F/UltraSonic/1">發酵槽__桶槽</a>
  283. <a style="line-height: 40px;" class="dropdown-item"
  284. href="/chart_FO/UltraSonic/1">發酵槽__出料</a>
  285. <div class="dropdown-divider"></div>
  286. <a style="line-height: 40px;" class="dropdown-item"
  287. href="/chart_DI/UltraSonic/1">乾燥槽__入料</a>
  288. <a style="line-height: 40px;" class="dropdown-item" href="/chart_D/UltraSonic/1">乾燥槽__桶槽</a>
  289. <a style="line-height: 40px;" class="dropdown-item"
  290. href="/chart_DO/UltraSonic/1">乾燥槽__出料</a>
  291. </div>
  292. </li>
  293. <li class="nav-item dropdown">
  294. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_camera" data-toggle="dropdown"
  295. aria-haspopup="true" aria-expanded="false">
  296. 攝影機畫面
  297. </a>
  298. <div class="dropdown-menu" aria-labelledby="navbarDropdown_camera">
  299. <a style="line-height: 40px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a>
  300. <div class="dropdown-divider"></div>
  301. <a style="line-height: 40px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a>
  302. <div class="dropdown-divider"></div>
  303. <a style="line-height: 40px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a>
  304. </div>
  305. </li>
  306. <li class="nav-item dropdown">
  307. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user" data-toggle="dropdown"
  308. aria-haspopup="true" aria-expanded="false">
  309. User
  310. </a>
  311. <div class="dropdown-menu" aria-labelledby="navbarDropdown_user">
  312. {% if status == 0 %}
  313. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:開發人員</a>
  314. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  315. {% elif status == 1 %}
  316. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:經銷商</a>
  317. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  318. {% elif status == 2 %}
  319. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:使用者</a>
  320. {% endif %}
  321. <div class="dropdown-divider"></div>
  322. <a style="line-height: 40px;" class="dropdown-item" href="/logout">帳號登出</a>
  323. </div>
  324. </li>
  325. </ul>
  326. </nav>
  327. </div>
  328. </header>
  329. </body>
  330. </html>