comparison mrjunejune/src/talk/index.html @ 145:c1eab8c0b0f9

[MrJuneJune] Small improvement UX and tests passes now.
author June Park <parkjune1995@gmail.com>
date Fri, 09 Jan 2026 13:42:35 -0800
parents 276bb3555034
children
comparison
equal deleted inserted replaced
144:043018c0f2f8 145:c1eab8c0b0f9
11 input { flex-grow: 1; } 11 input { flex-grow: 1; }
12 </style> 12 </style>
13 </head> 13 </head>
14 <body> 14 <body>
15 {{/parts/header.html}} 15 {{/parts/header.html}}
16 <h1>Talks</h1> 16 <main>
17 <h1>Talk with strangers xDDD</h1>
17 18
18 <div id="messages"></div> 19 <div id="messages"></div>
19 20
20 <div id="chat"> 21 <div id="chat">
21 <input type="text" id="messageInput" placeholder="Type a message..."> 22 <input type="text" id="messageInput" placeholder="Type a message...">
22 <button id="sendBtn">Send</button> 23 <button id="sendBtn">Send</button>
23 </div> 24 </div>
25 </main>
24 {{/parts/footer.html}} 26 {{/parts/footer.html}}
25 <script> 27 <script>
26 const host = window.location.hostname; 28 const host = window.location.hostname;
27 const port = '6969'; 29 const port = '6969';
28 const url = host === "mrjunejune.com" ? `wss://${host}/echo` : `ws://${host}:${port}/echo`; 30 const url = host === "mrjunejune.com" ? `wss://${host}/echo` : `ws://${host}:${port}/echo`;