index.html 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>Websockets Message demo</title>
  7. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" >
  8. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" >
  9. <script src="https://code.jquery.com/jquery-3.4.1.js" ></script>
  10. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" ></script>
  11. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.js"></script>
  12. <script src="serverconfig.js"></script>
  13. <script src="demowebsocket.js"></script>
  14. <link rel="stylesheet" href="style.css">
  15. </head>
  16. <body>
  17. <div class="container-fluid">
  18. <!-- Your Alias dialog -->
  19. <div class="row justify-content-center">
  20. <div class="col-12 col-md-6 col-sm-12 col-xs-12">
  21. <div class="card p-4 p-md-4 my-4 mx-3 mx-md-0 ">
  22. <form onsubmit="event.preventDefault()">
  23. <label for="edtSender"> Your Alias </label>
  24. <div class="input-group">
  25. <input id="edtSender" type="text" class="form-control">
  26. <span class="input-group-btn">
  27. <button id="btnConnect" type="submit" class="btn btn-primary btn-flat">Connect</button>
  28. </span>
  29. </div>
  30. </form>
  31. </div>
  32. </div>
  33. </div>
  34. <!-- end of Your Alias dialog -->
  35. <div class="row justify-content-center">
  36. <div class="col-12 col-md-6 col-sm-12 col-xs-12">
  37. <div class="card main">
  38. <!-- chat messages -->
  39. <div class="px-2 scroll" id="messages">
  40. <!-- messages will be appended here -->
  41. </div>
  42. <!-- end of chat messages -->
  43. <!-- To and Message Inputs -->
  44. <nav class="navbar navbar-expand-sm p-0">
  45. <!-- To Input -->
  46. <div class="input-group" style="width: 40%;">
  47. <div class="input-group-prepend">
  48. <span class="input-group-text">To:</span>
  49. </div>
  50. <input id="edtRecipient" type="text" class="form-control">
  51. </div>
  52. <!-- Message Input and Send button -->
  53. <div class="input-group">
  54. <input id="edtMessage" type="text" name="message" placeholder="Type Message ..." class="form-control">
  55. <span class="input-group-btn">
  56. <button id="btnSend" type="button" class="btn btn-primary btn-flat"><i class="fas fa-paper-plane pr-2"></i>Send</button>
  57. </span>
  58. </div>
  59. </nav>
  60. </div>
  61. </div>
  62. </div>
  63. <!-- end of chat dialog -->
  64. </div>
  65. <script>
  66. rtl.run();
  67. </script>
  68. <div id="pasjsconsole"></div>
  69. </body>
  70. </html>