Spaces:
Running
Running
Update confirmation.html
Browse files- confirmation.html +25 -21
confirmation.html
CHANGED
|
@@ -41,7 +41,7 @@ body {
|
|
| 41 |
opacity: 1;
|
| 42 |
}
|
| 43 |
|
| 44 |
-
/* DOTS
|
| 45 |
.step::before {
|
| 46 |
content: "";
|
| 47 |
position: absolute;
|
|
@@ -83,7 +83,6 @@ body {
|
|
| 83 |
|
| 84 |
<h1 class="text-3xl font-bold">Donation confirmed!</h1>
|
| 85 |
|
| 86 |
-
<!-- CLEAN SUMMARY -->
|
| 87 |
<p id="summaryText" class="text-gray-600 mt-2">
|
| 88 |
Loading donation details...
|
| 89 |
</p>
|
|
@@ -106,7 +105,6 @@ body {
|
|
| 106 |
<p id="volunteerText" class="text-sm text-gray-500 mt-1"></p>
|
| 107 |
</div>
|
| 108 |
|
| 109 |
-
<!-- β stays inactive (as you requested) -->
|
| 110 |
<div id="s4" class="step">
|
| 111 |
Out for delivery
|
| 112 |
</div>
|
|
@@ -114,20 +112,31 @@ body {
|
|
| 114 |
</div>
|
| 115 |
</div>
|
| 116 |
|
| 117 |
-
<!--
|
| 118 |
-
<div class="max-w-2xl mx-auto mt-6 bg-emerald-600 text-white p-6 rounded-2xl">
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
</div>
|
| 123 |
|
| 124 |
-
<!--
|
| 125 |
-
<div class="
|
| 126 |
-
<
|
| 127 |
-
|
|
|
|
|
|
|
| 128 |
</div>
|
| 129 |
|
| 130 |
-
<!-- FOOTER
|
| 131 |
<footer class="text-center mt-10 text-gray-500 text-sm pb-10">
|
| 132 |
Β© 2026 NourishNet β’ AI-powered food redistribution platform
|
| 133 |
</footer>
|
|
@@ -138,7 +147,6 @@ const data = JSON.parse(localStorage.getItem("donationData"));
|
|
| 138 |
|
| 139 |
const summaryText = document.getElementById("summaryText");
|
| 140 |
const volunteerText = document.getElementById("volunteerText");
|
| 141 |
-
const extraInfo = document.getElementById("extraInfo");
|
| 142 |
|
| 143 |
const s1 = document.getElementById("s1");
|
| 144 |
const s2 = document.getElementById("s2");
|
|
@@ -146,11 +154,11 @@ const s3 = document.getElementById("s3");
|
|
| 146 |
|
| 147 |
if (data) {
|
| 148 |
|
| 149 |
-
// π₯
|
| 150 |
summaryText.innerText =
|
| 151 |
`${data.portions} portions of ${data.foodType} successfully routed`;
|
| 152 |
|
| 153 |
-
// π ETA
|
| 154 |
let eta = "15β25 min";
|
| 155 |
|
| 156 |
if (data.portions <= 50) eta = "10β15 min";
|
|
@@ -160,11 +168,7 @@ if (data) {
|
|
| 160 |
volunteerText.innerText =
|
| 161 |
`Volunteer Ahmed assigned β’ ETA ${eta}`;
|
| 162 |
|
| 163 |
-
// π₯
|
| 164 |
-
extraInfo.innerText =
|
| 165 |
-
`AI has matched your ${data.foodType} donation with the best-fit recipient based on urgency and distance.`;
|
| 166 |
-
|
| 167 |
-
// π₯ ONLY FIRST 3 STEPS ACTIVE (as you wanted)
|
| 168 |
setTimeout(() => s1.classList.add("active"), 400);
|
| 169 |
setTimeout(() => s2.classList.add("active"), 1200);
|
| 170 |
setTimeout(() => s3.classList.add("active"), 2000);
|
|
|
|
| 41 |
opacity: 1;
|
| 42 |
}
|
| 43 |
|
| 44 |
+
/* DOTS */
|
| 45 |
.step::before {
|
| 46 |
content: "";
|
| 47 |
position: absolute;
|
|
|
|
| 83 |
|
| 84 |
<h1 class="text-3xl font-bold">Donation confirmed!</h1>
|
| 85 |
|
|
|
|
| 86 |
<p id="summaryText" class="text-gray-600 mt-2">
|
| 87 |
Loading donation details...
|
| 88 |
</p>
|
|
|
|
| 105 |
<p id="volunteerText" class="text-sm text-gray-500 mt-1"></p>
|
| 106 |
</div>
|
| 107 |
|
|
|
|
| 108 |
<div id="s4" class="step">
|
| 109 |
Out for delivery
|
| 110 |
</div>
|
|
|
|
| 112 |
</div>
|
| 113 |
</div>
|
| 114 |
|
| 115 |
+
<!-- POINTS (RESTORED EXACTLY) -->
|
| 116 |
+
<div class="max-w-2xl mx-auto mt-6 bg-emerald-600 text-white p-6 rounded-2xl flex justify-between items-center">
|
| 117 |
+
|
| 118 |
+
<div>
|
| 119 |
+
<p class="text-sm opacity-90">Points earned</p>
|
| 120 |
+
<p class="text-3xl font-bold">+45</p>
|
| 121 |
+
<p class="text-sm opacity-90">1 point per portion</p>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<div class="bg-emerald-500 px-4 py-3 rounded-xl text-sm">
|
| 125 |
+
<p class="font-semibold">13 day streak!</p>
|
| 126 |
+
<p>1 more for "Fortnight Hero"</p>
|
| 127 |
+
</div>
|
| 128 |
+
|
| 129 |
</div>
|
| 130 |
|
| 131 |
+
<!-- BACK BUTTON -->
|
| 132 |
+
<div class="text-center mt-8">
|
| 133 |
+
<button onclick="window.location.href='dashboard.html'"
|
| 134 |
+
class="bg-white border px-6 py-3 rounded-full font-semibold hover:scale-105 transition">
|
| 135 |
+
β Back to dashboard
|
| 136 |
+
</button>
|
| 137 |
</div>
|
| 138 |
|
| 139 |
+
<!-- FOOTER -->
|
| 140 |
<footer class="text-center mt-10 text-gray-500 text-sm pb-10">
|
| 141 |
Β© 2026 NourishNet β’ AI-powered food redistribution platform
|
| 142 |
</footer>
|
|
|
|
| 147 |
|
| 148 |
const summaryText = document.getElementById("summaryText");
|
| 149 |
const volunteerText = document.getElementById("volunteerText");
|
|
|
|
| 150 |
|
| 151 |
const s1 = document.getElementById("s1");
|
| 152 |
const s2 = document.getElementById("s2");
|
|
|
|
| 154 |
|
| 155 |
if (data) {
|
| 156 |
|
| 157 |
+
// π₯ CLEAR SUMMARY (as requested)
|
| 158 |
summaryText.innerText =
|
| 159 |
`${data.portions} portions of ${data.foodType} successfully routed`;
|
| 160 |
|
| 161 |
+
// π ETA
|
| 162 |
let eta = "15β25 min";
|
| 163 |
|
| 164 |
if (data.portions <= 50) eta = "10β15 min";
|
|
|
|
| 168 |
volunteerText.innerText =
|
| 169 |
`Volunteer Ahmed assigned β’ ETA ${eta}`;
|
| 170 |
|
| 171 |
+
// π₯ ONLY FIRST 3 STEPS ACTIVE
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
setTimeout(() => s1.classList.add("active"), 400);
|
| 173 |
setTimeout(() => s2.classList.add("active"), 1200);
|
| 174 |
setTimeout(() => s3.classList.add("active"), 2000);
|