-
Notifications
You must be signed in to change notification settings - Fork 244
Expand file tree
/
Copy pathbuyer.html
More file actions
213 lines (193 loc) · 6.15 KB
/
Copy pathbuyer.html
File metadata and controls
213 lines (193 loc) · 6.15 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!doctype html>
<html lang="en">
<head>
<link rel="icon" type="image/png" href="images/logo.png" />
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Buyer Marketplace - AgriTech</title>
<link rel="icon" type="image/png" href="/AgriTech/images/logo.png" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
/>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="farmer.css" />
<link rel="stylesheet" href="theme.css" />
<style>
.hero-section {
background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
color: white;
padding: 60px 20px;
text-align: center;
}
.hero-section h1 {
font-size: 2.5rem;
margin-bottom: 20px;
font-weight: 700;
}
.hero-section p {
font-size: 1.2rem;
margin-bottom: 30px;
opacity: 0.95;
}
.marketplace-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 30px;
padding: 50px 20px;
max-width: 1200px;
margin: 0 auto;
}
.marketplace-card {
background: white;
border-radius: 12px;
padding: 30px;
text-align: center;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
cursor: pointer;
}
.marketplace-card:hover {
transform: translateY(-10px);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}
.marketplace-card i {
font-size: 3rem;
color: #2196f3;
margin-bottom: 20px;
}
.marketplace-card h3 {
font-size: 1.3rem;
margin-bottom: 10px;
color: #333;
}
.marketplace-card p {
color: #666;
font-size: 0.95rem;
line-height: 1.6;
}
.btn-primary {
background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
color: white;
padding: 12px 30px;
border: none;
border-radius: 8px;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 20px;
}
.btn-primary:hover {
transform: scale(1.05);
box-shadow: 0 6px 20px rgba(33, 150, 243, 0.3);
}
</style>
</head>
<body>
<header>
<nav class="navbar">
<div class="nav-brand">
<img src="images/logo.png" alt="AgriTech Logo" class="nav-logo" />
<span class="brand-name">AgriTech</span>
</div>
<ul class="nav-menu">
<li><a href="main.html" class="nav-link">Home</a></li>
<li><a href="about.html" class="nav-link">About</a></li>
<li><a href="marketplace.html" class="nav-link">Marketplace</a></li>
</ul>
<div class="nav-actions">
<span
id="nav-user-name"
style="
font-size: 0.9rem;
color: #2196f3;
font-weight: 600;
display: none;
margin-right: 0.5rem;
"
></span>
<button
id="nav-logout-btn"
style="
display: none;
background: none;
border: 1.5px solid #ef5350;
color: #ef5350;
padding: 0.3rem 0.85rem;
border-radius: 8px;
cursor: pointer;
font-size: 0.85rem;
font-weight: 600;
"
>
<i class="fas fa-sign-out-alt"></i> Logout
</button>
</div>
</nav>
</header>
<main>
<section class="hero-section">
<h1>Welcome to AgriTech Buyer Marketplace</h1>
<p>Connect with farmers and get the freshest produce directly</p>
</section>
<section class="marketplace-grid">
<div class="marketplace-card">
<i class="fas fa-shopping-cart"></i>
<h3>Browse Products</h3>
<p>Explore fresh agricultural products from verified farmers</p>
<a href="marketplace.html" class="btn-primary">View Marketplace</a>
</div>
<div class="marketplace-card">
<i class="fas fa-map-marker-alt"></i>
<h3>Track Orders</h3>
<p>Follow your orders from farm to doorstep</p>
<a href="#" class="btn-primary">Track Shipment</a>
</div>
<div class="marketplace-card">
<i class="fas fa-star"></i>
<h3>Farmer Ratings</h3>
<p>View reviews and ratings of trusted farmers</p>
<a href="#" class="btn-primary">See Ratings</a>
</div>
<div class="marketplace-card">
<i class="fas fa-phone"></i>
<h3>Contact Support</h3>
<p>Get help with your purchases and orders</p>
<a href="contact.html" class="btn-primary">Contact Us</a>
</div>
</section>
</main>
<footer
style="background: #333; color: white; text-align: center; padding: 20px"
>
<p>© 2026 AgriTech. All rights reserved.</p>
</footer>
<script src="firebase-config.js"></script>
<script type="module" src="auth.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
if (!requireAuth()) {
window.location.href = "login.html";
return;
}
const user = window.authManager.getCurrentUser();
if (user && user.role === "buyer") {
document.getElementById("nav-user-name").textContent =
`${user.fullname}`;
document.getElementById("nav-user-name").style.display = "inline";
document.getElementById("nav-logout-btn").style.display =
"inline-block";
document.getElementById("nav-logout-btn").onclick = (e) => {
e.preventDefault();
window.authManager.logout();
};
}
});
</script>
</body>
</html>