← back to Handbag Authentication

views/camera.ejs

108 lines

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Camera Analysis - LuxArb Prime</title>
  <link rel="stylesheet" href="/css/style.css">
  <style>
    #camera-view {
      width: 100%;
      max-width: 600px;
      margin: 0 auto;
      border-radius: 15px;
      background: #000;
    }
    #canvas {
      display: none;
    }
    .camera-controls {
      display: flex;
      gap: 1rem;
      justify-content: center;
      margin: 1.5rem 0;
      flex-wrap: wrap;
    }
    .camera-btn {
      padding: 1rem 2rem;
      font-size: 1.1rem;
      font-weight: 700;
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: all 0.3s;
    }
    .camera-btn-primary {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }
    .camera-btn-capture {
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
      color: white;
      font-size: 1.5rem;
    }
    #analysis-result {
      background: white;
      padding: 2rem;
      border-radius: 15px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      margin-top: 2rem;
    }
    .analyzing {
      text-align: center;
      padding: 3rem;
      font-size: 1.2rem;
      color: #667eea;
      animation: pulse 1.5s ease-in-out infinite;
    }
    @keyframes pulse {
      0%, 100% { opacity: 0.6; }
      50% { opacity: 1; }
    }
    .result-section {
      margin: 1.5rem 0;
      padding: 1.5rem;
      background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
      border-radius: 10px;
    }
  </style>
</head>
<body>
  <header>
    <div class="container">
      <h1>📸 Camera Analysis</h1>
      <p class="tagline">AI-Powered Instant Handbag Valuation</p>
      <p class="subtitle">Take a photo and get instant brand, model, condition, and value estimates</p>
    </div>
  </header>

  <main class="container">
    <div class="back-nav">
      <a href="/" class="btn-back">← Back to Deals</a>
    </div>

    <section style="background: white; padding: 2rem; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-align: center;">
      <video id="camera-view" autoplay playsinline></video>
      <canvas id="canvas"></canvas>

      <div class="camera-controls">
        <button id="upload-photo" class="camera-btn camera-btn-capture" style="font-size: 1.3rem; padding: 1.5rem 2rem;">
          <input type="file" id="file-input" accept="image/*,video/*" capture="environment" multiple style="display: none;">
          📸 Upload Photos/Video (Up to 5 images + 1 video)
        </button>
        <button id="start-camera" class="camera-btn camera-btn-primary" style="font-size: 1rem;">📷 Or Use Camera App</button>
        <button id="capture-photo" class="camera-btn camera-btn-capture" style="display: none;">📸 Capture & Analyze</button>
      </div>

      <div style="background: #fff3cd; padding: 1rem; border-radius: 8px; margin: 1rem 0; text-align: left;">
        <strong>📱 Mobile Users:</strong> Click "Take Photo / Upload" - your phone will ask if you want to take a photo or choose from gallery!
      </div>

      <div id="analysis-result" style="display: none;"></div>
    </section>
  </main>

  <script src="/js/camera.js"></script>
</body>
</html>