Chat / index.html
Severian's picture
Update index.html
66ad91e verified
raw
history blame
2.94 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chatbot Embed with AnythingLLM</title>
<!-- CSS Styles -->
<style>
/* Basic reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Body styling */
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header styling */
header {
background-color: #4CAF50;
color: white;
padding: 1rem;
text-align: center;
}
/* Main content styling */
main {
flex: 1;
padding: 2rem;
text-align: center;
}
/* Chatbot widget container */
.chatbot-widget {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 1000;
}
/* Optional: Button to open the chatbot */
.chatbot-button {
background-color: #4CAF50;
color: white;
border: none;
padding: 15px;
border-radius: 50%;
cursor: pointer;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: background-color 0.3s ease;
font-size: 18px;
}
.chatbot-button:hover {
background-color: #45a049;
}
</style>
</head>
<body>
<!-- Header Section -->
<header>
<h1>Welcome to Our Website</h1>
<p>Interact with our chatbot below!</p>
</header>
<!-- Main Content -->
<main>
<h2>About Us</h2>
<p>Here is some information about our services...</p>
<!-- Add more content as needed -->
</main>
<!-- Chatbot Widget Container -->
<div class="chatbot-widget">
<!-- Optional: Chatbot Open Button -->
<button class="chatbot-button" id="open-chatbot">πŸ’¬</button>
</div>
<!-- Chatbot Embed Script -->
<script
data-embed-id="f873bd25-2eb1-4e69-9f13-114ca6585a5b"
data-base-api-url="https://severian-anything.hf.space/api/embed"
src="https://severian-anything.hf.space/embed/anythingllm-chat-widget.min.js">
</script>
<!-- Optional: Script to Toggle Chatbot Visibility -->
<script>
// Wait for the DOM to load
document.addEventListener('DOMContentLoaded', function() {
const chatbotButton = document.getElementById('open-chatbot');
// Assuming the chat widget adds an iframe or a specific element, you may need to adjust the selector
chatbotButton.addEventListener('click', function() {
// Toggle visibility of the chatbot widget
const chatbotIframe = document.querySelector('iframe[src*="anythingllm-chat-widget"]');
if (chatbotIframe) {
if (chatbotIframe.style.display === 'none' || !chatbotIframe.style.display) {
chatbotIframe.style.display = 'block';
} else {
chatbotIframe.style.display = 'none';
}
}
});
});
</script>
</body>
</html>