|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>Sustainable Food Tracker - Home</title> |
| 7 | + <link rel="stylesheet" href="style.css"> |
| 8 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
| 9 | + <!-- Chart.js --> |
| 10 | + <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.0/dist/chart.umd.min.js"></script> |
| 11 | + <!-- QuaggaJS for barcode scanning --> |
| 12 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/quagga/0.12.1/quagga.min.js"></script> |
| 13 | +</head> |
| 14 | +<body> |
| 15 | + <div class="container"> |
| 16 | + <header class="hero"> |
| 17 | + <div class="hero-content"> |
| 18 | + <div class="hero-icon"> |
| 19 | + <i class="fas fa-leaf"></i> |
| 20 | + </div> |
| 21 | + <h1>Sustainable Food Tracker</h1> |
| 22 | + <h2>EcoBite</h2> |
| 23 | + <p class="hero-description"> |
| 24 | + Make informed choices for your health and the planet. Scan or search products to discover their nutritional value and environmental impact. |
| 25 | + </p> |
| 26 | + </div> |
| 27 | + |
| 28 | + <!-- Search Section --> |
| 29 | + <div class="search-container"> |
| 30 | + <form id="searchForm" class="search-form"> |
| 31 | + <input |
| 32 | + type="text" |
| 33 | + id="searchInput" |
| 34 | + placeholder="Enter product name or barcode..." |
| 35 | + class="search-input" |
| 36 | + required |
| 37 | + /> |
| 38 | + <button type="submit" class="search-button"> |
| 39 | + <i class="fas fa-search"></i> |
| 40 | + <span>Search</span> |
| 41 | + </button> |
| 42 | + </form> |
| 43 | + |
| 44 | + <!-- Scanner Button --> |
| 45 | + <button id="scannerBtn" class="scanner-button"> |
| 46 | + <i class="fas fa-camera"></i> |
| 47 | + <span>Scan Barcode</span> |
| 48 | + </button> |
| 49 | + </div> |
| 50 | + |
| 51 | + <!-- Scanner Modal --> |
| 52 | + <div id="scannerModal" class="modal hidden"> |
| 53 | + <div class="modal-content"> |
| 54 | + <div class="modal-header"> |
| 55 | + <h2>Scan Barcode</h2> |
| 56 | + <button id="closeScanner" class="close-btn"> |
| 57 | + <i class="fas fa-times"></i> |
| 58 | + </button> |
| 59 | + </div> |
| 60 | + <div id="scannerContainer" class="scanner-container"> |
| 61 | + <div id="scanner"></div> |
| 62 | + <p class="scanner-hint">Point your camera at a barcode</p> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + </div> |
| 66 | + </header> |
| 67 | + |
| 68 | + <!-- Loading State --> |
| 69 | + <div id="loadingState" class="loading-state hidden"> |
| 70 | + <div class="spinner"></div> |
| 71 | + <p>Searching products...</p> |
| 72 | + </div> |
| 73 | + |
| 74 | + <!-- Search Results --> |
| 75 | + <section id="searchResults" class="search-results hidden"> |
| 76 | + <h2>Search Results</h2> |
| 77 | + <div id="resultsGrid" class="results-grid"></div> |
| 78 | + </section> |
| 79 | + |
| 80 | + <!-- Navigation --> |
| 81 | + <nav class="bottom-nav"> |
| 82 | + <a href="index.html" class="nav-link active"> |
| 83 | + <i class="fas fa-home"></i> |
| 84 | + <span>Home</span> |
| 85 | + </a> |
| 86 | + <a href="history.html" class="nav-link"> |
| 87 | + <i class="fas fa-history"></i> |
| 88 | + <span>History</span> |
| 89 | + </a> |
| 90 | + <a href="profile.html" class="nav-link"> |
| 91 | + <i class="fas fa-user"></i> |
| 92 | + <span>Profile</span> |
| 93 | + </a> |
| 94 | + </nav> |
| 95 | + </div> |
| 96 | + |
| 97 | + <script src="storage.js"></script> |
| 98 | + <script src="scanner.js"></script> |
| 99 | + <script src="app.js"></script> |
| 100 | +</body> |
| 101 | +</html> |
0 commit comments