Spaces:
Running
Running
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>ErikGPT - Your Intelligent AI Assistant</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<style> | |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap'); | |
body { | |
font-family: 'Poppins', sans-serif; | |
background-color: #f5f7fa; | |
transition: all 0.3s ease; | |
} | |
.gradient-bg { | |
background: linear-gradient(135deg, #6e8efb, #a777e3); | |
} | |
.chat-bubble { | |
border-radius: 20px; | |
position: relative; | |
max-width: 80%; | |
} | |
.user-bubble { | |
background-color: #6e8efb; | |
color: white; | |
align-self: flex-end; | |
} | |
.ai-bubble { | |
background-color: #f1f1f1; | |
color: #333; | |
align-self: flex-start; | |
} | |
.typing-indicator { | |
display: inline-flex; | |
} | |
.typing-dot { | |
width: 8px; | |
height: 8px; | |
border-radius: 50%; | |
background-color: #888; | |
margin: 0 2px; | |
animation: typing 1.4s infinite ease-in-out; | |
} | |
.typing-dot:nth-child(1) { | |
animation-delay: 0s; | |
} | |
.typing-dot:nth-child(2) { | |
animation-delay: 0.2s; | |
} | |
.typing-dot:nth-child(3) { | |
animation-delay: 0.4s; | |
} | |
@keyframes typing { | |
0%, | |
60%, | |
100% { | |
transform: translateY(0); | |
} | |
30% { | |
transform: translateY(-5px); | |
} | |
} | |
.feature-card:hover { | |
transform: translateY(-5px); | |
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); | |
} | |
.access-level { | |
transition: all 0.3s ease; | |
} | |
.access-level:hover { | |
transform: scale(1.05); | |
} | |
.pulse { | |
animation: pulse 2s infinite; | |
} | |
@keyframes pulse { | |
0% { | |
box-shadow: 0 0 0 0 rgba(167, 119, 227, 0.7); | |
} | |
70% { | |
box-shadow: 0 0 0 10px rgba(167, 119, 227, 0); | |
} | |
100% { | |
box-shadow: 0 0 0 0 rgba(167, 119, 227, 0); | |
} | |
} | |
</style> | |
</head> | |
<body class="min-h-screen flex flex-col"> | |
<!-- Header with Navigation --> | |
<header class="gradient-bg text-white shadow-lg"> | |
<div class="container mx-auto px-4 py-3 flex justify-between items-center"> | |
<div class="flex items-center space-x-2"> | |
<i class="fas fa-robot text-2xl"></i> | |
<h1 class="text-2xl font-bold">ErikGPT</h1> | |
</div> | |
<nav class="hidden md:flex space-x-6"> | |
<a href="#features" class="hover:text-gray-200 transition">Features</a> | |
<a href="#access" class="hover:text-gray-200 transition">Access Levels</a> | |
<a href="#chat" class="hover:text-gray-200 transition">Try It</a> | |
<a href="#about" class="hover:text-gray-200 transition">About</a> | |
</nav> | |
<div class="flex items-center space-x-4"> | |
<button id="theme-toggle" class="p-2 rounded-full hover:bg-white hover:bg-opacity-20 transition"> | |
<i class="fas fa-moon"></i> | |
</button> | |
<button class="bg-white text-purple-600 px-4 py-2 rounded-full font-medium hover:bg-opacity-90 transition"> | |
Sign In | |
</button> | |
</div> | |
<button id="mobile-menu-button" class="md:hidden p-2"> | |
<i class="fas fa-bars text-xl"></i> | |
</button> | |
</div> | |
<!-- Mobile Menu --> | |
<div id="mobile-menu" class="hidden md:hidden bg-purple-700 px-4 py-2"> | |
<div class="flex flex-col space-y-3"> | |
<a href="#features" class="hover:text-gray-200 transition">Features</a> | |
<a href="#access" class="hover:text-gray-200 transition">Access Levels</a> | |
<a href="#chat" class="hover:text-gray-200 transition">Try It</a> | |
<a href="#about" class="hover:text-gray-200 transition">About</a> | |
</div> | |
</div> | |
</header> | |
<!-- Hero Section --> | |
<section class="gradient-bg text-white py-16"> | |
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center"> | |
<div class="md:w-1/2 mb-10 md:mb-0"> | |
<h2 class="text-4xl md:text-5xl font-bold mb-4">Meet ErikGPT</h2> | |
<p class="text-xl mb-6">Your next-generation AI assistant with multi-level access, personalized | |
responses, and unique capabilities.</p> | |
<div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4"> | |
<button class="bg-white text-purple-600 px-6 py-3 rounded-full font-medium hover:bg-opacity-90 transition flex items-center justify-center"> | |
<i class="fas fa-play mr-2"></i> Watch Demo | |
</button> | |
<button class="border-2 border-white text-white px-6 py-3 rounded-full font-medium hover:bg-white hover:bg-opacity-20 transition flex items-center justify-center"> | |
<i class="fas fa-rocket mr-2"></i> Get Started | |
</button> | |
</div> | |
</div> | |
<div class="md:w-1/2 flex justify-center"> | |
<div class="relative"> | |
<div | |
class="w-64 h-64 md:w-80 md:h-80 bg-white bg-opacity-20 rounded-full flex items-center justify-center pulse"> | |
<i class="fas fa-robot text-6xl md:text-8xl"></i> | |
</div> | |
<div | |
class="absolute -bottom-5 -left-5 w-24 h-24 bg-yellow-400 rounded-full flex items-center justify-center shadow-lg"> | |
<i class="fas fa-bolt text-3xl text-purple-700"></i> | |
</div> | |
<div | |
class="absolute -top-5 -right-5 w-20 h-20 bg-green-400 rounded-full flex items-center justify-center shadow-lg"> | |
<i class="fas fa-lock-open text-2xl text-purple-700"></i> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Features Section --> | |
<section id="features" class="py-16 bg-white"> | |
<div class="container mx-auto px-4"> | |
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Unique Features</h2> | |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"> | |
<!-- Feature 1 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-purple-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-user-shield text-purple-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Multi-Level Access</h3> | |
<p class="text-gray-600">Different access levels for different users with customizable permissions | |
and capabilities.</p> | |
</div> | |
<!-- Feature 2 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-blue-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-brain text-blue-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Context Memory</h3> | |
<p class="text-gray-600">ErikGPT remembers your previous conversations and builds context over time. | |
</p> | |
</div> | |
<!-- Feature 3 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-green-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-code text-green-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Code Generation</h3> | |
<p class="text-gray-600">Generate, debug, and explain code in multiple programming languages with | |
examples.</p> | |
</div> | |
<!-- Feature 4 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-yellow-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-chart-line text-yellow-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Data Analysis</h3> | |
<p class="text-gray-600">Upload datasets and get insights, visualizations, and statistical analysis | |
automatically.</p> | |
</div> | |
<!-- Feature 5 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-red-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-language text-red-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Multi-Lingual</h3> | |
<p class="text-gray-600">Communicate in over 50 languages with accurate translations and cultural | |
context.</p> | |
</div> | |
<!-- Feature 6 --> | |
<div class="feature-card bg-gray-50 p-6 rounded-xl shadow-md hover:shadow-lg transition cursor-pointer"> | |
<div class="w-14 h-14 bg-indigo-100 rounded-full flex items-center justify-center mb-4"> | |
<i class="fas fa-magic text-indigo-600 text-2xl"></i> | |
</div> | |
<h3 class="text-xl font-semibold mb-2 text-gray-800">Creative Mode</h3> | |
<p class="text-gray-600">Generate stories, poems, lyrics, and creative content with adjustable | |
creativity levels.</p> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Access Levels Section --> | |
<section id="access" class="py-16 bg-gray-50"> | |
<div class="container mx-auto px-4"> | |
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Access Levels</h2> | |
<div class="grid grid-cols-1 md:grid-cols-3 gap-8"> | |
<!-- Free Tier --> | |
<div class="access-level bg-white p-8 rounded-xl shadow-md text-center border-t-4 border-blue-500"> | |
<h3 class="text-2xl font-bold mb-4 text-gray-800">Free Tier</h3> | |
<div class="text-4xl font-bold mb-6 text-blue-600"> | |
$0<span class="text-lg font-normal text-gray-500">/month</span></div> | |
<ul class="space-y-3 mb-8 text-left"> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Basic chat | |
functionality</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> 20 messages per | |
day</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Standard response | |
speed</li> | |
<li class="flex items-center"><i class="fas fa-times text-red-500 mr-2"></i> No code generation | |
</li> | |
<li class="flex items-center"><i class="fas fa-times text-red-500 mr-2"></i> No data analysis | |
</li> | |
</ul> | |
<button class="w-full bg-blue-500 hover:bg-blue-600 text-white py-3 rounded-lg font-medium transition"> | |
Start Free | |
</button> | |
</div> | |
<!-- Pro Tier --> | |
<div | |
class="access-level bg-white p-8 rounded-xl shadow-lg text-center border-t-4 border-purple-500 transform scale-105"> | |
<div | |
class="absolute top-0 right-0 bg-purple-500 text-white text-xs font-bold px-3 py-1 rounded-bl-lg rounded-tr-lg"> | |
POPULAR</div> | |
<h3 class="text-2xl font-bold mb-4 text-gray-800">Pro Tier</h3> | |
<div class="text-4xl font-bold mb-6 text-purple-600"> | |
$20<span class="text-lg font-normal text-gray-500">/month</span></div> | |
<ul class="space-y-3 mb-8 text-left"> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Unlimited | |
messages</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Faster response | |
speed</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Code generation | |
</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Basic data | |
analysis</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Context memory | |
</li> | |
</ul> | |
<button class="w-full gradient-bg hover:opacity-90 text-white py-3 rounded-lg font-medium transition"> | |
Upgrade Now | |
</button> | |
</div> | |
<!-- Enterprise Tier --> | |
<div class="access-level bg-white p-8 rounded-xl shadow-md text-center border-t-4 border-green-500"> | |
<h3 class="text-2xl font-bold mb-4 text-gray-800">Enterprise</h3> | |
<div class="text-4xl font-bold mb-6 text-green-600">Custom</div> | |
<ul class="space-y-3 mb-8 text-left"> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> All Pro features | |
</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Advanced data | |
analysis</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> API access</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Custom model | |
training</li> | |
<li class="flex items-center"><i class="fas fa-check text-green-500 mr-2"></i> Dedicated support | |
</li> | |
</ul> | |
<button class="w-full bg-green-500 hover:bg-green-600 text-white py-3 rounded-lg font-medium transition"> | |
Contact Sales | |
</button> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Chat Demo Section --> | |
<section id="chat" class="py-16 bg-white"> | |
<div class="container mx-auto px-4"> | |
<h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Try ErikGPT</h2> | |
<div class="max-w-4xl mx-auto bg-gray-50 rounded-xl shadow-md overflow-hidden"> | |
<div class="p-4 bg-gray-100 border-b flex justify-between items-center"> | |
<div class="flex items-center space-x-2"> | |
<div class="w-3 h-3 rounded-full bg-red-500"></div> | |
<div class="w-3 h-3 rounded-full bg-yellow-500"></div> | |
<div class="w-3 h-3 rounded-full bg-green-500"></div> | |
</div> | |
<div class="text-sm font-medium text-gray-600">ErikGPT Demo</div> | |
<div class="flex space-x-2"> | |
<button class="p-1 rounded hover:bg-gray-200"> | |
<i class="fas fa-cog text-gray-500"></i> | |
</button> | |
<button class="p-1 rounded hover:bg-gray-200"> | |
<i class="fas fa-ellipsis-h text-gray-500"></i> | |
</button> | |
</div> | |
</div> | |
<div id="chat-container" class="h-96 overflow-y-auto p-4 space-y-4 flex flex-col"> | |
<!-- AI Welcome Message --> | |
<div class="chat-bubble ai-bubble p-4"> | |
<div class="flex items-center mb-2"> | |
<div | |
class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white mr-2"> | |
<i class="fas fa-robot"></i> | |
</div> | |
<span class="font-medium">ErikGPT</span> | |
</div> | |
<p>Hello! I'm ErikGPT, your AI assistant. How can I help you today? Here are some things I can | |
do:</p> | |
<div class="mt-3 grid grid-cols-2 gap-2"> | |
<button class="suggestion-btn bg-purple-100 hover:bg-purple-200 text-purple-700 px-3 py-2 rounded-lg text-sm transition"> | |
Explain quantum computing | |
</button> | |
<button class="suggestion-btn bg-purple-100 hover:bg-purple-200 text-purple-700 px-3 py-2 rounded-lg text-sm transition"> | |
Write a poem about AI | |
</button> | |
<button class="suggestion-btn bg-purple-100 hover:bg-purple-200 text-purple-700 px-3 py-2 rounded-lg text-sm transition"> | |
Generate Python code | |
</button> | |
<button class="suggestion-btn bg-purple-100 hover:bg-purple-200 text-purple-700 px-3 py-2 rounded-lg text-sm transition"> | |
Help with math homework | |
</button> | |
</div> | |
</div> | |
</div> | |
<div class="p-4 border-t bg-white"> | |
<div class="flex items-center"> | |
<input id="user-input" type="text" placeholder="Message ErikGPT..." class="flex-1 border border-gray-300 rounded-l-lg px-4 py-3 focus:outline-none focus:ring-2 focus:ring-purple-500"> | |
<button id="send-btn" class="bg-purple-600 hover:bg-purple-700 text-white px-6 py-3 rounded-r-lg transition"> | |
<i class="fas fa-paper-plane"></i> | |
</button> | |
</div> | |
<div class="mt-2 flex justify-between text-xs text-gray-500"> | |
<div> | |
<button class="hover:text-purple-600 transition mr-3"> | |
<i class="fas fa-microphone mr-1"></i> Voice | |
</button> | |
<button class="hover:text-purple-600 transition"> | |
<i class="fas fa-image mr-1"></i> Image | |
</button> | |
</div> | |
<div> | |
<button class="hover:text-purple-600 transition"> | |
<i class="fas fa-magic mr-1"></i> Creative Mode | |
</button> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- About Section --> | |
<section id="about" class="py-16 bg-gray-50"> | |
<div class="container mx-auto px-4"> | |
<div class="flex flex-col md:flex-row items-center"> | |
<div class="md:w-1/2 mb-10 md:mb-0"> | |
<h2 class="text-3xl font-bold mb-6 text-gray-800">About ErikGPT</h2> | |
<p class="text-gray-600 mb-4"> | |
ErikGPT is a next-generation AI assistant designed to provide intelligent, context-aware | |
responses across a wide range of topics and tasks. | |
Unlike standard chatbots, ErikGPT offers multi-level access controls, allowing different users | |
to access different capabilities based on their needs. | |
</p> | |
<p class="text-gray-600 mb-6"> | |
Our mission is to make AI assistance more accessible, customizable, and powerful for everyone - | |
from students to enterprise teams. | |
</p> | |
<div class="flex space-x-4"> | |
<button class="flex items-center space-x-2 bg-gray-800 hover:bg-gray-700 text-white px-4 py-2 rounded-lg transition"> | |
<i class="fab fa-github"></i> | |
<span>GitHub</span> | |
</button> | |
<button class="flex items-center space-x-2 bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition"> | |
<i class="fab fa-twitter"></i> | |
<span>Twitter</span> | |
</button> | |
</div> | |
</div> | |
<div class="md:w-1/2 flex justify-center"> | |
<div class="relative"> | |
<div | |
class="w-64 h-64 md:w-80 md:h-80 bg-purple-100 rounded-2xl flex items-center justify-center shadow-lg"> | |
<i class="fas fa-question-circle text-purple-500 text-6xl md:text-8xl"></i> | |
</div> | |
<div | |
class="absolute -bottom-5 -left-5 w-20 h-20 bg-white rounded-full flex items-center justify-center shadow-lg"> | |
<i class="fas fa-code-branch text-purple-600 text-2xl"></i> | |
</div> | |
<div | |
class="absolute -top-5 -right-5 w-16 h-16 bg-white rounded-full flex items-center justify-center shadow-lg"> | |
<i class="fas fa-heart text-red-500 text-xl"></i> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</section> | |
<!-- Footer --> | |
<footer class="bg-gray-800 text-white py-12"> | |
<div class="container mx-auto px-4"> | |
<div class="grid grid-cols-1 md:grid-cols-4 gap-8"> | |
<div> | |
<h3 class="text-xl font-bold mb-4 flex items-center"> | |
<i class="fas fa-robot mr-2"></i> ErikGPT | |
</h3> | |
<p class="text-gray-400"> | |
Your intelligent AI assistant for work, creativity, and learning. | |
</p> | |
</div> | |
<div> | |
<h4 class="font-semibold mb-4">Product</h4> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Pricing</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">API</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Integrations</a></li> | |
</ul> | |
</div> | |
<div> | |
<h4 class="font-semibold mb-4">Resources</h4> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Documentation</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Blog</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Community</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Status</a></li> | |
</ul> | |
</div> | |
<div> | |
<h4 class="font-semibold mb-4">Company</h4> | |
<ul class="space-y-2"> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">About</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Careers</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Privacy</a></li> | |
<li><a href="#" class="text-gray-400 hover:text-white transition">Terms</a></li> | |
</ul> | |
</div> | |
</div> | |
<div class="border-t border-gray-700 mt-10 pt-6 flex flex-col md:flex-row justify-between items-center"> | |
<p class="text-gray-400 mb-4 md:mb-0">© 2023 ErikGPT. All rights reserved.</p> | |
<div class="flex space-x-6"> | |
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-facebook-f"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-twitter"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-linkedin-in"></i></a> | |
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-github"></i></a> | |
</div> | |
</div> | |
</div> | |
</footer> | |
<script> | |
// Mobile menu toggle | |
document.getElementById('mobile-menu-button').addEventListener('click', function() { | |
const menu = document.getElementById('mobile-menu'); | |
menu.classList.toggle('hidden'); | |
}); | |
// Theme toggle | |
document.getElementById('theme-toggle').addEventListener('click', function() { | |
document.body.classList.toggle('bg-gray-900'); | |
document.body.classList.toggle('text-white'); | |
// Change icon | |
const icon = this.querySelector('i'); | |
if (icon.classList.contains('fa-moon')) { | |
icon.classList.remove('fa-moon'); | |
icon.classList.add('fa-sun'); | |
} else { | |
icon.classList.remove('fa-sun'); | |
icon.classList.add('fa-moon'); | |
} | |
}); | |
// Chat functionality | |
const chatContainer = document.getElementById('chat-container'); | |
const userInput = document.getElementById('user-input'); | |
const sendBtn = document.getElementById('send-btn'); | |
const suggestionBtns = document.querySelectorAll('.suggestion-btn'); | |
function addUserMessage(message) { | |
const bubble = document.createElement('div'); | |
bubble.className = 'chat-bubble user-bubble p-4'; | |
bubble.innerHTML = ` | |
<div class="flex items-center mb-2"> | |
<div class="w-8 h-8 rounded-full bg-blue-500 flex items-center justify-center text-white mr-2"> | |
<i class="fas fa-user"></i> | |
</div> | |
<span class="font-medium">You</span> | |
</div> | |
<p>${message}</p> | |
`; | |
chatContainer.appendChild(bubble); | |
userInput.value = ''; | |
// Show typing indicator | |
const typingIndicator = document.createElement('div'); | |
typingIndicator.className = 'chat-bubble ai-bubble p-4'; | |
typingIndicator.innerHTML = ` | |
<div class="flex items-center mb-2"> | |
<div class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white mr-2"> | |
<i class="fas fa-robot"></i> | |
</div> | |
<span class="font-medium">ErikGPT</span> | |
</div> | |
<div class="typing-indicator"> | |
<span class="typing-dot"></span> | |
<span class="typing-dot"></span> | |
<span class="typing-dot"></span> | |
</div> | |
`; | |
chatContainer.appendChild(typingIndicator); | |
chatContainer.scrollTop = chatContainer.scrollHeight; | |
// Simulate AI response after delay | |
setTimeout(() => { | |
typingIndicator.remove(); | |
addAiResponse(message); | |
}, 1500); | |
} | |
function addAiResponse(userMessage) { | |
const responses = [ | |
"I'm ErikGPT, an AI assistant. I can help with a wide range of topics from coding to creative writing!", | |
"That's an interesting question! Here's what I know about that topic...", | |
"I'd be happy to help with that. Let me provide some information that might be useful.", | |
"Great question! The answer depends on several factors. Here's a detailed explanation...", | |
"I can certainly assist with that. Would you like me to provide examples or just a general overview?" | |
]; | |
const randomResponse = responses[Math.floor(Math.random() * responses.length)]; | |
const bubble = document.createElement('div'); | |
bubble.className = 'chat-bubble ai-bubble p-4'; | |
bubble.innerHTML = ` | |
<div class="flex items-center mb-2"> | |
<div class="w-8 h-8 rounded-full bg-purple-500 flex items-center justify-center text-white mr-2"> | |
<i class="fas fa-robot"></i> | |
</div> | |
<span class="font-medium">ErikGPT</span> | |
</div> | |
<p>${randomResponse}</p> | |
`; | |
chatContainer.appendChild(bubble); | |
chatContainer.scrollTop = chatContainer.scrollHeight; | |
} | |
// Send message on button click | |
sendBtn.addEventListener('click', function() { | |
const message = userInput.value.trim(); | |
if (message) { | |
addUserMessage(message); | |
} | |
}); | |
// Send message on Enter key | |
userInput.addEventListener('keypress', function(e) { | |
if (e.key === 'Enter') { | |
const message = userInput.value.trim(); | |
if (message) { | |
addUserMessage(message); | |
} | |
} | |
}); | |
// Handle suggestion buttons | |
suggestionBtns.forEach(btn => { | |
btn.addEventListener('click', function() { | |
addUserMessage(this.textContent.trim()); | |
}); | |
}); | |
// Smooth scrolling for anchor links | |
document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
anchor.addEventListener('click', function (e) { | |
e.preventDefault(); | |
const targetId = this.getAttribute('href'); | |
if (targetId === '#') return; | |
const targetElement = document.querySelector(targetId); | |
if (targetElement) { | |
targetElement.scrollIntoView({ | |
behavior: 'smooth' | |
}); | |
// Close mobile menu if open | |
const mobileMenu = document.getElementById('mobile-menu'); | |
if (!mobileMenu.classList.contains('hidden')) { | |
mobileMenu.classList.add('hidden'); | |
} | |
} | |
}); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Erikartificial/erikgpt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |