add light/dark toggle and ensure that the design is mobile first and fully responsiver - Follow Up Deployment
Browse files- index.html +31 -10
index.html
CHANGED
|
@@ -8,15 +8,21 @@
|
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<link rel="stylesheet" href="styles.css">
|
| 10 |
</head>
|
| 11 |
-
<body class="bg-gray-50 min-h-screen">
|
| 12 |
-
<div class="container mx-auto px-4 py-8">
|
| 13 |
<!-- Header -->
|
| 14 |
<header class="mb-10 text-center">
|
| 15 |
-
<div class="flex justify-
|
| 16 |
-
<
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
</div>
|
| 19 |
-
<p class="text-lg text-gray-600 max-w-2xl mx-auto">
|
| 20 |
A simple web-based tool to flash Raspberry Pi OS images to your SD cards. No additional software required!
|
| 21 |
</p>
|
| 22 |
</header>
|
|
@@ -25,7 +31,7 @@
|
|
| 25 |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 26 |
<!-- Left Column - Device Selection -->
|
| 27 |
<div class="lg:col-span-1 space-y-6">
|
| 28 |
-
<div class="bg-white rounded-xl shadow-md p-6 card-hover">
|
| 29 |
<h2 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
|
| 30 |
<i class="fas fa-sd-card mr-2 text-blue-500"></i> Select Storage Device
|
| 31 |
</h2>
|
|
@@ -83,7 +89,7 @@
|
|
| 83 |
<button id="tabOther" class="tab-button px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-sm font-medium">Other</button>
|
| 84 |
</div>
|
| 85 |
<div class="relative">
|
| 86 |
-
<input type="text" id="searchOS" placeholder="Search OS images..." class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
|
| 87 |
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 88 |
</div>
|
| 89 |
</div>
|
|
@@ -111,7 +117,7 @@
|
|
| 111 |
<i class="fas fa-bolt mr-2 text-yellow-500"></i> Flash Summary
|
| 112 |
</h2>
|
| 113 |
|
| 114 |
-
<div id="flashSummary" class="bg-gray-50 border border-gray-200 rounded-lg p-4 mb-4">
|
| 115 |
<div class="flex items-center mb-2">
|
| 116 |
<i class="fas fa-info-circle text-gray-500 mr-2"></i>
|
| 117 |
<h3 class="font-medium text-gray-700">Select Image and Device</h3>
|
|
@@ -230,5 +236,20 @@
|
|
| 230 |
</div>
|
| 231 |
|
| 232 |
<script src="js/app.js"></script>
|
| 233 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 234 |
</html>
|
|
|
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<link rel="stylesheet" href="styles.css">
|
| 10 |
</head>
|
| 11 |
+
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen transition-colors duration-200">
|
| 12 |
+
<div class="container mx-auto px-4 py-8 text-gray-800 dark:text-gray-200">
|
| 13 |
<!-- Header -->
|
| 14 |
<header class="mb-10 text-center">
|
| 15 |
+
<div class="flex justify-between items-center mb-4">
|
| 16 |
+
<div class="flex items-center">
|
| 17 |
+
<i class="fas fa-raspberry-pi text-4xl text-red-600 mr-3"></i>
|
| 18 |
+
<h1 class="text-4xl font-bold text-gray-800 dark:text-gray-100">PiFlash</h1>
|
| 19 |
+
</div>
|
| 20 |
+
<button id="themeToggle" class="p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200">
|
| 21 |
+
<i class="fas fa-moon dark:hidden"></i>
|
| 22 |
+
<i class="fas fa-sun hidden dark:block"></i>
|
| 23 |
+
</button>
|
| 24 |
</div>
|
| 25 |
+
<p class="text-lg text-gray-600 dark:text-gray-400 max-w-2xl mx-auto">
|
| 26 |
A simple web-based tool to flash Raspberry Pi OS images to your SD cards. No additional software required!
|
| 27 |
</p>
|
| 28 |
</header>
|
|
|
|
| 31 |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 32 |
<!-- Left Column - Device Selection -->
|
| 33 |
<div class="lg:col-span-1 space-y-6">
|
| 34 |
+
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-md p-6 card-hover transition-colors duration-200">
|
| 35 |
<h2 class="text-xl font-semibold text-gray-800 mb-4 flex items-center">
|
| 36 |
<i class="fas fa-sd-card mr-2 text-blue-500"></i> Select Storage Device
|
| 37 |
</h2>
|
|
|
|
| 89 |
<button id="tabOther" class="tab-button px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-sm font-medium">Other</button>
|
| 90 |
</div>
|
| 91 |
<div class="relative">
|
| 92 |
+
<input type="text" id="searchOS" placeholder="Search OS images..." class="w-full pl-10 pr-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md focus:ring-blue-500 focus:border-blue-500 bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100">
|
| 93 |
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
|
| 94 |
</div>
|
| 95 |
</div>
|
|
|
|
| 117 |
<i class="fas fa-bolt mr-2 text-yellow-500"></i> Flash Summary
|
| 118 |
</h2>
|
| 119 |
|
| 120 |
+
<div id="flashSummary" class="bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-lg p-4 mb-4">
|
| 121 |
<div class="flex items-center mb-2">
|
| 122 |
<i class="fas fa-info-circle text-gray-500 mr-2"></i>
|
| 123 |
<h3 class="font-medium text-gray-700">Select Image and Device</h3>
|
|
|
|
| 236 |
</div>
|
| 237 |
|
| 238 |
<script src="js/app.js"></script>
|
| 239 |
+
<script>
|
| 240 |
+
// Theme toggle functionality
|
| 241 |
+
const themeToggle = document.getElementById('themeToggle');
|
| 242 |
+
const html = document.documentElement;
|
| 243 |
+
|
| 244 |
+
// Check for saved theme preference or use system preference
|
| 245 |
+
const savedTheme = localStorage.getItem('theme') ||
|
| 246 |
+
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
|
| 247 |
+
html.classList.toggle('dark', savedTheme === 'dark');
|
| 248 |
+
|
| 249 |
+
themeToggle.addEventListener('click', () => {
|
| 250 |
+
html.classList.toggle('dark');
|
| 251 |
+
localStorage.setItem('theme', html.classList.contains('dark') ? 'dark' : 'light');
|
| 252 |
+
});
|
| 253 |
+
</script>
|
| 254 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=S-Dreamer/piflash" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 255 |
</html>
|