File size: 12,803 Bytes
5ae839d c9eb10c | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aquaculture Biosecurity Ops</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.offline-banner {
background: linear-gradient(90deg, #f59e0b, #d97706);
}
.sync-queue {
background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}
.alert-badge {
background: linear-gradient(90deg, #ef4444, #dc2626);
}
.treatment-card {
background: linear-gradient(90deg, #10b981, #059669);
}
.big-tap-button {
min-height: 60px;
min-width: 60px;
}
.stage-counter {
transition: all 0.2s ease;
}
.stage-counter:active {
transform: scale(0.95);
}
</style>
</head>
<body class="bg-blue-50 min-h-screen font-sans">
<!-- Offline Status Banner -->
<div class="offline-banner text-white py-2 px-4 text-center hidden" id="offlineBanner">
<div class="flex items-center justify-center">
<i data-feather="wifi-off" class="mr-2"></i>
<span>Working offline - Data will sync when connection is restored</span>
</div>
</div>
<!-- Main Navigation -->
<nav class="bg-white shadow-lg fixed bottom-0 w-full z-50 md:relative md:top-0">
<div class="flex justify-around items-center py-3 md:py-4">
<a href="#sites" class="flex flex-col items-center text-blue-600">
<i data-feather="map-pin" class="w-6 h-6 md:w-7 md:h-7"></i>
<span class="text-xs mt-1">Sites</span>
</a>
<a href="#planner" class="flex flex-col items-center text-gray-600">
<i data-feather="calendar" class="w-6 h-6 md:w-7 md:h-7"></i>
<span class="text-xs mt-1">Planner</span>
</a>
<a href="#reports" class="flex flex-col items-center text-gray-600">
<i data-feather="file-text" class="w-6 h-6 md:w-7 md:h-7"></i>
<span class="text-xs mt-1">Reports</span>
</a>
<a href="#maps" class="flex flex-col items-center text-gray-600">
<i data-feather="map" class="w-6 h-6 md:w-7 md:h-7"></i>
<span class="text-xs mt-1">Maps</span>
</a>
<a href="#sync" class="flex flex-col items-center text-gray-600 relative">
<i data-feather="refresh-cw" class="w-6 h-6 md:w-7 md:h-7"></i>
<span class="text-xs mt-1">Sync</span>
<span class="absolute -top-1 -right-1 bg-red-500 text-white rounded-full text-xs w-4 h-4 flex items-center justify-center hidden" id="syncCount">0</span>
</a>
</div>
</nav>
<!-- Main Content -->
<main class="pb-20 md:pb-0 md:pt-20">
<!-- Sites Section -->
<section id="sites" class="p-4" data-aos="fade-up">
<h2 class="text-2xl font-bold text-gray-800 mb-4">Your Sites</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<!-- Site Card -->
<div class="bg-white rounded-xl shadow-md p-4">
<div class="flex justify-between items-start">
<h3 class="font-semibold text-lg">North Fjord Site</h3>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Active</span>
</div>
<p class="text-gray-600 text-sm mt-2">12 pens • 4500 tons biomass</p>
<div class="mt-4 space-y-2">
<div class="flex justify-between items-center">
<span class="text-sm">Last lice check:</span>
<span class="font-medium">2 hours ago</span>
</div>
<div class="flex justify-between items-center">
<span class="text-sm">Avg lice count:</span>
<span class="font-medium text-orange-600">3.2</span>
</div>
</div>
<button class="w-full bg-blue-600 text-white py-3 rounded-lg mt-4 font-medium flex items-center justify-center">
<i data-feather="arrow-right" class="mr-2 w-4 h-4"></i>
View Pens
</button>
</div>
<!-- Add more site cards as needed -->
</div>
</section>
<!-- Quick Actions -->
<section class="p-4 bg-white mt-6" data-aos="fade-up">
<h2 class="text-xl font-bold text-gray-800 mb-4">Quick Actions</h2>
<div class="grid grid-cols-2 gap-3">
<button class="bg-blue-100 text-blue-800 py-4 rounded-lg font-medium flex flex-col items-center justify-center">
<i data-feather="plus-circle" class="w-8 h-8 mb-2"></i>
Log Lice Count
</button>
<button class="bg-green-100 text-green-800 py-4 rounded-lg font-medium flex flex-col items-center justify-center">
<i data-feather="activity" class="w-8 h-8 mb-2"></i>
Record Mortality
</button>
<button class="bg-purple-100 text-purple-800 py-4 rounded-lg font-medium flex flex-col items-center justify-center">
<i data-feather="calendar" class="w-8 h-8 mb-2"></i>
Plan Treatment
</button>
<button class="bg-orange-100 text-orange-800 py-4 rounded-lg font-medium flex flex-col items-center justify-center">
<i data-feather="bar-chart-2" class="w-8 h-8 mb-2"></i>
View Reports
</button>
</div>
</section>
<!-- Alerts Section -->
<section class="p-4 mt-6" data-aos="fade-up">
<h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
<i data-feather="alert-triangle" class="mr-2 text-orange-600"></i>
Alerts & Notifications
</h2>
<div class="space-y-3">
<div class="bg-white rounded-xl shadow-md p-4 border-l-4 border-orange-500">
<div class="flex justify-between items-start">
<h3 class="font-semibold">High Lice Count</h3>
<span class="text-xs text-gray-500">1 hour ago</span>
</div>
<p class="text-sm text-gray-600 mt-1">Pen #4: Average count 5.8 - exceeds threshold</p>
</div>
<div class="bg-white rounded-xl shadow-md p-4 border-l-4 border-blue-500">
<div class="flex justify-between items-start">
<h3 class="font-semibold">Treatment Due</h3>
<span class="text-xs text-gray-500">3 hours ago</span>
</div>
<p class="text-sm text-gray-600 mt-1">Scheduled treatment for North Fjord starts tomorrow</p>
</div>
</div>
</section>
</main>
<!-- Lice Counting Modal (Hidden by default) -->
<div id="liceModal" class="fixed inset-0 bg-black bg-opacity-50 hidden z-50 flex items-center justify-center p-4">
<div class="bg-white rounded-2xl w-full max-w-md max-h-[90vh] overflow-y-auto">
<div class="p-6">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-bold">Log Lice Count</h2>
<button onclick="closeModal()" class="text-gray-400 hover:text-gray-600">
<i data-feather="x"></i>
</button>
</div>
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Select Pen</label>
<select class="w-full p-3 border border-gray-300 rounded-lg">
<option>Pen #1 - 380 tons</option>
<option>Pen #2 - 420 tons</option>
<option>Pen #3 - 395 tons</option>
<option>Pen #4 - 410 tons</option>
</select>
</div>
<div class="grid grid-cols-2 gap-3">
<div class="text-center">
<label class="block text-sm font-medium text-gray-700 mb-2">Chalimus</label>
<div class="stage-counter big-tap-button bg-blue-100 text-blue-800 rounded-lg flex items-center justify-center text-2xl font-bold" onclick="incrementCount(this)">
0
</div>
</div>
<div class="text-center">
<label class="block text-sm font-medium text-gray-700 mb-2">Preadult</label>
<div class="stage-counter big-tap-button bg-green-100 text-green-800 rounded-lg flex items-center justify-center text-2xl font-bold" onclick="incrementCount(this)">
0
</div>
</div>
<div class="text-center">
<label class="block text-sm font-medium text-gray-700 mb-2">Adult</label>
<div class="stage-counter big-tap-button bg-yellow-100 text-yellow-800 rounded-lg flex items-center justify-center text-2xl font-bold" onclick="incrementCount(this)">
0
</div>
</div>
<div class="text-center">
<label class="block text-sm font-medium text-gray-700 mb-2">Mobile</label>
<div class="stage-counter big-tap-button bg-purple-100 text-purple-800 rounded-lg flex items-center justify-center text-2xl font-bold" onclick="incrementCount(this)">
0
</div>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Water Temperature (°C)</label>
<input type="number" step="0.1" class="w-full p-3 border border-gray-300 rounded-lg" placeholder="12.5">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Salinity (ppt)</label>
<input type="number" step="0.1" class="w-full p-3 border border-gray-300 rounded-lg" placeholder="32.5">
</div>
<button class="w-full bg-blue-600 text-white py-3 rounded-lg font-medium mt-4">
Save Count
</button>
</div>
</div>
</div>
</div>
<script>
// Initialize AOS
AOS.init({
duration: 800,
once: true
});
// Initialize Feather Icons
feather.replace();
// Simulate offline status (in real app, would check navigator.onLine)
setTimeout(() => {
document.getElementById('offlineBanner').classList.remove('hidden');
}, 2000);
// Modal functions
function openLiceModal() {
document.getElementById('liceModal').classList.remove('hidden');
}
function closeModal() {
document.getElementById('liceModal').classList.add('hidden');
}
// Counter increment function
function incrementCount(element) {
let count = parseInt(element.textContent);
element.textContent = count + 1;
}
// Simulate sync queue items
document.getElementById('syncCount').textContent = '3';
document.getElementById('syncCount').classList.remove('hidden');
</script>
</body>
</html>
|