NihalGazi commited on
Commit
056d2ad
·
verified ·
1 Parent(s): 5ee3e49

Create templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +24 -0
templates/index.html ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html><body>
3
+ {% if not waiting %}
4
+ <h2>Create Profile</h2>
5
+ <form method="post">
6
+ ID: <input name="id" required><br>
7
+ Gender: <select name="gender"><option>Male</option><option>Female</option></select><br>
8
+ Age: <input name="age" type="number" required><br>
9
+ Interests:<br>
10
+ <input type="checkbox" name="interests" value="science"> Science<br>
11
+ <input type="checkbox" name="interests" value="arts"> Arts<br>
12
+ <input type="checkbox" name="interests" value="life"> Life<br>
13
+ <button type="submit">Enter</button>
14
+ </form>
15
+ {% else %}
16
+ <h3>Finding partner...</h3>
17
+ <script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/4.6.1/socket.io.min.js"></script>
18
+ <script>
19
+ const socket = io();
20
+ socket.on('status', data => console.log(data.msg));
21
+ socket.on('matched', data => window.location = '/chat?room='+data.room);
22
+ </script>
23
+ {% endif %}
24
+ </body></html>