Infinity-1995 commited on
Commit
8480cd1
·
verified ·
1 Parent(s): 727ddc7

Update confirmation.html

Browse files
Files changed (1) hide show
  1. confirmation.html +48 -36
confirmation.html CHANGED
@@ -13,9 +13,10 @@ body {
13
  background-color: #F7F5F0;
14
  }
15
 
 
16
  .timeline {
17
  position: relative;
18
- padding-left: 28px;
19
  }
20
 
21
  .timeline::before {
@@ -28,31 +29,29 @@ body {
28
  background: #e5e7eb;
29
  }
30
 
 
31
  .step {
32
- margin-bottom: 22px;
 
33
  opacity: 0.35;
34
- transition: all 0.5s ease;
35
  }
36
 
37
  .step.active {
38
  opacity: 1;
39
  }
40
 
41
- .step.done {
42
- opacity: 1;
43
- color: #059669;
44
- }
45
-
46
  .step::before {
47
  content: "";
48
  position: absolute;
49
- left: -22px;
50
- margin-top: 6px;
51
- width: 12px;
52
- height: 12px;
53
  border-radius: 50%;
54
  background: #d1d5db;
55
- transition: 0.4s;
56
  }
57
 
58
  .step.active::before {
@@ -84,7 +83,7 @@ body {
84
 
85
  <h1 class="text-3xl font-bold">Donation confirmed!</h1>
86
 
87
- <!-- 🔥 CLEAR DYNAMIC SUMMARY -->
88
  <p id="summaryText" class="text-gray-600 mt-2">
89
  Loading donation details...
90
  </p>
@@ -98,40 +97,56 @@ body {
98
 
99
  <div class="timeline">
100
 
101
- <div id="step1" class="step">Surplus logged</div>
102
 
103
- <div id="step2" class="step">AI matching in progress</div>
104
 
105
- <div id="step3" class="step">
106
- Volunteer assigned
107
  <p id="volunteerText" class="text-sm text-gray-500 mt-1"></p>
108
  </div>
109
 
110
- <div id="step4" class="step">Out for delivery</div>
 
 
 
111
 
112
  </div>
113
  </div>
114
 
115
- <!-- POINTS -->
116
  <div class="max-w-2xl mx-auto mt-6 bg-emerald-600 text-white p-6 rounded-2xl">
 
 
 
 
 
 
 
117
  <p class="text-3xl font-bold">+45 Points Earned</p>
 
118
  </div>
119
 
 
 
 
 
 
120
  <!-- SCRIPT -->
121
  <script>
122
  const data = JSON.parse(localStorage.getItem("donationData"));
123
 
124
  const summaryText = document.getElementById("summaryText");
125
  const volunteerText = document.getElementById("volunteerText");
 
126
 
127
- const step1 = document.getElementById("step1");
128
- const step2 = document.getElementById("step2");
129
- const step3 = document.getElementById("step3");
130
- const step4 = document.getElementById("step4");
131
 
132
  if (data) {
133
 
134
- // 🔥 CLEAN SUMMARY (as you requested)
135
  summaryText.innerText =
136
  `${data.portions} portions of ${data.foodType} successfully routed`;
137
 
@@ -143,19 +158,16 @@ if (data) {
143
  else eta = "25–40 min";
144
 
145
  volunteerText.innerText =
146
- `Ahmed is assigned. Estimated pickup: ${eta}`;
147
-
148
- // 🔥 LIVE STEP ANIMATION
149
- setTimeout(() => step1.classList.add("active"), 300);
150
- setTimeout(() => step1.classList.add("done"), 800);
151
-
152
- setTimeout(() => step2.classList.add("active"), 1200);
153
- setTimeout(() => step2.classList.add("done"), 1800);
154
 
155
- setTimeout(() => step3.classList.add("active"), 2200);
156
- setTimeout(() => step3.classList.add("done"), 3000);
 
157
 
158
- setTimeout(() => step4.classList.add("active"), 3400);
 
 
 
159
 
160
  }
161
  </script>
 
13
  background-color: #F7F5F0;
14
  }
15
 
16
+ /* TIMELINE */
17
  .timeline {
18
  position: relative;
19
+ padding-left: 32px;
20
  }
21
 
22
  .timeline::before {
 
29
  background: #e5e7eb;
30
  }
31
 
32
+ /* STEP */
33
  .step {
34
+ position: relative;
35
+ margin-bottom: 26px;
36
  opacity: 0.35;
37
+ transition: 0.4s ease;
38
  }
39
 
40
  .step.active {
41
  opacity: 1;
42
  }
43
 
44
+ /* DOTS ON LINE */
 
 
 
 
45
  .step::before {
46
  content: "";
47
  position: absolute;
48
+ left: -26px;
49
+ top: 4px;
50
+ width: 14px;
51
+ height: 14px;
52
  border-radius: 50%;
53
  background: #d1d5db;
54
+ border: 2px solid white;
55
  }
56
 
57
  .step.active::before {
 
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>
 
97
 
98
  <div class="timeline">
99
 
100
+ <div id="s1" class="step">Surplus logged</div>
101
 
102
+ <div id="s2" class="step">AI matched</div>
103
 
104
+ <div id="s3" class="step">
105
+ Volunteer en route
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>
113
 
114
  </div>
115
  </div>
116
 
117
+ <!-- EXTRA INFO (RESTORED SECTION) -->
118
  <div class="max-w-2xl mx-auto mt-6 bg-emerald-600 text-white p-6 rounded-2xl">
119
+ <p id="extraInfo" class="text-sm opacity-90">
120
+ Processing your donation through AI routing system...
121
+ </p>
122
+ </div>
123
+
124
+ <!-- POINTS -->
125
+ <div class="max-w-2xl mx-auto mt-4 bg-emerald-500 text-white p-6 rounded-2xl">
126
  <p class="text-3xl font-bold">+45 Points Earned</p>
127
+ <p class="text-sm opacity-90">Thank you for reducing food waste 🌱</p>
128
  </div>
129
 
130
+ <!-- FOOTER (RESTORED) -->
131
+ <footer class="text-center mt-10 text-gray-500 text-sm pb-10">
132
+ © 2026 NourishNet • AI-powered food redistribution platform
133
+ </footer>
134
+
135
  <!-- SCRIPT -->
136
  <script>
137
  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");
145
+ const s3 = document.getElementById("s3");
 
146
 
147
  if (data) {
148
 
149
+ // 🔥 CLEAN MAIN LINE
150
  summaryText.innerText =
151
  `${data.portions} portions of ${data.foodType} successfully routed`;
152
 
 
158
  else eta = "25–40 min";
159
 
160
  volunteerText.innerText =
161
+ `Volunteer Ahmed assigned ETA ${eta}`;
 
 
 
 
 
 
 
162
 
163
+ // 🔥 RESTORED EXTRA INFO
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);
171
 
172
  }
173
  </script>