Skip to content

Commit

Permalink
some prettey add-ons
Browse files Browse the repository at this point in the history
  • Loading branch information
ombhojane committed Feb 14, 2024
1 parent fdc4070 commit 4475a90
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
8 changes: 4 additions & 4 deletions static/predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ tailwind.init();
var farmImage = document.getElementById('farmImage');

if (landSize >= 1 && landSize < 10) {
farmImage.src = 'https://i.postimg.cc/RCw9z1Kv/Screenshot-2024-02-14-205114.png';
farmImage.src = 'https://i.postimg.cc/wMbRn1ry/small.png';
farmImage.classList.remove('hidden');
} else if (landSize >= 10 && landSize < 20) {
farmImage.src = 'https://github.com/ombhojane/chalokisaanai/blob/main/assets/mid.png?raw=true';
farmImage.src = 'https://i.postimg.cc/tTBsV1pS/mid.png';
farmImage.classList.remove('hidden');
} else if (landSize >= 20 && landSize < 25) {
farmImage.src = 'https://github.com/ombhojane/chalokisaanai/blob/main/assets/large.png?raw=true';
farmImage.src = 'https://i.postimg.cc/7ZzJQYnh/extramid.png';
farmImage.classList.remove('hidden');
} else if (landSize >= 25) {
farmImage.src = 'https://github.com/ombhojane/chalokisaanai/blob/main/assets/extramid.png?raw=true';
farmImage.src = 'https://i.postimg.cc/k5F6q1Zd/large.png';
farmImage.classList.remove('hidden');
} else {
farmImage.classList.add('hidden');
Expand Down
21 changes: 20 additions & 1 deletion templates/generate.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h2 class="text-xl font-bold text-green-600">
<div class="form-section">
<label class="font-semibold text-lg mb-2 block">Land Size</label>
<img id="farmImage" class="mt-4 hidden" src="https://placehold.co/600x400" alt="Farm Image" />
<input type="number" name="land_size" class="form-input" placeholder="Enter land size in hectares" aria-label="Land Size" required>
<input type="number" id="landSizeInput" name="land_size" class="form-input" placeholder="Enter land size in hectares" aria-label="Land Size" oninput="updateFarmImage()" required>
</div>

<div class="form-section">
Expand All @@ -82,8 +82,27 @@ <h2 class="text-xl font-bold text-green-600">
<div class="form-section">
<label class="font-semibold text-lg mb-2 block">Budget (INR)</label>
<input type="number" name="budget" class="form-input" placeholder="Enter your budget in INR" aria-label="Budget" required>
<button id="toggleButton" class="mt-2" onclick="toggleBudgetInfo(event)">
<i id="arrowIcon" class="fas fa-chevron-down"></i> Budget Information
</button>
</div>

<div id="budgetInfo" class="hidden mt-4">
<table id="budgetTable" class="min-w-full divide-y divide-gray-200">
<thead>
<tr>
<th>Type</th>
<th>Target Audience</th>
<th>Price Range</th>
</tr>
</thead>
<tbody>
<!-- Table rows will be dynamically added here -->
</tbody>
</table>
</div>


<div class="form-section">
<label class="font-semibold text-lg mb-2 block">Existing Infrastructure</label>
<div class="checkbox-container">
Expand Down

0 comments on commit 4475a90

Please sign in to comment.