header.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503
  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_pc').text(username)
  27. $('#navbarDropdown_user_phone').text(username)
  28. console.log('header_status: ' + status)
  29. console.log('header_username: ' + username)
  30. // if ( (status == 2) || (status == 8) || (status == 9) ) {
  31. // $('input').prop('disabled', true);
  32. // $('button').prop('disabled', true);
  33. // } else if ( (status == 0) || (status == 1) ) {
  34. // $('input').prop('disabled', false);
  35. // $('button').prop('disabled', false);
  36. // }
  37. });
  38. </script>
  39. <style>
  40. .footer{
  41. position: absolute;
  42. width: 100%;
  43. background-color: #eee;
  44. text-align: center;
  45. }
  46. body {
  47. margin: 0;
  48. }
  49. /* 文字輸入框 */
  50. .input-text {
  51. height: 25px;
  52. width: 40px;
  53. text-align: center;
  54. margin-left: 2px;
  55. margin-right: 5px;
  56. }
  57. /* 致動器狀態表格置中 */
  58. .label_ActuatorStatus {
  59. margin: auto;
  60. }
  61. /* 致動器 ON 樣式 */
  62. .input-button-on {
  63. color: #008CBA;
  64. border: 2px rgb(182, 181, 181) solid;
  65. background-color: whitesmoke;
  66. padding: 1px 3px;
  67. width: 45px;
  68. }
  69. /* 致動器 OFF 樣式 */
  70. .input-button-off {
  71. color: #707070;
  72. border: 2px rgb(192, 192, 192) solid;
  73. background-color: whitesmoke;
  74. padding: 1px 3px;
  75. width: 45px;
  76. }
  77. /* 輸入按鈕 */
  78. .input-button {
  79. font-size: 14px;
  80. color: #008CBA;
  81. border: 2px rgb(182, 181, 181) solid;
  82. background-color: whitesmoke;
  83. padding: 1px 3px;
  84. }
  85. /* 大表格樣式 */
  86. .table-all {
  87. font-size:18px;
  88. border:2px #cccccc solid;
  89. margin-left: 10px;
  90. margin-right: 10px;
  91. width: 98%;
  92. }
  93. /* ---------------------------------------------------------- */
  94. html,
  95. body {
  96. height: 100%;
  97. }
  98. #wrapper {
  99. /* 設定高度最小為100%, 如果內容區塊很多, 可以長大 */
  100. min-height: 100%;
  101. /* 位置設為relative, 作為footer區塊位置的參考 */
  102. position: relative;
  103. }
  104. .navbar-dark .navbar-nav .nav-link {
  105. color: white;
  106. cursor: pointer;
  107. text-decoration: none;
  108. width: 110px;
  109. height: 46px;
  110. }
  111. .nav-top {
  112. line-height: 40px;
  113. background-color: #C4C4C4;
  114. }
  115. .website_title {
  116. font-family: Roboto;
  117. font-style: normal;
  118. font-weight: normal;
  119. font-size: 30px;
  120. color: #000000;
  121. }
  122. .navbar-nav>li {
  123. float: none;
  124. display: inline-block;
  125. width: 100px;
  126. margin: 0 auto;
  127. text-align: center;
  128. }
  129. .navbar-nav>li a {
  130. font-size: 20px;
  131. }
  132. .main-page {
  133. margin-top: 200px;
  134. }
  135. .page-title {
  136. font-family: Roboto;
  137. font-style: normal;
  138. font-weight: bold;
  139. font-size: 36px;
  140. }
  141. .flex {
  142. display: flex;
  143. flex-direction: row;
  144. flex-wrap: wrap;
  145. justify-content: center;
  146. }
  147. .set-link {
  148. display: inline-block;
  149. width: 350px;
  150. height: 100px;
  151. line-height: 100px;
  152. background: #008CBA;
  153. border: 1px solid #CFCFCF;
  154. box-sizing: border-box;
  155. color: #FFFFFF;
  156. border-radius: 10px;
  157. font-size: 36px;
  158. }
  159. .cmn-toggle {
  160. position: absolute;
  161. margin-left: 0px;
  162. visibility: hidden;
  163. }
  164. .cmn-toggle+label {
  165. display: block;
  166. position: relative;
  167. cursor: pointer;
  168. outline: none;
  169. user-select: none;
  170. }
  171. input.cmn-toggle-round-flat+label {
  172. padding: 2px;
  173. width: 60px;
  174. height: 30px;
  175. background-color: #C0C0C0;
  176. border-radius: 60px;
  177. transition: background 0.4s;
  178. }
  179. input.cmn-toggle-round-flat+label:before,
  180. input.cmn-toggle-round-flat+label:after {
  181. display: block;
  182. position: absolute;
  183. content: "";
  184. }
  185. input.cmn-toggle-round-flat+label:before {
  186. top: 2px;
  187. left: 2px;
  188. bottom: 2px;
  189. right: 2px;
  190. background-color: #fff;
  191. border-radius: 60px;
  192. transition: background 0.4s;
  193. }
  194. input.cmn-toggle-round-flat+label:after {
  195. top: 4px;
  196. left: 4px;
  197. bottom: 4px;
  198. width: 24px;
  199. background-color: #dddddd;
  200. border-radius: 52px;
  201. transition: margin 0.4s, background 0.4s;
  202. }
  203. input.cmn-toggle-round-flat:checked+label {
  204. background-color: #C0C0C0;
  205. }
  206. input.cmn-toggle-round-flat:checked+label:after {
  207. margin-left: 27px;
  208. background-color: #008CBA;
  209. }
  210. .main-menu li {
  211. position: relative;
  212. transition: .5s;
  213. list-style-type: none;
  214. }
  215. .main-menu li a {
  216. padding: 0 15px;
  217. line-height: 60px;
  218. font-size: 18px;
  219. }
  220. .main-menu li::after {
  221. content: '';
  222. position: absolute;
  223. height: 4px;
  224. left: 50%;
  225. right: 50%;
  226. bottom: 0;
  227. background-color: #bbb;
  228. transition: .5s;
  229. }
  230. .main-menu li:hover {
  231. background-color: #ddd;
  232. }
  233. .main-menu li:hover::after {
  234. left: 0;
  235. right: 0;
  236. }
  237. @media(max-width:373px) {
  238. .card {
  239. margin-right: 0px;
  240. }
  241. .set-link {
  242. width: 250px;
  243. }
  244. }
  245. @media(max-width:577px) {}
  246. @media(min-width:576px) {}
  247. @media(min-width:768px) {
  248. .navbar-nav>li {
  249. margin-left: 0px;
  250. }
  251. .navbar-nav .li-block {
  252. display: none;
  253. }
  254. }
  255. @media(max-width:1050px) {
  256. .nav-list-pc {
  257. display: none;
  258. }
  259. .nav-list-phone {
  260. display: block;
  261. }
  262. }
  263. @media(min-width:1050px) {
  264. .nav-list-pc {
  265. display: block;
  266. }
  267. .nav-list-phone {
  268. display: none;
  269. }
  270. }
  271. @media(min-width:991px) {
  272. .navbar-nav>li {
  273. margin-left: 20px;
  274. }
  275. .navbar-nav .li-block {
  276. display: none;
  277. }
  278. }
  279. @media(min-width:1200px) {
  280. .navbar-nav>li {
  281. margin-left: 50px;
  282. }
  283. .navbar-nav .li-block {
  284. display: inline-block;
  285. width: 100px;
  286. }
  287. }
  288. @media(min-width:1400px) {
  289. .navbar-nav .li-block {
  290. display: inline-block;
  291. width: 200px;
  292. }
  293. }
  294. @media(min-width:1689px) {
  295. .navbar-nav>li {
  296. margin-left: 50px;
  297. }
  298. .navbar-nav .li-block {
  299. display: inline-block;
  300. width: 500px;
  301. }
  302. }
  303. </style>
  304. </head>
  305. <body>
  306. <header class="main-header navbar-expand-lg display: flex;" style="background-color: #eee;">
  307. <div class="navbar" style="display: flex; padding: 0px 85px 0px 15px; margin-bottom: 15px;">
  308. <!--style="display: flex; margin: 0px;">-->
  309. <!--justify-content: space-between; padding: 0px;-->
  310. <a class="navbar-brand mr-auto" style="line-height: 50px; font-size: 24px;" href="/index_new">Smart Coffee</a>
  311. <!--<span style="font-size: 24px; line-height: 60px; margin: 0px">發酵槽 F2 控制_感測器抽水雙核隔膜泵</span>-->
  312. <nav class="nav-list-pc">
  313. <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
  314. <span id="coffee_title_pc" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
  315. <li class="nav-item dropdown">
  316. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_container"
  317. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  318. 貨櫃狀態
  319. </a>
  320. <div class="dropdown-menu" aria-labelledby="navbarDropdown_container">
  321. <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
  322. <div class="dropdown-divider"></div>
  323. <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
  324. <div class="dropdown-divider"></div>
  325. <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
  326. <div class="dropdown-divider"></div>
  327. <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
  328. <div class="dropdown-divider"></div>
  329. <a style="line-height: 40px;" class="dropdown-item" href="/board">板子燒錄</a>
  330. </div>
  331. </li>
  332. <li class="nav-item dropdown">
  333. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_chart" data-toggle="dropdown"
  334. aria-haspopup="true" aria-expanded="false">
  335. 感測器圖表
  336. </a>
  337. <div class="dropdown-menu" aria-labelledby="navbarDropdown_chart">
  338. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_CI/UltraSonic/1">清洗浮選__入料</a>
  339. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_C/UltraSonic/1">清洗浮選__桶槽</a>
  340. <div class="dropdown-divider"></div>
  341. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_R/UltraSonic/1">中水_桶槽</a>
  342. <div class="dropdown-divider"></div>
  343. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_S/UltraSonic/1">色選機__桶槽</a>
  344. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_SO/UltraSonic/1">色選機__出料</a>
  345. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_P/UltraSonic/1">脫皮機__桶槽</a>
  346. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_PO/UltraSonic/1">脫皮機__出料</a>
  347. <div class="dropdown-divider"></div>
  348. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_FI/UltraSonic/1">發酵槽__入料</a>
  349. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_F/UltraSonic/1">發酵槽__桶槽</a>
  350. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_FO/UltraSonic/1">發酵槽__出料</a>
  351. <div class="dropdown-divider"></div>
  352. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_DI/UltraSonic/1">乾燥槽__入料</a>
  353. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_D/UltraSonic/1">乾燥槽__桶槽</a>
  354. <a style="line-height: 40px;" class="dropdown-item" href="/sensor_chart_DO/UltraSonic/1">乾燥槽__出料</a>
  355. </div>
  356. </li>
  357. <li class="nav-item dropdown">
  358. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_chart" data-toggle="dropdown"
  359. aria-haspopup="true" aria-expanded="false">
  360. 致動器圖表
  361. </a>
  362. <div class="dropdown-menu" aria-labelledby="navbarDropdown_chart">
  363. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_CI/vacuum/1">清洗浮選__入料</a>
  364. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_C/vacuum/1">清洗浮選__桶槽</a>
  365. <div class="dropdown-divider"></div>
  366. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_R/vacuum/1">中水_桶槽</a>
  367. <div class="dropdown-divider"></div>
  368. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_S/vacuum/1">色選機__桶槽</a>
  369. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_P/vacuum/1">脫皮機__桶槽</a>
  370. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_PO/vacuum/1">脫皮機__出料</a>
  371. <div class="dropdown-divider"></div>
  372. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_FI/vacuum/1">發酵槽__入料</a>
  373. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_F/vacuum/1">發酵槽__桶槽</a>
  374. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_FO/vacuum/1">發酵槽__出料</a>
  375. <div class="dropdown-divider"></div>
  376. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_DI/vacuum/1">乾燥槽__入料</a>
  377. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_D/vacuum/1">乾燥槽__桶槽</a>
  378. <a style="line-height: 40px;" class="dropdown-item" href="/actuator_chart_DO/vacuum/1">乾燥槽__出料</a>
  379. </div>
  380. </li>
  381. <li class="nav-item dropdown">
  382. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_camera" data-toggle="dropdown"
  383. aria-haspopup="true" aria-expanded="false">
  384. 攝影機畫面
  385. </a>
  386. <div class="dropdown-menu" aria-labelledby="navbarDropdown_camera">
  387. <a style="line-height: 40px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a>
  388. <div class="dropdown-divider"></div>
  389. <a style="line-height: 40px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a>
  390. <div class="dropdown-divider"></div>
  391. <a style="line-height: 40px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a>
  392. </div>
  393. </li>
  394. <li class="nav-item dropdown">
  395. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_pc" data-toggle="dropdown"
  396. aria-haspopup="true" aria-expanded="false">
  397. User
  398. </a>
  399. <div class="dropdown-menu" aria-labelledby="navbarDropdown_user_pc">
  400. {% if status == 0 %}
  401. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:開發人員</a>
  402. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  403. {% elif status == 1 %}
  404. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:經銷商</a>
  405. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  406. {% elif status == 2 %}
  407. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:使用者</a>
  408. {% endif %}
  409. <div class="dropdown-divider"></div>
  410. <a style="line-height: 40px;" class="dropdown-item" href="/logout">帳號登出</a>
  411. </div>
  412. </li>
  413. </ul>
  414. </nav>
  415. <nav class="nav-list-phone">
  416. <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
  417. <span id="coffee_title_phone" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
  418. <!-- <li class="nav-item dropdown">
  419. <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
  420. </li>
  421. <li class="nav-item dropdown">
  422. <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
  423. </li>
  424. <li class="nav-item dropdown">
  425. <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
  426. </li>
  427. <li class="nav-item dropdown">
  428. <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
  429. </li> -->
  430. <li class="nav-item dropdown">
  431. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_phone" data-toggle="dropdown"
  432. aria-haspopup="true" aria-expanded="false">
  433. User
  434. </a>
  435. </li>
  436. </ul>
  437. </nav>
  438. </div>
  439. </header>
  440. </body>
  441. </html>