kmc.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
  7. <meta name="theme-color" content="#02a30f">
  8. <!-- <script type="application/wasm" src="olm.wasm"></script> -->
  9. <script type="text/javascript" src="olm_legacy.js"></script>
  10. <script type="text/javascript" src="browser-matrix.min.js"></script>
  11. <script type="text/javascript" src="webcrypto.js"></script>
  12. <!-- <script type="text/javascript" src="crypto-attachments.js"></script> -->
  13. </head>
  14. <style>
  15. * {
  16. font-family: "Open Sans";
  17. margin: 0;
  18. /* overflow: hidden; */
  19. border-radius: 0;
  20. }
  21. body {
  22. overflow: hidden;
  23. height: 320px;
  24. width: 240px;
  25. }
  26. html {
  27. font-size: 10px;
  28. }
  29. pre {
  30. white-space: pre-wrap; /* Since CSS 2.1 */
  31. white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  32. white-space: -pre-wrap; /* Opera 4-6 */
  33. white-space: -o-pre-wrap; /* Opera 7 */
  34. word-wrap: break-word; /* Internet Explorer 5.5+ */
  35. }
  36. header#title {
  37. position: fixed;
  38. top: 0;
  39. width: 100%;
  40. flex-shrink: 0;
  41. z-index: 1;
  42. }
  43. header h1 {
  44. line-height: 2.5rem;
  45. background: #02a30f;
  46. color: #fff;
  47. padding: 0 1rem;
  48. overflow: hidden;
  49. text-overflow: ellipsis;
  50. white-space: nowrap;
  51. font-weight: 300
  52. text-align: center;
  53. }
  54. #content {
  55. /* padding-left: 5px; */
  56. /* padding-right: 5px; */
  57. /* overflow: auto; */
  58. /* height: 100%; */
  59. /* margin-bottom: 45px; */
  60. /* margin-top: 25px; */
  61. position: absolute;
  62. top: 25px;
  63. height: 100%;
  64. display: flex;
  65. flex-direction: column;
  66. width: 100%;
  67. }
  68. #room-menu {
  69. padding-left: 5px;
  70. padding-right: 5px;
  71. overflow: auto;
  72. height: 100%;
  73. margin-bottom: 45px;
  74. }
  75. #menu {
  76. padding-left: 5px;
  77. padding-right: 5px;
  78. overflow: auto;
  79. height: 100%;
  80. margin-bottom: 45px;
  81. display: none;
  82. }
  83. #chat {
  84. overflow: auto;
  85. height: 100%;
  86. /* margin-bottom: 60px; */
  87. display: none;
  88. flex-direction: column;
  89. position: fixed;
  90. top: 25px;
  91. width: 100%;
  92. }
  93. #chat-textbox {
  94. position: fixed;
  95. bottom: 25px;
  96. width: 100%;
  97. }
  98. .active {
  99. background-color: lightgray;
  100. }
  101. #navigator {
  102. bottom: 0;
  103. left: 0;
  104. right: 0;
  105. position: fixed;
  106. font-weight: bold;
  107. background: #ddd;
  108. line-height: 2rem;
  109. font-size: 15px;
  110. display: flex;
  111. justify-content: space-between;
  112. flex-shrink: 0;
  113. padding-right: 5px;
  114. padding-left: 5px;
  115. align-items: center;
  116. height: 25px;
  117. }
  118. #navigator span{
  119. display: inline-block;
  120. }
  121. #left {
  122. text-align: left;
  123. /* float: left; */
  124. min-width: 33.333%;
  125. /* margin-left: 5px; */
  126. }
  127. #right {
  128. text-align: right;
  129. /* float: right */
  130. min-width: 33.333%;
  131. /* margin-right: 5px; */
  132. }
  133. #middle {
  134. min-width: 33.333%;
  135. text-align: center;
  136. }
  137. #conversation {
  138. display: flex;
  139. flex-direction: column;
  140. overflow: scroll;
  141. height: 100%;
  142. /* margin-bottom: 56px; */
  143. /* margin-top: 25px; */
  144. flex: 0 1 auto;
  145. }
  146. #conversation-buffer {
  147. flex: 0 0 82px;
  148. }
  149. .msgItem {
  150. /* width: 100%; */
  151. margin-bottom: 5px;
  152. display: flex;
  153. flex-direction: column;
  154. padding-top: 5px;
  155. }
  156. .msgItem-selected {
  157. background-color: lightgray;
  158. }
  159. .msgInnerItem {
  160. max-width: 75%;
  161. overflow-wrap: break-word;
  162. padding: 5px 10px 5px 10px;
  163. border-radius: 5px;
  164. border: 1px black solid;
  165. position: relative;
  166. }
  167. .msgItem pre {
  168. margin: unset;
  169. font-size: 16px;
  170. }
  171. #login {
  172. display: none;
  173. }
  174. .roomItem {
  175. font-size: 14px;
  176. padding: 5px;
  177. }
  178. .menuItem {
  179. font-size: 14px;
  180. padding: 5px;
  181. }
  182. .typing {
  183. margin: 5px;
  184. width: 90%;
  185. text-align: center;
  186. }
  187. .editing {
  188. padding: 5px;
  189. position: fixed;
  190. left: 0px;
  191. bottom: 55px;
  192. display: none;
  193. background-color: orange;
  194. border-radius: 5px;
  195. }
  196. .replying {
  197. padding: 5px;
  198. position: fixed;
  199. right: 0px;
  200. bottom: 55px;
  201. display: none;
  202. background-color: orange;
  203. border-radius: 5px;
  204. }
  205. .reactions {
  206. display: flex;
  207. align-items: center;
  208. }
  209. blockquote {
  210. border-left: 1px solid black;
  211. padding-left: 5px;
  212. }
  213. .play-button-container {
  214. position: absolute;
  215. height: calc(100% - 10px);
  216. width: calc(100% - 20px);
  217. display: flex;
  218. justify-content: center;
  219. align-items: center;
  220. }
  221. .play-button {
  222. display: flex;
  223. justify-content: center;
  224. align-items: center;
  225. width: 30px;
  226. height: 30px;
  227. background-color: #0000007a;
  228. color: white;
  229. border-radius: 15px;
  230. }
  231. </style>
  232. <script type="text/javascript" src="kmc.js"></script>
  233. <body>
  234. <header id="title">
  235. <h1 id="title-text"></h1>
  236. </header>
  237. <div id="content">
  238. <div id="navigator">
  239. <span id="left"></span>
  240. <span id="middle"></span>
  241. <span id="right"></span>
  242. </div>
  243. <div id="login">
  244. <label for="fname">Home Server:</label>
  245. <br>
  246. <input
  247. type="text"
  248. id="homeserver"
  249. class="login-text"
  250. value=""
  251. placeholder="https://matrix.org"
  252. />
  253. <br>
  254. <label for="fname">User:</label>
  255. <br>
  256. <input
  257. type="text"
  258. id="user"
  259. class="login-text"
  260. placeholder="@username:matrix.org"
  261. />
  262. <br>
  263. <label for="lname">Password:</label>
  264. <br>
  265. <input
  266. type="password"
  267. id="password"
  268. class="login-text"
  269. />
  270. </div>
  271. <div id="room-menu"></div>
  272. <div id="menu"></div>
  273. <div id="chat">
  274. <div id="conversation"></div>
  275. <div id="conversation-buffer"></div>
  276. <div id="editing" class="editing">Editing...</div>
  277. <div id="replying" class="replying">Replying...</div>
  278. <div id="uploading" class="replying"></div>
  279. <textarea id="chat-textbox" autofocus="true" rows="1" type="text" placeholder="Message"/>
  280. </div>
  281. </div>
  282. </body>
  283. </html>