|
12 | 12 | href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" |
13 | 13 | rel="stylesheet" |
14 | 14 | /> |
| 15 | + <link rel="stylesheet" href="../../theme.css" /> |
15 | 16 | <style> |
16 | 17 | * { |
17 | 18 | box-sizing: border-box; |
| 19 | + transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease; |
18 | 20 | } |
19 | 21 |
|
20 | 22 | body { |
21 | 23 | font-family: "Poppins", sans-serif; |
22 | | - background: linear-gradient(135deg, #d4fc79, #96e6a1); |
| 24 | + background-color: var(--bg-secondary, #d4fc79); |
| 25 | + color: var(--text-primary, #333); |
23 | 26 | background-size: 400% 400%; |
24 | 27 | animation: gradientShift 8s ease infinite; |
25 | 28 | margin: 0; |
|
43 | 46 | } |
44 | 47 |
|
45 | 48 | .container { |
46 | | - background: rgba(255, 255, 255, 0.95); |
| 49 | + background: var(--bg-primary, rgba(255, 255, 255, 0.95)); |
47 | 50 | backdrop-filter: blur(10px); |
48 | 51 | padding: 50px 40px; |
49 | 52 | border-radius: 24px; |
50 | | - box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), |
51 | | - 0 10px 20px rgba(0, 0, 0, 0.05), |
| 53 | + box-shadow: 0 20px 40px var(--shadow-medium, rgba(0, 0, 0, 0.1)), |
| 54 | + 0 10px 20px var(--shadow-light, rgba(0, 0, 0, 0.05)), |
52 | 55 | inset 0 1px 0 rgba(255, 255, 255, 0.8); |
53 | 56 | text-align: center; |
54 | 57 | max-width: 700px; |
|
57 | 60 | overflow: hidden; |
58 | 61 | transform: translateY(0); |
59 | 62 | animation: slideIn 0.8s ease-out; |
| 63 | + color: var(--text-primary, #333); |
60 | 64 | } |
61 | 65 |
|
62 | 66 | @keyframes slideIn { |
|
97 | 101 |
|
98 | 102 | h1 { |
99 | 103 | margin-bottom: 40px; |
100 | | - color: #2e7d32; |
| 104 | + color: var(--primary-green, #2e7d32); |
101 | 105 | font-size: 32px; |
102 | 106 | font-weight: 700; |
103 | 107 | text-shadow: 0 2px 4px rgba(46, 125, 50, 0.1); |
|
122 | 126 | border-radius: 12px; |
123 | 127 | font-size: 16px; |
124 | 128 | font-family: inherit; |
125 | | - background: rgba(255, 255, 255, 0.9); |
| 129 | + background: var(--bg-primary, rgba(255, 255, 255, 0.9)); |
| 130 | + color: var(--text-primary, #333); |
126 | 131 | transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); |
127 | 132 | outline: none; |
128 | 133 | } |
129 | 134 |
|
130 | 135 | .input-group input:focus { |
131 | 136 | border-color: #66bb6a; |
132 | | - background: #ffffff; |
| 137 | + background: var(--bg-primary, #ffffff); |
133 | 138 | box-shadow: 0 0 0 3px rgba(102, 187, 106, 0.1), |
134 | 139 | 0 4px 12px rgba(102, 187, 106, 0.15); |
135 | 140 | transform: translateY(-2px); |
|
140 | 145 | } |
141 | 146 |
|
142 | 147 | .input-group input::placeholder { |
143 | | - color: #81c784; |
| 148 | + color: var(--text-muted, #81c784); |
144 | 149 | font-weight: 500; |
145 | 150 | } |
146 | 151 |
|
|
378 | 383 | <body> |
379 | 384 | <header></header> |
380 | 385 | <div class="container"> |
| 386 | + <div style="position: absolute; top: 20px; right: 20px;"> |
| 387 | + <button class="theme-toggle" aria-label="Toggle dark/light mode" style="background: rgba(46, 125, 50, 0.1); border: 1px solid rgba(46, 125, 50, 0.3); color: #2e7d32; padding: 8px 12px; border-radius: 20px; font-size: 12px;"> |
| 388 | + <i class="fas fa-sun sun-icon"></i> |
| 389 | + <i class="fas fa-moon moon-icon"></i> |
| 390 | + <span class="theme-text">Light</span> |
| 391 | + </button> |
| 392 | + </div> |
| 393 | + |
381 | 394 | <h1>🌾 Crop Recommendation System</h1> |
382 | 395 |
|
383 | 396 | <form action="/" method="POST" id="cropForm"> |
@@ -554,5 +567,6 @@ <h1>🌾 Crop Recommendation System</h1> |
554 | 567 | }); |
555 | 568 | }); |
556 | 569 | </script> |
| 570 | + <script src="../../theme.js"></script> |
557 | 571 | </body> |
558 | 572 | </html> |
0 commit comments