Advertisement
IsakViste

L1: chat.html

May 17th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.81 KB | None | 0 0
  1. <!doctype html>
  2.  
  3. <html lang="en">
  4. <head>
  5.     <meta charset="utf-8">
  6.  
  7.     <title>Chatroom</title>
  8.     <meta name="description" content="Messages">
  9.     <meta name="author" content="Isak et Nicolas">
  10.  
  11.   <style>
  12.     html, body {
  13.         overflow: hidden;
  14.         height: 100%;
  15.     }
  16.  
  17.     body {
  18.         background: url("static/images/BG.jpg") center center fixed;
  19.     }
  20.  
  21.     form {
  22.         background-color: white;
  23.         margin-top: 8%;
  24.         margin-left: 10%;
  25.         margin-right: 10%;
  26.     }
  27.  
  28.     #message-box {
  29.  
  30.  
  31.     }
  32.  
  33.     #chat-box {
  34.         margin-left: 10%;
  35.         margin-right: 10%;
  36.         background-color: white;
  37.     }
  38.  
  39.   #chat {
  40.     margin-top: 15px;
  41.     padding: 5px;
  42.         height: 500px;
  43.         overflow-y: scroll;
  44.   }
  45.  
  46.   .message {
  47.     padding: 0px 20px 10px 5px;
  48. B  }
  49.  
  50.   .date {
  51.     font-size: 12px;
  52.     color: grey;
  53.   }
  54.  
  55.   .username {
  56.     font-size: 16px;
  57.     font-weight: bold;
  58.   }
  59.  
  60.   .content::before {
  61.         font-weight: bold;
  62.     content: " : ";
  63.   }
  64.  
  65.   .content {
  66.     font-size: 16px;
  67.     color: black;
  68.   }
  69.  
  70.     input {
  71.         display: inline-block;
  72.     }
  73.   </style>
  74.  
  75. </head>
  76.  
  77. <body>
  78.     <form action="" method="post">
  79.         <fieldset>
  80.             <legend>Send Message</legend>
  81.             <textarea name="message" cols="80" rows="4" maxlength="200" style="font-size: 15px; resize: none;"></textarea>
  82.             <br /> <br />
  83.             <input type="submit" name="button" value="Submit" style="float: left" />
  84.             <input type="submit" name="button" value="Logout" style="float: right" />
  85.         </fieldset>
  86.     </form>
  87.  
  88.     <div id="chat-box">
  89.       <fieldset id="chat">
  90.         <legend>Chat</legend>
  91.             {% for message in chat %}
  92.       <div class="message">
  93.         <span class="date">[{{ message[0] }}]</span>
  94.         <span class="username" style="color: #{{ message[1] }};">{{ message[2] }}</span>
  95.         <span class="content">{{ message[3] }}</span>
  96.             </div>
  97.             {% endfor %}
  98.       </fieldset>
  99.     </div>
  100. </body>
  101. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement