Skip to content

Commit bd525d3

Browse files
Update index.html
1 parent 19e49cc commit bd525d3

File tree

1 file changed

+54
-80
lines changed

1 file changed

+54
-80
lines changed

index.html

Lines changed: 54 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,11 @@
4242
});
4343
</script>
4444
<script>
45-
window.addEventListener("message", (event) => {
46-
if (event.data.type === "resize" && event.data.height) {
47-
const iframe = document.getElementById("chat-iframe");
48-
iframe.style.height = event.data.height + "px";
45+
function toggleChatbox() {
46+
const box = document.getElementById("chatbox");
47+
box.style.display = box.style.display === "none" ? "flex" : "none";
4948
}
50-
});
51-
</script>
52-
<script>
53-
function toggleChatbox() {
54-
const box = document.getElementById("chatbox");
55-
box.style.display = box.style.display === "none" ? "flex" : "none";
56-
}
57-
</script>
49+
</script>
5850

5951
<style>
6052
link[rel="icon"] {
@@ -112,61 +104,51 @@
112104
display: inline-block;
113105
}
114106
#chat-launcher {
115-
position: fixed;
116-
bottom: 20px;
117-
right: 20px;
118-
background: #001f3f; /* dark navy */
119-
color: white;
120-
padding: 12px 16px;
121-
border-radius: 30px;
122-
cursor: pointer;
123-
z-index: 1000;
124-
font-family: sans-serif;
125-
box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4); /* soft blue glow */
126-
transition: background 0.3s;
127-
}
128-
129-
#chat-launcher:hover {
130-
background: #003366;
131-
}
132-
133-
#chatbox {
134-
position: fixed;
135-
bottom: 80px;
136-
right: 20px;
137-
width: 360px;
138-
height: 500px;
139-
border: none;
140-
background: white;
141-
display: none;
142-
flex-direction: column;
143-
z-index: 1001;
144-
box-shadow: 0 8px 20px rgba(0,0,0,0.25);
145-
border-radius: 12px;
146-
overflow: hidden;
147-
}
148-
149-
#chatbox-header {
150-
background: #001f3f;
151-
color: white;
152-
padding: 10px 15px;
153-
font-weight: bold;
154-
display: flex;
155-
justify-content: space-between;
156-
align-items: center;
157-
font-family: sans-serif;
158-
}
159-
#chat-launcher:hover {
160-
background: #003366;
161-
box-shadow: 0 0 12px rgba(0, 102, 255, 0.6);
162-
}
107+
position: fixed;
108+
bottom: 20px;
109+
right: 20px;
110+
background: #001f3f;
111+
color: white;
112+
padding: 12px 16px;
113+
border-radius: 30px;
114+
cursor: pointer;
115+
z-index: 1000;
116+
font-family: sans-serif;
117+
box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
118+
transition: background 0.3s;
119+
}
120+
#chat-launcher:hover {
121+
background: #003366;
122+
}
163123
#chatbox {
164-
transition: transform 0.3s ease, opacity 0.3s ease;
165-
}
166-
#chatbox iframe {
167-
height: calc(100% - 48px);
168-
}
169-
124+
position: fixed;
125+
bottom: 80px;
126+
right: 20px;
127+
width: 360px;
128+
height: 500px;
129+
display: none;
130+
flex-direction: column;
131+
background: white;
132+
border-radius: 12px;
133+
box-shadow: 0 8px 20px rgba(0,0,0,0.25);
134+
overflow: hidden;
135+
z-index: 1001;
136+
}
137+
#chatbox-header {
138+
background: #001f3f;
139+
color: white;
140+
padding: 10px 15px;
141+
font-weight: bold;
142+
display: flex;
143+
justify-content: space-between;
144+
align-items: center;
145+
font-family: sans-serif;
146+
}
147+
#chatbox iframe {
148+
height: calc(100% - 48px);
149+
width: 100%;
150+
border: none;
151+
}
170152

171153
</style>
172154
</head>
@@ -229,22 +211,14 @@ <h1>Hariprashad Ravikumar</h1>
229211

230212
</main>
231213

232-
<!-- Floating Chat Button -->
233214
<div id="chat-launcher" onclick="toggleChatbox()">Chat with my AI HariBot</div>
234-
235-
<!-- Chat iframe box (hidden by default) -->
236-
<div id="chatbox">
237-
<div id="chatbox-header">
238-
<span>HariBot AI 🤖</span>
239-
<button onclick="toggleChatbox()"></button>
215+
<div id="chatbox">
216+
<div id="chatbox-header">
217+
<span>HariBot AI 🤖</span>
218+
<button onclick="toggleChatbox()">&times;</button>
219+
</div>
220+
<iframe id="chat-iframe" src="https://hari-chatbot.onrender.com" title="HariBot Assistant"></iframe>
240221
</div>
241-
<iframe id="chat-iframe"
242-
src="https://hari-chatbot.onrender.com"
243-
frameborder="0"
244-
title="HariBot Assistant"
245-
style="width: 100%; border: none;"></iframe>
246-
247-
</div>
248222

249223
<footer>
250224
<p>&copy; 2025 Hariprashad Ravikumar. All rights reserved.</p>

0 commit comments

Comments
 (0)