index.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Document</title>
  8. <script src="main.js" defer></script>
  9. <style>
  10. body {
  11. margin: 0;
  12. padding: 0;
  13. color: #fff;
  14. background-color: #000;
  15. font-family: Verdana, Geneva, Tahoma, sans-serif
  16. }
  17. input {
  18. margin: 5px;
  19. width: 100%;
  20. box-sizing: border-box;
  21. padding: 5px 10px;
  22. }
  23. button {
  24. padding: 10px 25px;
  25. font-weight: bold;
  26. font-family: inherit;
  27. margin: 10px 5px 5px;
  28. background-color: #222;
  29. color: inherit;
  30. width: 100%;
  31. cursor: pointer;
  32. }
  33. .wrapper {
  34. min-height: 100vh;
  35. max-height: 100vh;
  36. display: flex;
  37. flex-direction: column;
  38. }
  39. .messages-area {
  40. overflow-x: hidden;
  41. display: flex;
  42. flex-direction: column-reverse;
  43. align-items: flex-start;
  44. flex-grow: 2;
  45. padding: 15px;
  46. }
  47. .inputs-area {
  48. background-color: #333;
  49. display: flex;
  50. padding: 10px;
  51. align-items: center;
  52. }
  53. .inputs-container {
  54. display: flex;
  55. flex-direction: column;
  56. margin-right: 65px;
  57. }
  58. .add {
  59. font-weight: bold;
  60. font-size: 45px;
  61. text-shadow: 2px -2px 0 rgb(243, 165, 63)
  62. }
  63. .message {
  64. display: flex;
  65. flex-direction: column;
  66. margin-bottom: 10px;
  67. padding: 7px;
  68. background-color: #767676;
  69. border-radius: 5px;
  70. max-width: 50%;
  71. }
  72. .message .nickname {
  73. font-weight: bold;
  74. margin-bottom: 3px;
  75. }
  76. .message .message-text {
  77. margin-bottom: 5px;
  78. }
  79. .message .time {
  80. font-size: 0.8em;
  81. opacity: 0.6;
  82. }
  83. </style>
  84. </head>
  85. <body>
  86. <div class="wrapper">
  87. <div class="inputs-area">
  88. <div class="inputs-container">
  89. <label>
  90. Nickname:
  91. <input id="nickname" type="text">
  92. </label>
  93. <label>
  94. Message:
  95. <input id="messageText" type="text">
  96. </label>
  97. <button id="send">SEND</button>
  98. </div>
  99. <div class='add'>ЗДЕСЬ МОГЛА БЫТЬ ВАША РЕКЛАМА</div>
  100. </div>
  101. <div style="overflow-y: auto">
  102. <div class="messages-area" id="messagesArea"></div>
  103. </div>
  104. <template id="messageTemplate">
  105. <div class="message">
  106. <span class="nickname"></span>
  107. <span class="message-text"></span>
  108. <span class="time"></span>
  109. </div>
  110. </template>
  111. </div>
  112. </body>
  113. </html>