forked from omroy07/AgriTech
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
427 lines (378 loc) · 19.3 KB
/
Copy pathindex.html
File metadata and controls
427 lines (378 loc) · 19.3 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=5.0, user-scalable=yes" />
<meta name="description"
content="AgriTech - Empowering Agriculture Through Technology. Connect farmers, buyers, and suppliers in India's agricultural ecosystem." />
<title>AgriTech - Revolutionizing Agriculture with Technology</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />
<link rel="icon" type="image/png" href="images/logo.png">
<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=Open+Sans:wght@300;400;500;600;700&family=Libertinus+Serif:wght@400;600&display=swap"
rel="stylesheet" />
<style>
/* MOST AGGRESSIVE OVERRIDE FIX:
Resets properties known to cause stacking context issues
on html and body, ensuring the z-index works.
*/
html, body {
transform: none !important;
filter: none !important;
perspective: none !important;
clip-path: none !important;
mask: none !important;
mask-image: none !important;
mask-border: none !important;
backdrop-filter: none !important;
opacity: 1 !important;
mix-blend-mode: normal !important;
isolation: auto !important;
will-change: auto !important;
contain: none !important;
/* position: static !important; -- Removing this */
z-index: auto !important;
overflow: visible !important; /* Prevent overflow hidden */
margin: 0; /* Basic reset */
padding: 0; /* Basic reset */
}
/* Keep body background color */
body {
background-color: #030712; /* Fallback */
font-family: 'Open Sans', sans-serif;
color: white; /* Basic text color */
line-height: 1.6;
}
#bg-canvas {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100vh;
z-index: -1; /* Puts it behind all content */
}
/* Make sections stack on top of the background */
/* Ensure these have relative positioning to establish stacking */
.hero,
.features,
.site-footer {
position: relative; /* Essential for z-index stacking */
z-index: 1;
}
.navbar {
/* Must be higher than the page content */
z-index: 100;
/* ... existing background/padding styles ... */
background: rgba(15, 23, 42, 0.8);
backdrop-filter: blur(10px);
padding: 1rem;
border-bottom: 1px solid #334155;
/* REQUIRED: Keep position: relative if it's not fixed/sticky */
position: relative;
}
/* Basic styling to ensure content visibility */
.navbar-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: auto; }
.brand a { color: #22c55e; text-decoration: none; font-size: 1.5rem; font-weight: bold; }
.nav-buttons { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.hero { min-height: 300px; padding: 2rem; display: flex; align-items: center; justify-content: center; text-align: center; }
.hero-content { background: rgba(0,0,0,0.5); padding: 1.5rem; border-radius: 8px; max-width: 700px; margin: auto; position: relative; z-index: 2; }
.features { padding: 2rem; background: rgba(30, 41, 59, 0.7); text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; max-width: 1200px; margin: 2rem auto; }
.feature-card { background: rgba(15, 23, 42, 0.5); padding: 1.5rem; border-radius: 8px; border: 1px solid #334155; }
.site-footer { padding: 2rem; background: rgba(15, 23, 42, 0.9); text-align: center; }
.footer-inner { display: flex; justify-content: space-around; max-width: 1000px; margin: auto; padding-bottom: 1rem; flex-wrap: wrap; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links a { color: #cbd5e1; text-decoration: none; display: block; padding: 0.2rem 0;}
.footer-links a:hover { color: white; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 1rem; margin-top: 1rem; font-size: 0.9rem; color: #94a3b8; }
#chatbotBtn, .scroll-btn { position: fixed; right: 20px; bottom: 20px; width: 50px; height: 50px; border-radius: 50%; background: #16a34a; color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; }
#chatbotBtn { bottom: 80px; opacity: 1; visibility: visible; } /* Keep chatbot visible */
.scroll-btn.visible { opacity: 1; visibility: visible; }
.serif { font-family: 'Libertinus Serif', serif; }
.btn { padding: 0.5rem 1rem; border-radius: 8px; text-decoration: none; font-weight: 500; font-size: 0.875rem; transition: all 0.2s ease; border: none; cursor: pointer; display: inline-block; margin: 0 0.25rem; background: #334155; color: white;}
.btn-primary { background: #16a34a; }
.btn-secondary { background: transparent; border: 1px solid #4a5568; }
/* --- Styles below might be duplicated if style.css is re-enabled --- */
/* Minimal Services Dropdown Styles for visibility */
.services-toggle-container { position: relative; display: inline-block; }
.services-dropdown { position: absolute; top: 100%; left: 0; background: #1e293b; z-index: 1000;border: 1px solid #334155; border-radius: 0.5rem; opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 1000; min-width: 200px; margin-top: 0.5rem; padding: 0.5rem; }
.services-dropdown.active { opacity: 1; visibility: visible; z-index: 1000; }
.services-list { list-style: none; padding: 0; margin: 0; }
.services-list a { color: #cbd5e1; text-decoration: none; display: block; padding: 0.5rem; border-radius: 4px; }
.services-list a:hover { background: #334155; color: white; }
</style>
</head>
<body>
<canvas id="bg-canvas"></canvas>
<nav class="navbar">
<div class="navbar-content">
<div class="brand" style="display: flex; align-items: center; gap: 10px;">
<img src="images/logo.png" alt="AgriTech logo" class="footer-logo" style="width: 45px; height: 45px; background: white; padding: 5px; border-radius: 8px;">
<a href="#" class="logo" style="font-size: 1.5rem; font-weight: bold; text-decoration: none; color: inherit;">AgriTech</a>
</div>
<div class="nav-buttons">
<div class="search-container" style="position: relative; display: inline-block;">
<input type="text" placeholder="Search..." class="search-input" style="padding: 0.5rem; border-radius: 4px; border: 1px solid #555; background: #333; color: white;" autocomplete="off" />
<button class="search-button" style="padding: 0.5rem; background: #22c55e; border: none; border-radius: 4px; color: white; cursor: pointer;"><i class="fas fa-search"></i></button>
<div class="live-suggest-list" style="display:none; position: absolute; top: 100%; left: 0; background: white; border: 1px solid #ccc; z-index: 10;"></div>
</div>
<div class="services-toggle-container">
<button class="services-toggle btn" aria-label="Toggle services menu">
<i class="fas fa-cogs"></i>
<span class="services-text">Services</span>
<i class="fas fa-chevron-down services-arrow" style="transition: transform 0.3s;"></i>
</button>
<div class="services-dropdown">
<ul class="services-list">
<li><a href="crop.html"><i class="fas fa-seedling"></i> Smart Crop Monitoring</a></li>
<li><a href="supply-chain.html"><i class="fas fa-truck"></i> Supply Chain Support</a></li>
<li><a href="sustainable-farming.html"><i class="fas fa-leaf"></i> Sustainable Farming Guidance</a></li>
<li><a href="marketplace.html"><i class="fas fa-store"></i> Marketplace Services</a></li>
<li><a href="financial-support.html"><i class="fas fa-dollar-sign"></i> Financial & Insurance Support</a></li>
</ul>
</div>
</div>
<button class="theme-toggle btn" aria-label="Toggle dark/light mode">
<i class="fas fa-sun sun-icon" style="display: none;"></i>
<i class="fas fa-moon moon-icon"></i>
<span class="theme-text">Dark</span>
</button>
<a href="about.html" class="btn btn-secondary">About</a>
<a href="blog.html" class="btn btn-secondary">Blog</a>
<a href="login.html" class="btn btn-secondary">Login</a>
<a href="faq.html" class="btn btn-secondary">FAQ</a>
<a href="register.html" class="btn btn-primary">Register</a>
</div>
</div>
</nav>
<section class="hero">
<div class="hero-content">
<h2 class="serif">Empowering Agriculture Through Technology</h2>
<p>AgriTech connects <strong>Farmers</strong>, <strong>Buyers</strong>,
<strong>Equipment Suppliers</strong>, and <strong>Grocery Sellers</strong>
to revolutionize India's agricultural ecosystem through smart solutions and seamless collaboration.</p>
</div>
</section>
<section class="features loading">
<div class="features-container">
<h2 class="features-title serif">Our Platform Benefits</h2>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">🌱</div>
<h3 class="feature-title serif">For Farmers</h3>
<p class="feature-description">Direct access to buyers, fair pricing, and equipment rental services to maximize harvest potential.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🏪</div>
<h3 class="feature-title serif">For Buyers</h3>
<p class="feature-description">Source fresh produce directly from verified farmers with transparent pricing and quality assurance.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🚜</div>
<h3 class="feature-title serif">Equipment Suppliers</h3>
<p class="feature-description">Expand your reach and connect with farmers needing modern agricultural equipment.</p>
</div>
<div class="feature-card">
<div class="feature-icon">🛒</div>
<h3 class="feature-title serif">Grocery Sellers</h3>
<p class="feature-description">Access fresh produce with reliable supply chain and competitive costs.</p>
</div>
</div>
</div>
</section>
<footer class="site-footer">
<div class="footer-inner">
<div class="footer-brand">
<div class="brand-header">
<img src="images/logo.png" alt="AgriTech logo" class="footer-logo" style="width: 50px; height: 50px; background: white; padding: 5px; border-radius: 8px;"> <h3 class="serif">AgriTech</h3>
</div>
<p>Empowering India's Farming Future with innovative technology connecting every stakeholder.</p>
</div>
<div class="footer-links">
<h4 class="serif">Quick Links</h4>
<ul>
<li><a href="index.html"><i class="fas fa-home"></i> Home</a></li>
<li><a href="login.html"><i class="fas fa-tachometer-alt"></i> Dashboard</a></li>
<li><a href="feed-back.html"><i class="fas fa-comment-dots"></i> Feedback</a></li>
<li><a href="chat.html"><i class="fas fa-robot"></i> AI Assistant</a></li>
<li><a href="terms-and-service.html"><i class="fas fa-file-contract"></i> Terms & Service</a></li>
</ul>
</div>
<div class="footer-links"> <h4 class="serif">Contact</h4>
<ul>
<li><a href="#"><i class="fas fa-envelope"></i> Email Us</a></li>
<li><a href="#"><i class="fas fa-phone"></i> Call Us</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2025 AgriTech. All rights reserved.</p>
</div>
</footer>
<a href="chat.html" id="chatbotBtn" title="Chat with us" aria-label="AI Assistant"><i class="fas fa-robot"></i></a>
<button class="scroll-btn" id="scrollBtn" title="Scroll">
<i class="fas fa-arrow-down" id="scrollIcon"></i>
</button>
<script type="importmap">
{
"imports": {
"three": "https://unpkg.com/three@0.158.0/build/three.module.js"
}
}
</script>
<script type="module">
import * as THREE from 'three';
// 1. Setup
// --------------------------------
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
camera.position.set(0, 3, 10); // Set camera position
const renderer = new THREE.WebGLRenderer({
canvas: document.querySelector('#bg-canvas'),
alpha: true // Make canvas background transparent
});
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); // Added for sharpness
// 2. Create the Grid
// --------------------------------
const geometry = new THREE.PlaneGeometry(20, 20, 40, 40); // 20x20 units, 40x40 segments
const material = new THREE.MeshBasicMaterial({
color: 0x22c55e, // AgriTech green
wireframe: true
});
const plane = new THREE.Mesh(geometry, material);
plane.rotation.x = -Math.PI / 2; // Rotate plane to be horizontal
scene.add(plane);
// Store the original vertex positions
const originalPositions = plane.geometry.attributes.position.array.slice();
const clock = new THREE.Clock();
// 3. Handle Mouse Movement
// --------------------------------
const mouse = new THREE.Vector2(0, 0); // Initialize mouse coordinates
const targetMouse = new THREE.Vector2(0, 0); // Target for smoother movement
window.addEventListener('mousemove', (event) => {
// Normalize mouse position (-1 to 1) for target
targetMouse.x = (event.clientX / window.innerWidth) * 2 - 1;
targetMouse.y = -(event.clientY / window.innerHeight) * 2 + 1;
});
// 4. Animation Loop
// --------------------------------
function animate() {
const t = clock.getElapsedTime();
// Smoothly interpolate mouse position towards the target
mouse.x += (targetMouse.x - mouse.x) * 0.05;
mouse.y += (targetMouse.y - mouse.y) * 0.05;
const positions = plane.geometry.attributes.position.array;
// Map smoothed mouse's -1 to 1 range to our grid's 20x20 world-space
const mouseWorld = new THREE.Vector2(mouse.x * 10, mouse.y * 10);
// Loop through all vertices
for (let i = 0; i < positions.length; i += 3) {
const x = originalPositions[i];
const y = originalPositions[i + 1];
// 1. Base wave
const baseWave = Math.sin(x * 0.5 + t * 0.5) * 0.1 +
Math.sin(y * 0.5 + t * 0.5) * 0.1;
// 2. Cursor ripple
const dist = new THREE.Vector2(x, y).distanceTo(mouseWorld);
const influence = Math.max(0, 1 - dist / 5); // Radius of 5
const ripple = Math.sin(dist * 2 - t * 2) * influence * 0.3;
// 3. Apply both waves to the z-position (index i + 2)
positions[i + 2] = baseWave + ripple;
}
// Tell Three.js the geometry has been updated
plane.geometry.attributes.position.needsUpdate = true;
// Render the scene
renderer.render(scene, camera);
// Call animate again on the next frame
requestAnimationFrame(animate);
}
// 5. Handle Window Resizing
// --------------------------------
window.addEventListener('resize', () => {
camera.aspect = window.innerWidth / window.innerHeight;
camera.updateProjectionMatrix();
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2)); // Update pixel ratio on resize
});
// Start the animation!
animate();
</script>
<script>
// THEME + DROPDOWN LOGIC
const themeToggle = document.querySelector('.theme-toggle');
const themeText = document.querySelector('.theme-text');
const sunIcon = document.querySelector('.sun-icon');
const moonIcon = document.querySelector('.moon-icon');
const applyTheme = (theme) => {
document.documentElement.setAttribute('data-theme', theme);
localStorage.setItem('theme', theme);
if (theme === 'dark') {
themeText.textContent = 'Light';
moonIcon.style.display = 'none';
sunIcon.style.display = 'inline-block';
} else {
themeText.textContent = 'Dark';
moonIcon.style.display = 'inline-block';
sunIcon.style.display = 'none';
}
};
const savedTheme = localStorage.getItem('theme') || 'dark'; // Default to dark if nothing saved
applyTheme(savedTheme);
themeToggle.addEventListener('click', () => {
const current = document.documentElement.getAttribute('data-theme');
const next = current === 'light' ? 'dark' : 'light';
applyTheme(next);
});
const servicesToggle = document.querySelector('.services-toggle');
const servicesDropdown = document.querySelector('.services-dropdown');
const servicesArrow = document.querySelector('.services-arrow');
if (servicesToggle && servicesDropdown && servicesArrow) { // Add checks
servicesToggle.addEventListener('click', (event) => {
event.stopPropagation(); // Prevent click from closing immediately
servicesDropdown.classList.toggle('active');
servicesArrow.classList.toggle('rotated');
});
// Close dropdown if clicking outside
document.addEventListener('click', (e) => {
const container = document.querySelector('.services-toggle-container');
// Check if dropdown exists and is active before trying to remove class
if (container && !container.contains(e.target) && servicesDropdown.classList.contains('active')) {
servicesDropdown.classList.remove('active');
servicesArrow.classList.remove('rotated');
}
});
} else {
console.error("Could not find all elements for services dropdown.");
}
// SCROLL BUTTON
const scrollBtn = document.getElementById("scrollBtn");
const scrollIcon = document.getElementById("scrollIcon");
if (scrollBtn && scrollIcon) { // Add checks
window.addEventListener("scroll", () => {
// Show button only when scrolled down
if (window.scrollY > 300) {
scrollBtn.style.opacity = '1';
scrollBtn.style.visibility = 'visible';
scrollIcon.classList.remove("fa-arrow-down"); // More robust class change
scrollIcon.classList.add("fa-arrow-up");
} else {
// Option 1: Hide completely when near top
scrollBtn.style.opacity = '0';
scrollBtn.style.visibility = 'hidden';
// Ensure icon is down arrow when hidden/at top
scrollIcon.classList.remove("fa-arrow-up");
scrollIcon.classList.add("fa-arrow-down");
}
});
scrollBtn.addEventListener("click", () => {
if (scrollIcon.classList.contains("fa-arrow-up")) {
window.scrollTo({top: 0, behavior: "smooth"});
}
});
} else {
console.error("Could not find scroll button or icon elements.");
}
</script>
</body>
</html>