test / index.html
quailkauri5795's picture
can you change the color to purple - Initial Deployment
72fdfb5 verified
Raw History Blame Contribute Delete
6.56 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ceramic Voice | AI Assistant</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Manrope', sans-serif;
background: linear-gradient(135deg, #f8f5f2 0%, #f0ece8 100%);
color: #333333;
}
.ceramic-bg {
background: linear-gradient(135deg, #f8f5f2 0%, #f0ece8 100%);
}
.purple-accent {
color: #6a0dad;
}
.purple-bg {
background-color: #6a0dad;
}
.walnut-bg {
background-color: #3a2c1a;
}
.orb {
width: 180px;
height: 180px;
border-radius: 50%;
background: radial-gradient(circle at 40% 40%, #6a0dad, #9b59b6);
box-shadow: 0 10px 30px rgba(106, 13, 173, 0.3);
animation: pulse 3s infinite ease-in-out;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 0.9; }
50% { transform: scale(1.05); opacity: 1; }
100% { transform: scale(1); opacity: 0.9; }
}
.conversation-card {
background-color: #f8f5f2;
border-left: 3px solid #b87333;
}
.info-card {
background-color: #3a2c1a;
color: #f8f5f2;
}
.btn-press:active {
transform: scale(0.98);
opacity: 0.9;
}
</style>
</head>
<body class="h-screen overflow-hidden ceramic-bg">
<div class="container mx-auto h-full flex flex-col">
<!-- Header -->
<header class="pt-8 px-6 flex justify-between items-center">
<h1 class="text-xl font-light text-gray-700">Ceramic Voice</h1>
<button class="copper-accent">
<i data-feather="settings"></i>
</button>
</header>
<!-- Main Content -->
<main class="flex-1 flex flex-col items-center justify-center px-6 pb-20">
<!-- Orb Animation -->
<div class="orb mb-8" id="voiceOrb"></div>
<!-- Prompt Text -->
<p class="text-lg text-gray-600 mb-12" id="promptText">How can I help?</p>
<!-- Conversation Area -->
<div class="w-full max-w-md space-y-4 overflow-y-auto max-h-64" id="conversationArea">
<!-- Conversation items will be added here dynamically -->
</div>
<!-- Results Cards -->
<div class="w-full max-w-md mt-4 space-y-3 hidden" id="resultsArea">
<div class="rounded-lg p-4 info-card">
<h3 class="font-medium mb-2">Weather</h3>
<p>Currently 72°F • Sunny</p>
</div>
</div>
</main>
<!-- Footer -->
<footer class="pb-8 px-6 flex justify-center">
<button class="purple-bg text-white rounded-full p-4 shadow-lg btn-press transition-all duration-200" id="voiceButton">
<i data-feather="mic" class="w-6 h-6"></i>
</button>
</footer>
</div>
<script>
feather.replace();
// Voice interaction simulation
const voiceButton = document.getElementById('voiceButton');
const voiceOrb = document.getElementById('voiceOrb');
const promptText = document.getElementById('promptText');
const conversationArea = document.getElementById('conversationArea');
const resultsArea = document.getElementById('resultsArea');
let isListening = false;
voiceButton.addEventListener('click', () => {
isListening = !isListening;
if (isListening) {
// Start listening state
voiceOrb.style.animation = 'none';
voiceOrb.style.transform = 'scale(1.1)';
voiceOrb.style.boxShadow = '0 10px 40px rgba(106, 13, 173, 0.5)';
promptText.textContent = "Listening...";
voiceButton.classList.add('animate-pulse');
// Simulate user speaking after 2 seconds
setTimeout(() => {
stopListening();
simulateResponse();
}, 2000);
}
});
function stopListening() {
isListening = false;
voiceOrb.style.animation = 'pulse 3s infinite ease-in-out';
voiceOrb.style.boxShadow = '0 10px 30px rgba(184, 115, 51, 0.3)';
promptText.textContent = "How can I help?";
voiceButton.classList.remove('animate-pulse');
}
function simulateResponse() {
// Add user message
const userMessage = document.createElement('div');
userMessage.className = 'conversation-card rounded-lg p-4';
userMessage.textContent = "What's the weather today?";
conversationArea.appendChild(userMessage);
// Show thinking state
promptText.textContent = "Thinking...";
voiceOrb.style.animation = 'none';
voiceOrb.innerHTML = '<div class="w-full h-full rounded-full border-4 border-transparent border-t-purple-500 animate-spin"></div>';
// Simulate AI response after 3 seconds
setTimeout(() => {
promptText.textContent = "How can I help?";
voiceOrb.style.animation = 'pulse 3s infinite ease-in-out';
voiceOrb.innerHTML = '';
// Add AI response
const aiMessage = document.createElement('div');
aiMessage.className = 'conversation-card rounded-lg p-4';
aiMessage.textContent = "It's currently sunny and 72°F in your area.";
conversationArea.appendChild(aiMessage);
// Show results cards
resultsArea.classList.remove('hidden');
// Scroll to bottom
conversationArea.scrollTop = conversationArea.scrollHeight;
}, 3000);
}
</script>
</body>
</html>