-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
34 lines (30 loc) · 1.83 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Web Dev Bot</title>
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js"></script>
</head>
<body class="gradient-bg min-h-screen flex items-center justify-center">
<div class="container mx-auto p-8 bg-white rounded-lg shadow-2xl">
<h1 class="text-4xl font-bold text-center mb-8 text-indigo-600">Web Bot</h1>
<div id="chatWindow" class="chat-container mb-4 p-4 border rounded-lg"></div>
<div class="flex mb-4">
<input type="password" id="apiKeyInput" placeholder="Enter your OpenAI API Key" class="flex-grow p-2 border rounded-l-lg focus:outline-none focus:ring-2 focus:ring-indigo-400">
<button onclick="saveAPIKey()" class="bg-indigo-500 text-white px-4 py-2 rounded-r-lg hover:bg-indigo-600 transition duration-200">Save Key</button>
</div>
<div class="flex mb-4">
<input type="text" id="promptInput" placeholder="Enter your message" class="flex-grow p-2 border rounded-l-lg focus:outline-none focus:ring-2 focus:ring-indigo-400">
<button onclick="sendMessage()" class="bg-indigo-500 text-white px-4 py-2 rounded-r-lg hover:bg-indigo-600 transition duration-200">Send</button>
</div>
<div class="flex justify-between">
<button onclick="downloadChat()" class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 transition duration-200">Download Chat</button>
<button onclick="clearChat()" class="bg-red-500 text-white px-4 py-2 rounded-lg hover:bg-red-600 transition duration-200">Clear Chat</button>
</div>
</div>
<script src="script.js"></script>
</body>
</html>