header.html 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  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_loader">板子燒錄</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="#">清洗浮選__桶槽</a>
  339. <a style="line-height: 40px;" class="dropdown-item" href="#">清洗浮選__出料</a>
  340. <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__桶槽</a>
  341. <a style="line-height: 40px;" class="dropdown-item" href="#">色選機__出料</a>
  342. <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__桶槽</a>
  343. <a style="line-height: 40px;" class="dropdown-item" href="#">脫皮機__出料</a>
  344. <div class="dropdown-divider"></div>
  345. <a style="line-height: 40px;" class="dropdown-item"
  346. href="/chart_FI/UltraSonic/1">發酵槽__入料</a>
  347. <a style="line-height: 40px;" class="dropdown-item" href="/chart_F/UltraSonic/1">發酵槽__桶槽</a>
  348. <a style="line-height: 40px;" class="dropdown-item"
  349. href="/chart_FO/UltraSonic/1">發酵槽__出料</a>
  350. <div class="dropdown-divider"></div>
  351. <a style="line-height: 40px;" class="dropdown-item"
  352. href="/chart_DI/UltraSonic/1">乾燥槽__入料</a>
  353. <a style="line-height: 40px;" class="dropdown-item" href="/chart_D/UltraSonic/1">乾燥槽__桶槽</a>
  354. <a style="line-height: 40px;" class="dropdown-item"
  355. href="/chart_DO/UltraSonic/1">乾燥槽__出料</a>
  356. </div>
  357. </li>
  358. <li class="nav-item dropdown">
  359. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_camera" data-toggle="dropdown"
  360. aria-haspopup="true" aria-expanded="false">
  361. 攝影機畫面
  362. </a>
  363. <div class="dropdown-menu" aria-labelledby="navbarDropdown_camera">
  364. <a style="line-height: 40px;" class="dropdown-item" href="/camera_clean">清洗貨櫃</a>
  365. <div class="dropdown-divider"></div>
  366. <a style="line-height: 40px;" class="dropdown-item" href="/camera_ferment">發酵貨櫃</a>
  367. <div class="dropdown-divider"></div>
  368. <a style="line-height: 40px;" class="dropdown-item" href="/camera_dry">乾燥貨櫃</a>
  369. </div>
  370. </li>
  371. <li class="nav-item dropdown">
  372. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_pc" data-toggle="dropdown"
  373. aria-haspopup="true" aria-expanded="false">
  374. User
  375. </a>
  376. <div class="dropdown-menu" aria-labelledby="navbarDropdown_user_pc">
  377. {% if status == 0 %}
  378. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:開發人員</a>
  379. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  380. {% elif status == 1 %}
  381. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:經銷商</a>
  382. <a style="line-height: 40px;" class="dropdown-item" href="#">修改使用者權限</a>
  383. {% elif status == 2 %}
  384. <a style="line-height: 40px;" class="dropdown-item" href="#">權限:使用者</a>
  385. {% endif %}
  386. <div class="dropdown-divider"></div>
  387. <a style="line-height: 40px;" class="dropdown-item" href="/logout">帳號登出</a>
  388. </div>
  389. </li>
  390. </ul>
  391. </nav>
  392. <nav class="nav-list-phone">
  393. <ul class="main-menu navbar-right mr-auto" style="display: flex; margin-bottom: 0px;">
  394. <span id="coffee_title_phone" style="line-height: 60px; padding: 0px 15px; font-size: 18px;">( 網頁標題 )</span>
  395. <!-- <li class="nav-item dropdown">
  396. <a style="line-height: 40px;" class="dropdown-item" href="/demo">DEMO 貨櫃</a>
  397. </li>
  398. <li class="nav-item dropdown">
  399. <a style="line-height: 40px;" class="dropdown-item" href="/clean">清洗貨櫃</a>
  400. </li>
  401. <li class="nav-item dropdown">
  402. <a style="line-height: 40px;" class="dropdown-item" href="/ferment">發酵貨櫃</a>
  403. </li>
  404. <li class="nav-item dropdown">
  405. <a style="line-height: 40px;" class="dropdown-item" href="/dry">乾燥貨櫃</a>
  406. </li> -->
  407. <li class="nav-item dropdown">
  408. <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown_user_phone" data-toggle="dropdown"
  409. aria-haspopup="true" aria-expanded="false">
  410. User
  411. </a>
  412. </li>
  413. </ul>
  414. </nav>
  415. </div>
  416. </header>
  417. </body>
  418. </html>