index2.html 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <!DOCTYPE html>
  2. <html lang="en" >
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>AI ANCHOR GO</title>
  7. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
  8. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp"
  9. crossorigin="anonymous">
  10. <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
  11. <link rel="stylesheet" href="style.css">
  12. <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  13. <style>
  14. body {
  15. font-family: "Lato", sans-serif;
  16. }
  17. .sidenav {
  18. height: 100%;
  19. width: 0;
  20. position: fixed;
  21. z-index: 1;
  22. top: 0;
  23. left: 0;
  24. background-color: #111;
  25. overflow-x: hidden;
  26. transition: 0.5s;
  27. padding-top: 60px;
  28. }
  29. .sidenav a {
  30. padding: 8px 8px 8px 32px;
  31. text-decoration: none;
  32. font-size: 25px;
  33. color: #818181;
  34. display: block;
  35. transition: 0.3s;
  36. }
  37. .sidenav a:hover {
  38. color: #f1f1f1;
  39. }
  40. .sidenav .closebtn {
  41. position: absolute;
  42. top: 0;
  43. right: 25px;
  44. font-size: 36px;
  45. margin-left: 50px;
  46. }
  47. @media screen and (max-height: 450px) {
  48. .sidenav {padding-top: 15px;}
  49. .sidenav a {font-size: 18px;}
  50. }
  51. </style>
  52. </head>
  53. <body>
  54. <div class="container">
  55. <div id="mySidenav" class="sidenav">
  56. <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
  57. <a href="#">About</a>
  58. <a href="#">Services</a>
  59. <a href="#">Clients</a>
  60. <a href="#">Contact</a>
  61. </div>
  62. <form action="/step_questions/submit" method="post" id="msform">
  63. <span style="font-size:30px;cursor:pointer" onclick="openNav()">&#9776; open</span>
  64. <!-- fieldsets -->
  65. <fieldset>
  66. <h2 class="fs-title">AI ANCHOR</h2>
  67. <h3 class="fs-subtitle">標題</h3>
  68. <input type="text" name='t1' class='title_new' value="" placeholder="1" /> <br/>
  69. <h3 class="fs-subtitle">台詞</h3>
  70. <input type="text" name='t1' class='txtsrc1' value="" placeholder="1" /> <br/>
  71. <input type="text" name='t2' class='txtsrc2' value="" placeholder="2" /><br/>
  72. <input type="text" name='t3' class='txtsrc3' value="" placeholder="3" /><br/>
  73. <input type="text" name='t4' class='txtsrc4' value="" placeholder="4" /><br/>
  74. <input type="text" name='t5' class='txtsrc5' value="" placeholder="5" /><br/>
  75. <input type="text" name='t6' class='txtsrc6' value="" placeholder="6" /><br/>
  76. <input type="text" name='t7' class='txtsrc7' value="" placeholder="7" /><br/>
  77. <input type="text" name='t8' class='txtsrc8' value="" placeholder="8" /><br/>
  78. <input type="text" name='t9' class='txtsrc9' value="" placeholder="9" /><br/>
  79. <input type="text" name='t10' class='txtsrc10' value="" placeholder="10" /><br/>
  80. <h3 class="fs-subtitle">影像連結</h3>
  81. <input type="text" name='m1' class='imgsrc1' value="" placeholder="1" /> <br/>
  82. <input type="text" name='m2' class='imgsrc2' value="" placeholder="2" /><br/>
  83. <input type="text" name='m3' class='imgsrc3' value="" placeholder="3" /><br/>
  84. <input type="text" name='m4' class='imgsrc4' value="" placeholder="4" /><br/>
  85. <input type="text" name='m5' class='imgsrc5' value="" placeholder="5" /><br/>
  86. <input type="text" name='m6' class='imgsrc6' value="" placeholder="6" /><br/>
  87. <input type="text" name='m7' class='imgsrc7' value="" placeholder="7" /><br/>
  88. <input type="text" name='m8' class='imgsrc8' value="" placeholder="8" /><br/>
  89. <input type="text" name='m9' class='imgsrc9' value="" placeholder="9" /><br/>
  90. <input type="text" name='m10' class='imgsrc10' value="" placeholder="10" /><br/>
  91. <input id="checker" type="button" name="next" class="next action-button" value="送出" />
  92. <h3 class="fs-subtitle">處理進度</h3>
  93. <div id="myProgress">
  94. <div id="myBar">0%</div>
  95. </fieldset>
  96. </form>
  97. <script>
  98. function openNav() {
  99. document.getElementById("mySidenav").style.width = "250px";
  100. }
  101. function closeNav() {
  102. document.getElementById("mySidenav").style.width = "0";
  103. }
  104. </script>
  105. </div>
  106. <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
  107. <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js'></script>
  108. <script src="script_msg.js"></script>
  109. <style>
  110. #myProgress {
  111. width: 100%;
  112. background-color: #ddd;
  113. }
  114. #myBar {
  115. width: 10%;
  116. height: 30px;
  117. background-color: #04AA6D;
  118. text-align: center;
  119. line-height: 30px;
  120. color: white;
  121. }
  122. </style>
  123. <body>
  124. <ul id='messages'>
  125. </ul>
  126. <script>
  127. var ws = new WebSocket('ws://www.choozmo.com:8888/progress');
  128. ws.onmessage = function(event) {
  129. var elem = document.getElementById("myBar");
  130. elem.style.width = event.data + "%";
  131. elem.innerHTML = event.data + "%";
  132. };
  133. function sendMessage(event) {
  134. var input = document.getElementById("messageText")
  135. ws.send(input.value)
  136. input.value = ''
  137. event.preventDefault()
  138. }
  139. </script>
  140. </div>
  141. </body>
  142. </html>