| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>LocalFoodAI Chat</title>
- <meta name="description" content="LocalFoodAI Assistant for Nutritional Information and Menu Proposals">
- <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
- <link rel="stylesheet" href="/static/style.css">
- </head>
- <body>
- <div class="app-container" id="chat-app" style="display: none;">
- <header class="chat-header">
- <div class="brand">
- <div class="logo">🍳</div>
- <div>
- <h1>LocalFoodAI</h1>
- <span class="status-indicator" id="status-dot"></span><span class="status-text" id="status-text">Local LLM Ready</span>
- </div>
- </div>
- <div class="actions">
- <span id="user-greeting" style="margin-right:15px; font-size: 0.9rem; color: var(--text-muted);"></span>
- <button id="nav-logout-btn" class="nav-btn">Logout</button>
- <button id="clear-chat" title="Clear Chat">
- <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"></path></svg>
- </button>
- </div>
- </header>
-
- <main class="chat-container" id="chat-container">
- <div class="message system">
- <div class="avatar">🤖</div>
- <div class="message-content">
- <p>Hello! I am LocalFoodAI, your completely local nutrition and menu assistant. How can I help you today?</p>
- </div>
- </div>
- </main>
- <footer class="chat-input-area">
- <form id="chat-form" class="input-form">
- <textarea id="user-input" placeholder="Ask about recipes, nutrition, menus..." rows="1" required></textarea>
- <button type="submit" id="send-btn" class="send-btn" aria-label="Send message">
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="22" y1="2" x2="11" y2="13"></line><polygon points="22 2 15 22 11 13 2 9 22 2"></polygon></svg>
- </button>
- </form>
- <div class="footer-note">Powered by Llama 3.1 8B running locally on Ubuntu 24.04 via Ollama</div>
- </footer>
- </div>
-
- <!-- Authentication Gateway -->
- <div class="auth-container" id="auth-screen">
- <div class="auth-header">
- <div class="logo" style="margin-bottom: 10px;">🍳</div>
- <h2>Welcome to LocalFoodAI</h2>
- <p>Please log in or create an account to continue.</p>
- </div>
- <!-- Login Form -->
- <form id="login-form">
- <div class="input-group">
- <label for="login-username">Username</label>
- <input type="text" id="login-username" required>
- </div>
- <div class="input-group">
- <label for="login-password">Password</label>
- <input type="password" id="login-password" required>
- </div>
- <div id="login-error" class="error-text"></div>
- <button type="submit" class="primary-btn" id="login-submit-btn">Login</button>
- <p class="auth-toggle">Don't have an account? <a href="#" id="show-register">Register here</a></p>
- </form>
- <!-- Registration Form (Hidden by default) -->
- <form id="register-form" style="display: none;">
- <div class="input-group">
- <label for="reg-username">Username</label>
- <input type="text" id="reg-username" required minlength="3">
- </div>
- <div class="input-group">
- <label for="reg-password">Password</label>
- <input type="password" id="reg-password" required minlength="6">
- </div>
- <div class="input-group">
- <label for="reg-confirm">Confirm Password</label>
- <input type="password" id="reg-confirm" required minlength="6">
- </div>
- <div id="reg-error" class="error-text"></div>
- <div id="reg-success" class="success-text"></div>
- <button type="submit" class="primary-btn" id="reg-submit-btn">Register</button>
- <p class="auth-toggle">Already have an account? <a href="#" id="show-login">Login here</a></p>
- </form>
- </div>
- <script src="/static/script.js"></script>
- </body>
- </html>
|