Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Vision | Face Recognition & Analysis Dashboard</title> | |
| <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>👁</text></svg>"> | |
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@300;400;700&display=swap" rel="stylesheet"> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --bg-color: #0c1015; | |
| --card-bg: rgba(255, 255, 255, 0.05); | |
| --accent: #2563eb; | |
| --accent-glow: rgba(37, 99, 235, 0.4); | |
| --text-primary: #f1f5f9; | |
| --text-secondary: #94a3b8; | |
| --success: #10b981; | |
| --error: #ef4444; | |
| --glass-border: rgba(255, 255, 255, 0.1); | |
| --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| background-color: var(--bg-color); | |
| color: var(--text-primary); | |
| min-height: 100vh; | |
| display: flex; | |
| overflow-x: hidden; | |
| } | |
| /* Sidebar Glassmorphism */ | |
| aside { | |
| width: 280px; | |
| background: var(--card-bg); | |
| backdrop-filter: blur(10px); | |
| border-right: 1px solid var(--glass-border); | |
| height: 100vh; | |
| padding: 2rem; | |
| position: fixed; | |
| display: flex; | |
| flex-direction: column; | |
| z-index: 100; | |
| } | |
| .logo { | |
| font-family: 'Outfit', sans-serif; | |
| font-size: 1.5rem; | |
| font-weight: 800; | |
| margin-bottom: 3rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| color: var(--accent); | |
| } | |
| nav { | |
| flex: 1; | |
| } | |
| .nav-item { | |
| list-style: none; | |
| margin-bottom: 1rem; | |
| } | |
| .nav-link { | |
| text-decoration: none; | |
| color: var(--text-secondary); | |
| font-weight: 500; | |
| display: flex; | |
| align-items: center; | |
| gap: 12px; | |
| padding: 0.8rem 1.2rem; | |
| border-radius: 12px; | |
| transition: var(--transition); | |
| } | |
| .nav-link:hover, .nav-link.active { | |
| background: var(--accent); | |
| color: white; | |
| box-shadow: 0 4px 15px var(--accent-glow); | |
| } | |
| .nav-link i { | |
| font-size: 1.2rem; | |
| } | |
| /* Main Content */ | |
| main { | |
| flex: 1; | |
| margin-left: 280px; | |
| padding: 3rem; | |
| max-width: 1400px; | |
| width: 100%; | |
| } | |
| .header { | |
| margin-bottom: 3rem; | |
| } | |
| .header h1 { | |
| font-family: 'Outfit', sans-serif; | |
| font-size: 2.5rem; | |
| font-weight: 700; | |
| margin-bottom: 0.5rem; | |
| } | |
| .header p { | |
| color: var(--text-secondary); | |
| font-size: 1.1rem; | |
| } | |
| /* Glass Cards */ | |
| .card { | |
| background: var(--card-bg); | |
| backdrop-filter: blur(12px); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 20px; | |
| padding: 2rem; | |
| transition: var(--transition); | |
| } | |
| .card:hover { | |
| border-color: var(--accent); | |
| transform: translateY(-5px); | |
| } | |
| .btn { | |
| background: var(--accent); | |
| color: white; | |
| border: none; | |
| padding: 0.8rem 1.5rem; | |
| border-radius: 10px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: var(--transition); | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 8px; | |
| text-decoration: none; | |
| } | |
| .btn:hover { | |
| opacity: 0.9; | |
| box-shadow: 0 5px 15px var(--accent-glow); | |
| } | |
| /* Hero Stats Grid */ | |
| .stats-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); | |
| gap: 2rem; | |
| margin-bottom: 3rem; | |
| } | |
| .stat-card { | |
| padding: 1.5rem; | |
| display: flex; | |
| align-items: center; | |
| gap: 20px; | |
| } | |
| .stat-icon { | |
| width: 60px; | |
| height: 60px; | |
| border-radius: 15px; | |
| background: rgba(37, 99, 235, 0.1); | |
| color: var(--accent); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.5rem; | |
| } | |
| .stat-info h3 { | |
| font-size: 1.5rem; | |
| margin-bottom: 0.2rem; | |
| } | |
| .stat-info p { | |
| color: var(--text-secondary); | |
| font-size: 0.9rem; | |
| } | |
| /* Animations */ | |
| @keyframes fadeIn { | |
| from { opacity: 0; transform: translateY(20px); } | |
| to { opacity: 1; transform: translateY(0); } | |
| } | |
| .animate-up { | |
| animation: fadeIn 0.6s ease-out forwards; | |
| } | |
| /* Mobile hamburger button */ | |
| .menu-toggle { | |
| display: none; | |
| position: fixed; | |
| top: 1rem; | |
| left: 1rem; | |
| z-index: 200; | |
| background: var(--accent); | |
| border: none; | |
| border-radius: 10px; | |
| padding: 0.6rem 0.8rem; | |
| color: white; | |
| font-size: 1.2rem; | |
| cursor: pointer; | |
| box-shadow: 0 4px 15px var(--accent-glow); | |
| } | |
| .sidebar-overlay { | |
| display: none; | |
| position: fixed; | |
| inset: 0; | |
| background: rgba(0,0,0,0.6); | |
| z-index: 99; | |
| } | |
| /* Responsive: tablet */ | |
| @media (max-width: 900px) { | |
| aside { | |
| transform: translateX(-100%); | |
| transition: transform 0.3s ease; | |
| } | |
| aside.open { | |
| transform: translateX(0); | |
| } | |
| main { | |
| margin-left: 0; | |
| padding: 1.5rem; | |
| padding-top: 4rem; | |
| } | |
| .menu-toggle { | |
| display: block; | |
| } | |
| .sidebar-overlay.open { | |
| display: block; | |
| } | |
| } | |
| /* Responsive: phone */ | |
| @media (max-width: 600px) { | |
| main { | |
| padding: 1rem; | |
| padding-top: 4rem; | |
| } | |
| .header h1 { | |
| font-size: 1.6rem; | |
| } | |
| .stats-grid { | |
| grid-template-columns: 1fr; | |
| gap: 1rem; | |
| } | |
| .card { | |
| padding: 1.2rem; | |
| } | |
| .grid-container { | |
| grid-template-columns: 1fr ; | |
| } | |
| } | |
| {% block extra_styles %}{% endblock %} | |
| </style> | |
| </head> | |
| <body> | |
| <button class="menu-toggle" onclick="toggleSidebar()" aria-label="Menu"> | |
| <i class="fa-solid fa-bars"></i> | |
| </button> | |
| <div class="sidebar-overlay" id="overlay" onclick="toggleSidebar()"></div> | |
| <aside id="sidebar"> | |
| <div class="logo"> | |
| <i class="fa-solid fa-face-viewfinder"></i> | |
| <span>VISION.AI</span> | |
| </div> | |
| <nav> | |
| <ul> | |
| <li class="nav-item"> | |
| <a href="{{ url_for('main.dashboard') }}" class="nav-link {% if request.path == '/dashboard' or request.path == '/' %}active{% endif %}"> | |
| <i class="fa-solid fa-chart-line"></i> Dashboard | |
| </a> | |
| </li> | |
| <li class="nav-item"> | |
| <a href="{{ url_for('analysis.index') }}" class="nav-link {% if '/analysis' in request.path %}active{% endif %}"> | |
| <i class="fa-solid fa-user-gear"></i> Face Analysis | |
| </a> | |
| </li> | |
| <li class="nav-item"> | |
| <a href="{{ url_for('recognition.verify_face') }}" class="nav-link {% if '/recognition' in request.path %}active{% endif %}"> | |
| <i class="fa-solid fa-id-card-clip"></i> Face Verification | |
| </a> | |
| </li> | |
| <li class="nav-item"> | |
| <a href="{{ url_for('analysis.live_view') }}" class="nav-link {% if request.path == '/analysis/live' %}active{% endif %}"> | |
| <i class="fa-solid fa-camera"></i> Live Recognition | |
| </a> | |
| </li> | |
| </ul> | |
| </nav> | |
| <div class="footer-meta"> | |
| <p style="font-size: 0.8rem; color: var(--text-secondary);">v2.0 Beta | DeepFace Engine</p> | |
| </div> | |
| </aside> | |
| <main> | |
| {% with messages = get_flashed_messages() %} | |
| {% if messages %} | |
| {% for message in messages %} | |
| <div class="card" style="margin-bottom: 2rem; border-color: var(--accent); color: var(--accent);"> | |
| {{ message }} | |
| </div> | |
| {% endfor %} | |
| {% endif %} | |
| {% endwith %} | |
| {% block content %}{% endblock %} | |
| </main> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script> | |
| <script> | |
| function toggleSidebar() { | |
| document.getElementById('sidebar').classList.toggle('open'); | |
| document.getElementById('overlay').classList.toggle('open'); | |
| } | |
| gsap.from(".animate-up", { | |
| y: 30, | |
| opacity: 0, | |
| duration: 0.8, | |
| stagger: 0.2, | |
| ease: "power2.out" | |
| }); | |
| </script> | |
| {% block extra_scripts %}{% endblock %} | |
| </body> | |
| </html> | |