Created
December 30, 2022 22:21
-
-
Save mlakkadshaw/3802f9061965cf6281f41a6436ff1f90 to your computer and use it in GitHub Desktop.
tailwind.css chat ui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Firebase Chat</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
</head> | |
<body> | |
<script type="module" src="main.js"></script> | |
<div | |
id="joinView" | |
class="bg-gray-100 w-96 items-center mx-auto flex flex-col mt-10 rounded-md p-4 space-y-4" | |
> | |
<h1 class="text-center font-bold">Join Chat</h1> | |
<div class="flex space-x-1"> | |
<input | |
id="usernameInput" | |
type="text" | |
class="bg-white border border-gray-200 rounded-md px-2" | |
placeholder="Enter your name" | |
/> | |
<button | |
id="joinButton" | |
class="bg-indigo-600 px-2 py-1 text-sm text-white rounded-md" | |
> | |
Join | |
</button> | |
</div> | |
</div> | |
<div id="chatsView" class="w-64 h-96 mx-auto flex flex-col mt-10 hidden"> | |
<div class="messages flex-1 bg-gray-100"> | |
<ul id="messageList"> | |
<li> | |
<div class="flex space-x-2 pl-2 pt-2"> | |
<div class="flex flex-col"> | |
<div class="flex items-baseline space-x-2"> | |
<div class="text-sm font-bold">Tommy Lee</div> | |
<div class="text-sm text-gray-400">5:20 pm</div> | |
</div> | |
<div class="text-sm text-gray-500">Hello world</div> | |
</div> | |
</div> | |
</li> | |
<li> | |
<div class="flex space-x-2 pl-2 pt-2"> | |
<div class="flex flex-col"> | |
<div class="flex items-baseline space-x-2"> | |
<div class="text-sm font-bold">Tommy Lee</div> | |
<div class="text-sm text-gray-400">5:21 pm</div> | |
</div> | |
<div class="text-sm text-gray-500">Testing</div> | |
</div> | |
</div> | |
</li> | |
<li> | |
<div class="flex space-x-2 pl-2 pt-2"> | |
<div class="flex flex-col"> | |
<div class="flex items-baseline space-x-2"> | |
<div class="text-sm font-bold">James Bond</div> | |
<div class="text-sm text-gray-400">5:21 pm</div> | |
</div> | |
<div class="text-sm text-gray-500">Good Job</div> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</div> | |
<div class="input h-11 w-full flex border border-slate-200 rounded-md"> | |
<input id="messageInput" type="text" class="outline-none flex-1 px-1" /> | |
<div class="p-1"> | |
<button id="sendButton" class="bg-indigo-600 p-2 rounded-lg"> | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
fill="white" | |
viewBox="0 0 24 24" | |
stroke-width="1.5" | |
stroke="black" | |
class="w-4 h-4" | |
> | |
<path | |
stroke-linecap="round" | |
stroke-linejoin="round" | |
d="M6 12L3.269 3.126A59.768 59.768 0 0121.485 12 59.77 59.77 0 013.27 20.876L5.999 12zm0 0h7.5" | |
/> | |
</svg> | |
</button> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment