Spaces:
Running
Running
Download index.html from aslamkhan9621/anycoder-7951c75c: direct link, hf CLI and curl.
- Browser
- Download file 32.3 kB
-
https://huggingface.co/spaces/aslamkhan9621/anycoder-7951c75c/resolve/main/index.html
- Command line
-
hf download hf://spaces/aslamkhan9621/anycoder-7951c75c/index.html
-
curl -L -o index.html https://huggingface.co/spaces/aslamkhan9621/anycoder-7951c75c/resolve/main/index.html
32.3 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Calling Assistant</title> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary: #4a6bff; | |
| --primary-dark: #3a5bef; | |
| --secondary: #f8f9fa; | |
| --success: #28a745; | |
| --danger: #dc3545; | |
| --warning: #ffc107; | |
| --info: #17a2b8; | |
| --light: #f8f9fa; | |
| --dark: #343a40; | |
| --shadow: 0 4px 6px rgba(0, 0, 0, 0.1); | |
| --border-radius: 12px; | |
| --transition: all 0.3s ease; | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background-color: #f5f7ff; | |
| color: var(--dark); | |
| line-height: 1.6; | |
| } | |
| .container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 0 20px; | |
| } | |
| /* Header */ | |
| header { | |
| background-color: white; | |
| box-shadow: var(--shadow); | |
| padding: 15px 0; | |
| position: sticky; | |
| top: 0; | |
| z-index: 1000; | |
| } | |
| .header-content { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| text-decoration: none; | |
| color: var(--dark); | |
| font-weight: 600; | |
| font-size: 1.5rem; | |
| } | |
| .logo i { | |
| color: var(--primary); | |
| font-size: 1.8rem; | |
| } | |
| .nav-links { | |
| display: flex; | |
| gap: 30px; | |
| } | |
| .nav-links a { | |
| text-decoration: none; | |
| color: var(--dark); | |
| font-weight: 500; | |
| transition: var(--transition); | |
| padding: 5px 10px; | |
| border-radius: 6px; | |
| } | |
| .nav-links a:hover { | |
| background-color: var(--primary); | |
| color: white; | |
| } | |
| .header-actions { | |
| display: flex; | |
| gap: 15px; | |
| align-items: center; | |
| } | |
| .btn { | |
| padding: 8px 16px; | |
| border-radius: 6px; | |
| text-decoration: none; | |
| font-weight: 500; | |
| transition: var(--transition); | |
| border: none; | |
| cursor: pointer; | |
| } | |
| .btn-primary { | |
| background-color: var(--primary); | |
| color: white; | |
| } | |
| .btn-primary:hover { | |
| background-color: var(--primary-dark); | |
| } | |
| .btn-secondary { | |
| background-color: transparent; | |
| color: var(--primary); | |
| border: 1px solid var(--primary); | |
| } | |
| .btn-secondary:hover { | |
| background-color: rgba(74, 107, 255, 0.1); | |
| } | |
| .built-with { | |
| font-size: 0.8rem; | |
| color: #6c757d; | |
| margin-left: 10px; | |
| } | |
| .built-with a { | |
| color: var(--primary); | |
| text-decoration: none; | |
| } | |
| /* Main Content */ | |
| main { | |
| padding: 40px 0; | |
| } | |
| .hero { | |
| text-align: center; | |
| padding: 60px 0; | |
| background: linear-gradient(135deg, rgba(74, 107, 255, 0.1), rgba(255, 255, 255, 0)); | |
| border-radius: var(--border-radius); | |
| margin-bottom: 40px; | |
| } | |
| .hero h1 { | |
| font-size: 2.5rem; | |
| margin-bottom: 20px; | |
| color: var(--dark); | |
| } | |
| .hero p { | |
| font-size: 1.2rem; | |
| color: #6c757d; | |
| max-width: 700px; | |
| margin: 0 auto 30px; | |
| } | |
| .hero-actions { | |
| display: flex; | |
| gap: 15px; | |
| justify-content: center; | |
| flex-wrap: wrap; | |
| } | |
| /* Features Section */ | |
| .features { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 30px; | |
| margin-bottom: 60px; | |
| } | |
| .feature-card { | |
| background-color: white; | |
| padding: 30px; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| transition: var(--transition); | |
| text-align: center; | |
| } | |
| .feature-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); | |
| } | |
| .feature-icon { | |
| font-size: 2.5rem; | |
| color: var(--primary); | |
| margin-bottom: 20px; | |
| } | |
| .feature-card h3 { | |
| margin-bottom: 15px; | |
| color: var(--dark); | |
| } | |
| .feature-card p { | |
| color: #6c757d; | |
| } | |
| /* Dashboard */ | |
| .dashboard { | |
| display: grid; | |
| grid-template-columns: 1fr 2fr; | |
| gap: 30px; | |
| margin-bottom: 40px; | |
| } | |
| .sidebar { | |
| background-color: white; | |
| padding: 20px; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| } | |
| .sidebar h3 { | |
| margin-bottom: 20px; | |
| color: var(--dark); | |
| padding-bottom: 10px; | |
| border-bottom: 1px solid #eee; | |
| } | |
| .menu-item { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| padding: 10px 15px; | |
| margin-bottom: 10px; | |
| border-radius: 6px; | |
| color: #6c757d; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .menu-item:hover, .menu-item.active { | |
| background-color: var(--primary); | |
| color: white; | |
| } | |
| .menu-item i { | |
| font-size: 1.1rem; | |
| } | |
| .main-content { | |
| background-color: white; | |
| padding: 20px; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| } | |
| /* Call History */ | |
| .call-history { | |
| overflow-x: auto; | |
| } | |
| table { | |
| width: 100%; | |
| border-collapse: collapse; | |
| } | |
| th, td { | |
| padding: 15px; | |
| text-align: left; | |
| border-bottom: 1px solid #eee; | |
| } | |
| th { | |
| background-color: var(--secondary); | |
| font-weight: 600; | |
| color: var(--dark); | |
| } | |
| tr:hover { | |
| background-color: rgba(74, 107, 255, 0.05); | |
| } | |
| .status { | |
| padding: 5px 10px; | |
| border-radius: 20px; | |
| font-size: 0.8rem; | |
| font-weight: 600; | |
| text-transform: capitalize; | |
| } | |
| .status.success { | |
| background-color: rgba(40, 167, 69, 0.1); | |
| color: var(--success); | |
| } | |
| .status.danger { | |
| background-color: rgba(220, 53, 69, 0.1); | |
| color: var(--danger); | |
| } | |
| .status.warning { | |
| background-color: rgba(255, 193, 7, 0.1); | |
| color: var(--warning); | |
| } | |
| /* Call Controls */ | |
| .call-controls { | |
| display: flex; | |
| justify-content: center; | |
| gap: 20px; | |
| margin: 30px 0; | |
| } | |
| .call-btn { | |
| width: 80px; | |
| height: 80px; | |
| border-radius: 50%; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| background-color: var(--primary); | |
| color: white; | |
| font-size: 1.5rem; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| border: none; | |
| } | |
| .call-btn:hover { | |
| transform: scale(1.05); | |
| } | |
| .call-btn i { | |
| margin-bottom: 5px; | |
| } | |
| .call-btn span { | |
| font-size: 0.7rem; | |
| font-weight: 500; | |
| } | |
| /* AI Assistant */ | |
| .ai-assistant { | |
| background-color: white; | |
| padding: 30px; | |
| border-radius: var(--border-radius); | |
| box-shadow: var(--shadow); | |
| margin-bottom: 40px; | |
| } | |
| .ai-header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-bottom: 20px; | |
| } | |
| .ai-chat { | |
| height: 300px; | |
| overflow-y: auto; | |
| border: 1px solid #eee; | |
| border-radius: 10px; | |
| padding: 20px; | |
| margin-bottom: 20px; | |
| background-color: var(--secondary); | |
| } | |
| .chat-message { | |
| margin-bottom: 15px; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .message { | |
| max-width: 70%; | |
| padding: 10px 15px; | |
| border-radius: 18px; | |
| margin-bottom: 5px; | |
| line-height: 1.4; | |
| } | |
| .user-message { | |
| align-items: flex-end; | |
| } | |
| .user-message .message { | |
| background-color: var(--primary); | |
| color: white; | |
| border-bottom-right-radius: 5px; | |
| } | |
| .ai-message { | |
| align-items: flex-start; | |
| } | |
| .ai-message .message { | |
| background-color: white; | |
| color: var(--dark); | |
| border-bottom-left-radius: 5px; | |
| } | |
| .message-time { | |
| font-size: 0.7rem; | |
| color: #6c757d; | |
| } | |
| .chat-input { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| .chat-input input { | |
| flex: 1; | |
| padding: 12px 15px; | |
| border: 1px solid #eee; | |
| border-radius: 25px; | |
| outline: none; | |
| transition: var(--transition); | |
| } | |
| .chat-input input:focus { | |
| border-color: var(--primary); | |
| } | |
| .chat-input button { | |
| padding: 12px 20px; | |
| border-radius: 25px; | |
| background-color: var(--primary); | |
| color: white; | |
| border: none; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| } | |
| .chat-input button:hover { | |
| background-color: var(--primary-dark); | |
| } | |
| /* Footer */ | |
| footer { | |
| background-color: var(--dark); | |
| color: white; | |
| padding: 40px 0 20px; | |
| margin-top: 60px; | |
| } | |
| .footer-content { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); | |
| gap: 40px; | |
| margin-bottom: 30px; | |
| } | |
| .footer-section h3 { | |
| margin-bottom: 20px; | |
| font-size: 1.2rem; | |
| color: white; | |
| } | |
| .footer-section ul { | |
| list-style: none; | |
| } | |
| .footer-section ul li { | |
| margin-bottom: 10px; | |
| } | |
| .footer-section ul li a { | |
| color: #adb5bd; | |
| text-decoration: none; | |
| transition: var(--transition); | |
| } | |
| .footer-section ul li a:hover { | |
| color: var(--primary); | |
| } | |
| .social-links { | |
| display: flex; | |
| gap: 15px; | |
| } | |
| .social-links a { | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| width: 40px; | |
| height: 40px; | |
| background-color: rgba(255, 255, 255, 0.1); | |
| border-radius: 50%; | |
| color: white; | |
| transition: var(--transition); | |
| } | |
| .social-links a:hover { | |
| background-color: var(--primary); | |
| transform: translateY(-3px); | |
| } | |
| .footer-bottom { | |
| text-align: center; | |
| padding-top: 20px; | |
| border-top: 1px solid rgba(255, 255, 255, 0.1); | |
| color: #adb5bd; | |
| font-size: 0.9rem; | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .nav-links { | |
| display: none; | |
| } | |
| .hero h1 { | |
| font-size: 2rem; | |
| } | |
| .hero p { | |
| font-size: 1rem; | |
| } | |
| .dashboard { | |
| grid-template-columns: 1fr; | |
| } | |
| .call-controls { | |
| flex-wrap: wrap; | |
| } | |
| .ai-chat { | |
| height: 250px; | |
| } | |
| } | |
| @media (max-width: 480px) { | |
| .header-actions { | |
| flex-direction: column; | |
| gap: 10px; | |
| } | |
| .hero-actions { | |
| flex-direction: column; | |
| align-items: center; | |
| } | |
| .call-btn { | |
| width: 60px; | |
| height: 60px; | |
| font-size: 1.2rem; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <header> | |
| <div class="container header-content"> | |
| <a href="#" class="logo"> | |
| <i class="fas fa-phone-volume"></i> | |
| <span>AI Call Assistant</span> | |
| </a> | |
| <nav class="nav-links"> | |
| <a href="#features">Features</a> | |
| <a href="#dashboard">Dashboard</a> | |
| <a href="#ai-assistant">AI Assistant</a> | |
| <a href="#pricing">Pricing</a> | |
| </nav> | |
| <div class="header-actions"> | |
| <a href="#" class="btn btn-secondary">Login</a> | |
| <a href="#" class="btn btn-primary">Sign Up</a> | |
| <div class="built-with"> | |
| Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main> | |
| <section class="hero"> | |
| <div class="container"> | |
| <h1>Smart AI-Powered Calling Assistant</h1> | |
| <p>Transform your calling experience with our intelligent assistant that helps you manage calls, analyze conversations, and provide real-time insights.</p> | |
| <div class="hero-actions"> | |
| <a href="#" class="btn btn-primary">Start Free Trial</a> | |
| <a href="#" class="btn btn-secondary">Learn More</a> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="features" class="container"> | |
| <h2 style="text-align: center; margin-bottom: 40px; color: var(--dark);">Powerful Features</h2> | |
| <div class="features"> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-brain"></i> | |
| </div> | |
| <h3>AI Call Analysis</h3> | |
| <p>Get real-time insights and summaries of your calls with our advanced AI analysis engine.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-phone-alt"></i> | |
| </div> | |
| <h3>Smart Call Routing</h3> | |
| <p>Intelligently route calls to the right person or department based on caller needs.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-chart-line"></i> | |
| </div> | |
| <h3>Call Analytics</h3> | |
| <p>Detailed analytics and reports to help you understand call patterns and improve performance.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-users"></i> | |
| </div> | |
| <h3>Team Collaboration</h3> | |
| <p>Seamlessly collaborate with your team on calls and share important information.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-shield-alt"></i> | |
| </div> | |
| <h3>Call Security</h3> | |
| <p>End-to-end encryption and advanced security features to protect your conversations.</p> | |
| </div> | |
| <div class="feature-card"> | |
| <div class="feature-icon"> | |
| <i class="fas fa-globe"></i> | |
| </div> | |
| <h3>Multi-Platform</h3> | |
| <p>Works across all devices and platforms for a consistent experience everywhere.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="dashboard" class="container"> | |
| <h2 style="text-align: center; margin-bottom: 40px; color: var(--dark);">Your Dashboard</h2> | |
| <div class="dashboard"> | |
| <div class="sidebar"> | |
| <h3>Menu</h3> | |
| <div class="menu-item active"> | |
| <i class="fas fa-home"></i> | |
| <span>Dashboard</span> | |
| </div> | |
| <div class="menu-item"> | |
| <i class="fas fa-phone"></i> | |
| <span>Call History</span> | |
| </div> | |
| <div class="menu-item"> | |
| <i class="fas fa-users"></i> | |
| <span>Contacts</span> | |
| </div> | |
| <div class="menu-item"> | |
| <i class="fas fa-chart-bar"></i> | |
| <span>Analytics</span> | |
| </div> | |
| <div class="menu-item"> | |
| <i class="fas fa-cog"></i> | |
| <span>Settings</span> | |
| </div> | |
| </div> | |
| <div class="main-content"> | |
| <div class="call-history"> | |
| <h3 style="margin-bottom: 20px;">Recent Calls</h3> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Name</th> | |
| <th>Number</th> | |
| <th>Date</th> | |
| <th>Duration</th> | |
| <th>Status</th> | |
| <th>Action</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>John Doe</td> | |
| <td>(123) 456-7890</td> | |
| <td>2023-11-15 10:30 AM</td> | |
| <td>5 min 32 sec</td> | |
| <td><span class="status success">answered</span></td> | |
| <td> | |
| <button class="btn btn-primary" style="padding: 5px 10px; font-size: 0.8rem;"> | |
| <i class="fas fa-phone"></i> Call | |
| </button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Jane Smith</td> | |
| <td>(234) 567-8901</td> | |
| <td>2023-11-14 03:15 PM</td> | |
| <td>2 min 45 sec</td> | |
| <td><span class="status danger">missed</span></td> | |
| <td> | |
| <button class="btn btn-primary" style="padding: 5px 10px; font-size: 0.8rem;"> | |
| <i class="fas fa-phone"></i> Call | |
| </button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Tech Support</td> | |
| <td>(345) 678-9012</td> | |
| <td>2023-11-13 11:20 AM</td> | |
| <td>12 min 10 sec</td> | |
| <td><span class="status success">answered</span></td> | |
| <td> | |
| <button class="btn btn-primary" style="padding: 5px 10px; font-size: 0.8rem;"> | |
| <i class="fas fa-phone"></i> Call | |
| </button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td>Unknown Caller</td> | |
| <td>(456) 789-0123</td> | |
| <td>2023-11-12 04:45 PM</td> | |
| <td>1 min 20 sec</td> | |
| <td><span class="status warning">voicemail</span></td> | |
| <td> | |
| <button class="btn btn-primary" style="padding: 5px 10px; font-size: 0.8rem;"> | |
| <i class="fas fa-phone"></i> Call | |
| </button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div class="call-controls"> | |
| <button class="call-btn" title="Answer Call"> | |
| <i class="fas fa-phone"></i> | |
| <span>Answer</span> | |
| </button> | |
| <button class="call-btn" title="Make Call" style="background-color: var(--success);"> | |
| <i class="fas fa-phone-alt"></i> | |
| <span>Call</span> | |
| </button> | |
| <button class="call-btn" title="End Call" style="background-color: var(--danger);"> | |
| <i class="fas fa-phone-slash"></i> | |
| <span>End</span> | |
| </button> | |
| <button class="call-btn" title="Mute" style="background-color: var(--warning);"> | |
| <i class="fas fa-microphone-slash"></i> | |
| <span>Mute</span> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section id="ai-assistant" class="container"> | |
| <div class="ai-assistant"> | |
| <div class="ai-header"> | |
| <h2>AI Call Assistant</h2> | |
| <div class="status success" style="padding: 5px 15px; border-radius: 20px;"> | |
| <i class="fas fa-circle" style="font-size: 0.6rem; margin-right: 5px;"></i> | |
| Online | |
| </div> | |
| </div> | |
| <div class="ai-chat" id="chatContainer"> | |
| <div class="chat-message ai-message"> | |
| <div class="message"> | |
| Hello! I'm your AI Call Assistant. How can I help you with your calls today? | |
| </div> | |
| <div class="message-time">10:30 AM</div> | |
| </div> | |
| <div class="chat-message user-message"> | |
| <div class="message"> | |
| I need to prepare for an important client call. Can you help? | |
| </div> | |
| <div class="message-time">10:31 AM</div> | |
| </div> | |
| <div class="chat-message ai-message"> | |
| <div class="message"> | |
| Of course! I can help you prepare for your client call. Here's what I can do: | |
| <ul style="margin-top: 10px; padding-left: 20px;"> | |
| <li>Provide background information about the client</li> | |
| <li>Suggest talking points based on previous conversations</li> | |
| <li>Help you anticipate questions and prepare answers</li> | |
| <li>Set up call reminders and follow-ups</li> | |
| </ul> | |
| What would you like to focus on first? | |
| </div> | |
| <div class="message-time">10:31 AM</div> | |
| </div> | |
| </div> | |
| <div class="chat-input"> | |
| <input type="text" id="chatInput" placeholder="Type your message..."> | |
| <button id="sendButton"> | |
| <i class="fas fa-paper-plane"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <footer> | |
| <div class="container"> | |
| <div class="footer-content"> | |
| <div class="footer-section"> | |
| <h3>AI Call Assistant</h3> | |
| <p>Revolutionizing the way you handle calls with artificial intelligence.</p> | |
| <div class="social-links"> | |
| <a href="#"><i class="fab fa-facebook-f"></i></a> | |
| <a href="#"><i class="fab fa-twitter"></i></a> | |
| <a href="#"><i class="fab fa-linkedin-in"></i></a> | |
| <a href="#"><i class="fab fa-instagram"></i></a> | |
| </div> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Features</h3> | |
| <ul> | |
| <li><a href="#">AI Call Analysis</a></li> | |
| <li><a href="#">Smart Routing</a></li> | |
| <li><a href="#">Call Analytics</a></li> | |
| <li><a href="#">Team Collaboration</a></li> | |
| <li><a href="#">Call Security</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Resources</h3> | |
| <ul> | |
| <li><a href="#">Documentation</a></li> | |
| <li><a href="#">Tutorials</a></li> | |
| <li><a href="#">API Reference</a></li> | |
| <li><a href="#">Community</a></li> | |
| <li><a href="#">Blog</a></li> | |
| </ul> | |
| </div> | |
| <div class="footer-section"> | |
| <h3>Company</h3> | |
| <ul> | |
| <li><a href="#">About Us</a></li> | |
| <li><a href="#">Careers</a></li> | |
| <li><a href="#">Press</a></li> | |
| <li><a href="#">Partners</a></li> | |
| <li><a href="#">Contact</a></li> | |
| </ul> | |
| </div> | |
| </div> | |
| <div class="footer-bottom"> | |
| <p>© 2023 AI Call Assistant. All rights reserved.</p> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Mobile menu toggle (if needed) | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Chat functionality | |
| const chatContainer = document.getElementById('chatContainer'); | |
| const chatInput = document.getElementById('chatInput'); | |
| const sendButton = document.getElementById('sendButton'); | |
| function addUserMessage(message) { | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = 'chat-message user-message'; | |
| messageDiv.innerHTML = ` | |
| <div class="message">${message}</div> | |
| <div class="message-time">${getCurrentTime()}</div> | |
| `; | |
| chatContainer.appendChild(messageDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| } | |
| function addAIMessage(message) { | |
| const messageDiv = document.createElement('div'); | |
| messageDiv.className = 'chat-message ai-message'; | |
| messageDiv.innerHTML = ` | |
| <div class="message">${message}</div> | |
| <div class="message-time">${getCurrentTime()}</div> | |
| `; | |
| chatContainer.appendChild(messageDiv); | |
| chatContainer.scrollTop = chatContainer.scrollHeight; | |
| } | |
| function getCurrentTime() { | |
| const now = new Date(); | |
| return now.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' }); | |
| } | |
| function simulateAIResponse() { | |
| const userMessage = chatInput.value.trim(); | |
| if (!userMessage) return; | |
| addUserMessage(userMessage); | |
| chatInput.value = ''; | |
| // Simulate AI thinking | |
| setTimeout(() => { | |
| let response; | |
| if (userMessage.toLowerCase().includes('help')) { | |
| response = "I can help with that! What specific aspect of your call would you like assistance with?"; | |
| } else if (userMessage.toLowerCase().includes('client')) { | |
| response = "For client calls, I recommend focusing on their specific needs and pain points. Would you like me to analyze previous conversations with this client?"; | |
| } else if (userMessage.toLowerCase().includes('thanks') || userMessage.toLowerCase().includes('thank you')) { | |
| response = "You're welcome! I'm here to help with all your calling needs. Is there anything else I can assist you with?"; | |
| } else { | |
| response = "I understand. Let me think about that..."; | |
| } | |
| addAIMessage(response); | |
| }, 1000); | |
| } | |
| sendButton.addEventListener('click', simulateAIResponse); | |
| chatInput.addEventListener('keypress', function(e) { | |
| if (e.key === 'Enter') { | |
| simulateAIResponse(); | |
| } | |
| }); | |
| // Menu item active state | |
| const menuItems = document.querySelectorAll('.menu-item'); | |
| menuItems.forEach(item => { | |
| item.addEventListener('click', function() { | |
| menuItems.forEach(i => i.classList.remove('active')); | |
| this.classList.add('active'); | |
| }); | |
| }); | |
| // Call button interactions | |
| const callButtons = document.querySelectorAll('.call-btn'); | |
| callButtons.forEach(button => { | |
| button.addEventListener('click', function() { | |
| const action = this.querySelector('span').textContent.toLowerCase(); | |
| let message; | |
| switch(action) { | |
| case 'answer': | |
| message = "Call answered! Connecting..."; | |
| break; | |
| case 'call': | |
| message = "Initiating call..."; | |
| break; | |
| case 'end': | |
| message = "Call ended. Duration: 3 min 45 sec"; | |
| break; | |
| case 'mute': | |
| message = "Microphone muted"; | |
| this.style.backgroundColor = this.style.backgroundColor === 'rgb(220, 53, 69)' ? 'var(--warning)' : 'var(--danger)'; | |
| break; | |
| } | |
| if (message) { | |
| alert(message); | |
| } | |
| }); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |