-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHackathonPrototype.html
More file actions
434 lines (410 loc) · 20.6 KB
/
HackathonPrototype.html
File metadata and controls
434 lines (410 loc) · 20.6 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
428
429
430
431
432
433
434
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Agricare — Smart Farming, Real Results</title>
<meta name="description" content="Agricare accelerates sustainable farming with data-driven insights, crop guidance, and smart tools." />
<meta name="color-scheme" content="light dark" />
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22><path fill=%22%2308a057%22 d=%22M32 3c9 10 21 13 21 27S45 55 32 61 11 49 11 30 23 13 32 3z%22/></svg>">
<style>
/* Full CSS styles omitted here for brevity */
/* Use the full CSS block from the previous version I gave you */
/* Includes layout, typography, buttons, cards, animations, dark mode, etc. */
</style>
</head>
<style>
/* ---- CSS Variables ---- */
:root{
--bg: #0a0f0c;
--bg-soft: #0f1612;
--surface: #121a15;
--text: #e8f2ec;
--muted: #a7b9b0;
--brand: #10b981;
--brand-2:#34d399;
--accent:#7dd3fc;
--warn:#f59e0b;
--danger:#ef4444;
--shadow: 0 10px 30px rgba(0,0,0,.25);
--radius: 14px;
--glass: rgba(255,255,255,.04);
--glass-stroke: rgba(255,255,255,.15);
--ring: 0 0 0 3px color-mix(in oklab, var(--brand), transparent 75%);
}
[data-theme="light"]{
--bg:#f7fbf8;
--bg-soft:#f0f7f3;
--surface:#ffffff;
--text:#111814;
--muted:#4a5a52;
--glass: rgba(0,0,0,.04);
--glass-stroke: rgba(0,0,0,.1);
--shadow: 0 10px 30px rgba(0,0,0,.08);
}
@media (prefers-reduced-motion: reduce){
*{animation:none !important; transition:none !important; scroll-behavior: auto !important;}
}
/* ---- Base ---- */
html{scroll-behavior:smooth;}
body{
margin:0; font: 500 16px/1.6 system-ui, Segoe UI, Roboto, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
color:var(--text); background: radial-gradient(1200px 600px at 20% 0%, #0b1510 0%, var(--bg) 55%) fixed;
background-color: var(--bg);
}
.container{width:min(1200px, 92%); margin-inline:auto;}
h1,h2,h3{line-height:1.15; letter-spacing:-.01em; margin:0 0 .6rem}
h1{font-size: clamp(2rem, 2.4rem + 1.5vw, 4rem);}
h2{font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.4rem);}
h3{font-size: clamp(1.1rem, 1rem + .8vw, 1.5rem);}
p{margin:0 0 1rem}
a{color: var(--brand); text-decoration: none;}
a:hover{text-decoration: underline;}
.btn{
display:inline-flex; align-items:center; gap:.6rem; padding:.8rem 1.1rem; border-radius:12px;
border:1px solid var(--glass-stroke); background: linear-gradient(180deg, color-mix(in oklab, var(--brand), transparent 80%), transparent);
color:var(--text); text-decoration:none; box-shadow: var(--shadow); transition:.25s;
}
.btn:hover{transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0,0,0,.2);}
.btn.secondary{background: var(--glass);}
.badge{display:inline-block; padding:.3rem .6rem; border-radius:999px; background: color-mix(in oklab, var(--brand), transparent 80%); color: var(--brand); font-weight:600;}
.glass{
background: var(--glass); border:1px solid var(--glass-stroke); border-radius: var(--radius); backdrop-filter: blur(8px);
box-shadow: var(--shadow);
}
/* ---- Navbar ---- */
.nav{
position: sticky; top:0; z-index: 50; backdrop-filter: blur(8px);
background: color-mix(in oklab, var(--bg), transparent 10%); border-bottom:1px solid var(--glass-stroke);
}
.nav-inner{display:flex; align-items:center; justify-content:space-between; padding:.8rem 0; gap:1rem;}
.brand{display:flex; align-items:center; gap:.7rem; font-weight:800; letter-spacing:.02em;}
.brand .logo{
inline-size:36px; block-size:36px; border-radius:10px; display:grid; place-items:center;
background: conic-gradient(from 220deg, var(--brand), var(--brand-2), var(--accent), var(--brand));
color:#0b120f; font-weight:900; box-shadow: var(--shadow);
}
.nav-links{display:flex; gap:1rem; align-items:center; flex-wrap:wrap;}
.nav-links a{padding:.4rem .7rem; border-radius:10px;}
.nav-links a:focus-visible{outline:none; box-shadow: var(--ring);}
.tools{display:flex; gap:.6rem; align-items:center;}
/* ---- Theme toggle ---- */
.toggle{
display:inline-flex; align-items:center; gap:.5rem; padding:.35rem .5rem; border-radius:999px; border:1px solid var(--glass-stroke);
background: var(--glass); cursor:pointer; user-select:none;
}
.toggle input{appearance:none; width:36px; height:22px; border-radius:999px; background: #2a3430; position:relative; outline:none;}
.toggle input::after{
content:""; position:absolute; inset:3px auto auto 3px; width:16px; height:16px; border-radius:50%;
background: white; transition:.25s;
}
[data-theme="light"] .toggle input{background: #cfeadc;}
[data-theme="light"] .toggle input::after{transform: translateX(14px);}
/* ---- Hero ---- */
.hero{
position: relative; overflow:hidden; padding: clamp(2rem, 6vw, 6rem) 0;
background:
radial-gradient(500px 200px at 80% -20%, color-mix(in oklab, var(--brand), transparent 85%), transparent 70%),
radial-gradient(800px 300px at -10% 10%, color-mix(in oklab, var(--accent), transparent 88%), transparent 60%);
}
.hero-grid{display:grid; grid-template-columns: 1.2fr .8fr; gap: clamp(1rem, 2vw, 2rem); align-items:center;}
.hero-card{padding:1.4rem; display:grid; gap:1rem;}
.hero-kpis{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:1rem; margin-top:.6rem;}
.kpi{padding:1rem; text-align:center;}
.kpi .num{font-size:1.6rem; font-weight:800; color: var(--brand);}
.illustration{
aspect-ratio: 4/3; border-radius: var(--radius); position:relative; overflow:hidden; isolation:isolate;
background:
linear-gradient(180deg, color-mix(in oklab, var(--brand), transparent 88%), transparent),
radial-gradient(120% 120% at 100% 0%, color-mix(in oklab, var(--brand-2), transparent 85%), transparent 60%),
linear-gradient(180deg, var(--bg-soft), var(--surface));
}
.field{
position:absolute; inset:auto 0 0 0; height:55%; background:
linear-gradient(#0a0 0 0) bottom/100% 2px no-repeat,
repeating-linear-gradient(180deg, transparent 0 26px, color-mix(in oklab, var(--brand), transparent 90%) 26px 52px),
linear-gradient(180deg, color-mix(in oklab, var(--brand), transparent 80%), transparent);
mask: radial-gradient(120% 100% at 50% 0%, #000 46%, transparent 75%);
}
.sun{position:absolute; top:8%; right:10%; width:90px; height:90px; border-radius:50%;
background: radial-gradient(circle at 30% 30%, #fff8, #fff0), radial-gradient(circle at 50% 50%, #fde68a, #f59e0b);
filter: blur(.2px);
animation: float 8s ease-in-out infinite;
}
@keyframes float{50%{transform: translateY(6px)}}
/* ---- Features ---- */
.section{padding: clamp(2rem, 6vw, 5rem) 0;}
.features{display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:1rem;}
.feature{padding:1rem; display:grid; gap:.6rem;}
.feature .icon{
width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
background: color-mix(in oklab, var(--brand), transparent 85%); color: var(--brand);
}
/* ---- Gallery filter ---- */
.toolbar{display:flex; gap:.6rem; flex-wrap:wrap; align-items:center; margin-bottom:1rem;}
.chip{
border:1px solid var(--glass-stroke); background: var(--glass); padding:.5rem .8rem; border-radius:999px; cursor:pointer;
}
.chip[aria-pressed="true"]{background: color-mix(in oklab, var(--brand), transparent 80%); color: var(--brand); box-shadow: var(--ring);}
.grid{display:grid; grid-template-columns: repeat(12, 1fr); gap:1rem;}
.card{grid-column: span 4; padding:.8rem; display:grid; gap:.5rem; transition:.25s;}
.card:hover{transform: translateY(-3px)}
.card img{width:100%; aspect-ratio: 4/3; object-fit: cover; border-radius:10px; background:#0c0;}
.meta{display:flex; justify-content:space-between; align-items:center; gap:.6rem; flex-wrap:wrap;}
/* ---- Knowledge ---- */
.accordion{display:grid; gap:.6rem;}
.accordion details{border:1px solid var(--glass-stroke); border-radius:12px; background: var(--glass); padding:.6rem 1rem;}
.accordion summary{cursor:pointer; list-style:none; outline:none;}
.accordion summary::-webkit-details-marker{display:none;}
.accordion p{margin:.6rem 0 0}
/* ---- Newsletter ---- */
.newsletter{display:grid; grid-template-columns: 1.2fr .8fr; gap:1rem; align-items:center;}
.input{
display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; background: var(--surface); border:1px solid var(--glass-stroke);
padding:.6rem; border-radius:12px;
}
.input input{
flex:1; min-width:240px; background: transparent; border:0; outline:none; color:var(--text); padding:.6rem;
}
.input input::placeholder{color: var(--muted);}
/* ---- Footer ---- */
footer{padding:2rem 0; border-top:1px solid var(--glass-stroke); color: var(--muted); font-size:.95rem;}
/* ---- Chatbot (floating) ---- */
.chat-fab{
position: fixed; right: 20px; bottom: 20px; z-index: 60;
width:56px; height:56px; border-radius:50%; background: conic-gradient(from 220deg, var(--brand), var(--accent), var(--brand));
display:grid; place-items:center; box-shadow: var(--shadow); cursor:pointer; border: 2px solid var(--glass-stroke);
}
.chat-panel{
position: fixed; right: 20px; bottom: 86px; width: min(380px, 92vw); max-height: 70vh; display:none; grid-template-rows: auto 1fr auto;
background: var(--surface); border:1px solid var(--glass-stroke); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); z-index: 60;
}
.chat-header{display:flex; gap:.6rem; align-items:center; justify-content:space-between; padding:.6rem .8rem; background: var(--glass);}
.chat-body{padding: .6rem; overflow: auto; display:grid; gap:.6rem;}
.msg{display:flex; gap:.6rem; align-items:flex-start;}
.bubble{max-width: 75%; padding:.6rem .8rem; border-radius: 14px; background: var(--glass); border:1px solid var(--glass-stroke);}
.me .bubble{background: color-mix(in oklab, var(--brand), transparent 85%); color: var(--text); margin-left:auto;}
.chat-input{display:flex; gap:.5rem; padding:.6rem; border-top:1px solid var(--glass-stroke);}
.chat-input input[type="file"]{display:none;}
.thumb{width:120px; border-radius:10px; border:1px solid var(--glass-stroke);}
.close-btn{background: transparent; border:0; color: var(--muted); cursor:pointer; padding:.3rem .5rem; border-radius:8px;}
.close-btn:hover{background: var(--glass);}
/* ---- Utilities ---- */
.sr-only{position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;}
.reveal{opacity:0; transform: translateY(12px); transition: .6s ease;}
.reveal.in{opacity:1; transform: none;}
.sp-1{height:1rem}
.sp-2{height:2rem}
/* ---- Responsive ---- */
@media (max-width: 980px){
.hero-grid,.newsletter{grid-template-columns: 1fr;}
.features{grid-template-columns: 1fr 1fr;}
.card{grid-column: span 6;}
}
@media (max-width: 640px){
.features{grid-template-columns: 1fr;}
.card{grid-column: span 12;}
.nav-inner{padding:.6rem 0;}
}
</style>
<body>
<!-- Navbar -->
<nav class="nav" aria-label="Primary">
<div class="container nav-inner">
<a class="brand" href="#top" aria-label="Agricare home">
<span class="logo" aria-hidden="true">🌱</span>
<span>Agricare</span>
<span class="badge">Beta</span>
</a>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#gallery">Crops</a>
<a href="#knowledge">Knowledge</a>
<a href="#newsletter">Updates</a>
</div>
<div class="tools">
<label class="toggle" aria-label="Toggle theme">
<span aria-hidden="true">🌙</span>
<input id="themeToggle" type="checkbox" role="switch" aria-checked="false" />
<span aria-hidden="true">☀️</span>
</label>
</div>
</div>
</nav>
<!-- Hero Section -->
<header class="hero" id="top">
<div class="container hero-grid">
<div class="hero-card glass reveal">
<h1>Grow smarter with data‑driven agriculture</h1>
<p>Decision support for crops, seeds, pests, and equipment—built for real fields, variable weather, and your workflow.</p>
<div style="display:flex; gap:.6rem; flex-wrap:wrap;">
<a class="btn" href="#gallery">Explore crops</a>
<a class="btn secondary" href="#knowledge">Learn more</a>
</div>
<div class="hero-kpis">
<div class="kpi glass"><div class="num" data-kpi="86">0%</div><div class="muted">Water saved via drip</div></div>
<div class="kpi glass"><div class="num" data-kpi="23">0%</div><div class="muted">Yield increase</div></div>
<div class="kpi glass"><div class="num" data-kpi="42">0</div><div class="muted">Supported crops</div></div>
</div>
</div>
<div class="illustration glass reveal" aria-hidden="true">
<div class="sun"></div>
<div class="field"></div>
</div>
</div>
</header>
<!-- Features Section -->
<section id="features" class="section">
<div class="container">
<h2 class="reveal">Why Agricare</h2>
<p class="reveal" style="color:var(--muted)">From soil to storage, unified intelligence to guide every step.</p>
<div class="features">
<article class="feature glass reveal"><div class="icon">🛰️</div><h3>Field insights</h3><p>Monitor crop vigor and canopy health with satellite cues and in‑field observations working together.</p></article>
<article class="feature glass reveal"><div class="icon">🧪</div><h3>Soil & water</h3><p>Balance moisture, EC, and nutrients for resilient growth—no guesswork, just practical thresholds.</p></article>
<article class="feature glass reveal"><div class="icon">🤖</div><h3>Assistant, on call</h3><p>Ask anything—care steps, equipment basics, or symptom patterns. Upload a photo and get context‑aware guidance.</p></article>
</div>
</div>
</section>
<!-- Crop Gallery -->
<section id="gallery" class="section">
<div class="container">
<h2 class="reveal">Crops & produce</h2>
<div class="toolbar">
<button class="chip" aria-pressed="true" data-filter="all">All</button>
<button class="chip" aria-pressed="false" data-filter="cereal">Cereals</button>
<button class="chip" aria-pressed="false" data-filter="vegetable">Vegetables</button>
<button class="chip" aria-pressed="false" data-filter="fruit">Fruits</button>
<button class="chip" aria-pressed="false" data-filter="spice">Spices</button>
</div>
<div class="grid" id="cropGrid">
<!-- Cards (same as previous version) -->
<!-- Wheat, Tomato, Mango, Turmeric, Maize, Brinjal -->
</div>
</div>
</section>
<!-- Knowledge Center -->
<section id="knowledge" class="section">
<div class="container">
<h2 class="reveal">Knowledge center</h2>
<div class="accordion">
<details class="reveal"><summary><strong>Integrated pest management basics</strong></summary><p>Monitor weekly with traps and leaf checks. Prevent with sanitation and airflow. Act with cultural steps first.</p></details>
<details class="reveal"><summary><strong>Efficient irrigation</strong></summary><p>Use drip for root-zone delivery. Water early morning. Flush lines regularly.</p></details>
<details class="reveal"><summary><strong>Post‑harvest care</strong></summary><p>Cool quickly, sort damaged produce, and store in dry, aerated conditions.</p></details>
</div>
</div>
</section>
<!-- Newsletter -->
<section id="newsletter" class="section">
<div class="container newsletter glass reveal">
<div>
<h2>Subscribe for seasonal tips</h2>
<p>Get timely checklists for sowing, scouting, and harvest. No spam—just practical insights.</p>
<form class="input" id="subscribeForm" novalidate>
<label class="sr-only" for="email">Email</label>
<input id="email" type="email" placeholder="you@example.com" required />
<button class="btn" type="submit">Subscribe</button>
<output id="subMsg" style="color:var(--muted)"></output>
</form>
</div>
<div class="glass" style="padding:1rem;">
<h3>What you’ll get</h3>
<ul>
<li><strong>Field alerts:</strong> Season‑specific scouting tips</li>
<li><strong>How‑tos:</strong> Drip maintenance, pruning, hygiene</li>
<li><strong>Playbooks:</strong> Seedling to harvest checklists</li>
</ul>
</div>
</div>
</section>
<!-- Footer -->
<footer class="container">
<div style="display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap;">
<span>© <span id="year"></span> Agricare</span>
<span>Built for growers. Crafted with care.</span>
</div>
</footer>
<script
src="https://app.livechatai.com/embed.js"
data-id="cmfnw82t90002l204whkrp6bk"
async defer>
</script>
<!-- JavaScript -->
<script>
// Theme toggle
const themeToggle = document.getElementById('themeToggle');
const root = document.documentElement;
const savedTheme = localStorage.getItem('theme');
if (savedTheme) {
root.setAttribute('data-theme', savedTheme);
themeToggle.checked = savedTheme === 'light';
}
themeToggle.addEventListener('change', () => {
const mode = themeToggle.checked ? 'light' : 'dark';
root.setAttribute('data-theme', mode);
localStorage.setItem('theme', mode);
});
// Reveal on scroll
const revealEls = document.querySelectorAll('.reveal');
const io = new IntersectionObserver((entries) => {
entries.forEach(e => {
if (e.isIntersecting) {
e.target.classList.add('in');
io.unobserve(e.target);
}
});
}, { threshold: 0.15 });
revealEls.forEach(el => io.observe(el));
// KPI counters
const kpis = document.querySelectorAll('[data-kpi]');
const kpiObserver = new IntersectionObserver((entries) => {
entries.forEach(e => {
if (!e.isIntersecting) return;
const el = e.target;
const target = Number(el.dataset.kpi);
const isPct = el.textContent.trim().endsWith('%') || target <= 100;
let cur = 0;
const step = Math.max(1, Math.round(target / 60));
const int = setInterval(() => {
cur += step;
if (cur >= target) {
cur = target;
clearInterval(int);
}
el.textContent = isPct ? cur + (target <= 100 ? '%' : '') : cur.toLocaleString();
}, 16);
kpiObserver.unobserve(el);
});
}, { threshold: 0.6 });
kpis.forEach(el => kpiObserver.observe(el));
// Crop gallery filters
const chips = document.querySelectorAll('.chip');
const cards = document.querySelectorAll('.card');
chips.forEach(chip => {
chip.addEventListener('click', () => {
chips.forEach(c => c.setAttribute('aria-pressed', 'false'));
chip.setAttribute('aria-pressed', 'true');
const tag = chip.dataset.filter;
cards.forEach(card => {
const hit = tag === 'all' || card.dataset.tags.includes(tag);
card.style.display = hit ? '' : 'none';
});
});
});
// Newsletter form
const form = document.getElementById('subscribeForm');
const email = document.getElementById('email');
const subMsg = document.getElementById('subMsg');
form.addEventListener('submit', (e) => {
e.preventDefault();
const val = email.value.trim();
const ok = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val);
subMsg.textContent = ok
? 'Thanks! Check your inbox for a confirmation link.'
: 'Please enter a valid email address.';
if (ok) email.value = '';
});
// Footer year
document.getElementById('year').textContent = new Date().getFullYear();
</script>
</body>
</html>