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