ghstedpixel commited on
Commit
989e00f
·
verified ·
1 Parent(s): 0516f8f

Update dashboard.html

Browse files
Files changed (1) hide show
  1. dashboard.html +83 -85
dashboard.html CHANGED
@@ -12,6 +12,7 @@
12
  --bg-main: #0a0c14; --card-bg: #131622; --input-bg: #1b1f32; --border-color: rgba(255, 255, 255, 0.08);
13
  --text-main: #f3f4f6; --text-muted: #9ca3af; --accent-blue: #3b82f6; --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
14
  --accent-green: #10b981; --glow-green: rgba(16, 185, 129, 0.2); --accent-gold: #f59e0b;
 
15
  }
16
  * { box-sizing: border-box; }
17
  body {
@@ -54,6 +55,11 @@
54
  .domain-badge { background: rgba(255, 255, 255, 0.05); color: #e5e7eb; font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 4px; text-transform: lowercase; border: 1px solid var(--border-color); white-space: nowrap; }
55
  .size-badge { background: rgba(59, 130, 246, 0.1); color: #60a5fa; font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(59, 130, 246, 0.15); white-space: nowrap; }
56
  .rating-badge { background: rgba(245, 158, 11, 0.1); color: #fbbf24; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(245, 158, 11, 0.2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
 
 
 
 
 
57
  .value-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
58
  .value-badge.best-value { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 8px rgba(16, 185, 129, 0.1); }
59
  .value-badge.verified-retailer { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
@@ -101,6 +107,81 @@
101
  </script>
102
  </head>
103
  <body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
104
  <h2>
105
  <svg class="icon" style="width:28px; height:28px; color:var(--accent-blue);" viewBox="0 0 24 24"><path d="M12 2L2 22h20L12 2zm0 3.99L19.53 19H4.47L12 5.99zM13 16h-2v2h2v-2zm0-6h-2v4h2v-4z"/></svg>
106
  Tarz Price Scout
@@ -170,68 +251,7 @@
170
 
171
  <ul style="margin-top: 15px;">
172
  {% for deal in deals[:10] %}
173
- <li class="deal-item">
174
- <div class="deal-item-header">
175
- <img src="{{ deal.image if deal.image else 'https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG' }}" class="product-img" onerror="this.src='https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG'" />
176
- <div class="deal-info">
177
- <span class="item-title">{{ deal.title if deal.title else target_item }}</span>
178
- <div class="meta-container">
179
- <span class="domain-badge">{{ deal.source_domain }}</span>
180
- <span class="size-badge">{{ deal.size if deal.size else 'Standard' }}</span>
181
-
182
- {% if deal.rating %}
183
- <span class="rating-badge">
184
- <svg class="icon" style="width:11px; height:11px; color:var(--accent-gold); fill:currentColor;" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>
185
- {{ deal.rating }}{% if deal.reviews %} ({{ deal.reviews|int }}){% endif %}
186
- </span>
187
- {% endif %}
188
-
189
- {% if loop.index0 == 0 %}
190
- <span class="value-badge best-value">
191
- <svg class="icon" style="width:12px; height:12px;" viewBox="0 0 24 24"><path d="M12 23l-1.45-1.32C5.4 16.25 2 13.17 2 9.5 2 6.5 4.5 4 7.5 4c1.74 0 3.41.81 4.5 2.09C13.09 4.81 14.76 4 16.5 4 19.5 4 22 6.5 22 9.5c0 3.67-3.4 6.75-8.55 12.18L12 23z"/></svg>
192
- Best Value
193
- </span>
194
- {% endif %}
195
-
196
- {% if deal.source %}
197
- <span class="value-badge verified-retailer">
198
- <svg class="icon" style="width:12px; height:12px;" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
199
- Verified
200
- </span>
201
- {% endif %}
202
-
203
- <a href="{{ deal.url }}" target="_blank" class="small-link">{{ deal.url }}</a>
204
-
205
- {% if is_ref_url and deal.url == is_ref_url %}
206
- <span class="size-badge" style="background:rgba(59,130,246,0.1); color:#60a5fa; border-color:rgba(59,130,246,0.2)">⭐ Ref Target</span>
207
- {% endif %}
208
- </div>
209
- </div>
210
- <div style="display: flex; flex-direction: column; align-items: flex-end;">
211
- <span class="price-tag">
212
- <a href="{{ deal.url }}" target="_blank">${{ "%.2f"|format(deal.price) }}</a>
213
- </span>
214
- {% if loop.index0 == 0 and deal.price_delta and deal.price_delta != 0.0 %}
215
- {% if deal.price_delta < 0 %}
216
- <span class="trend-indicator down">- $ {{ deal.price_delta|abs }}</span>
217
- {% else %}
218
- <span class="trend-indicator up">+ $ {{ deal.price_delta }}</span>
219
- {% endif %}
220
- {% endif %}
221
- </div>
222
- </div>
223
-
224
- {% for coupon in coupons %}
225
- {% if coupon.source and (coupon.source|lower in deal.source_domain|lower or coupon.source|lower in (deal.source or '')|lower) %}
226
- <div class="inline-coupon">
227
- <div style="min-width: 0;">
228
- <span style="color: var(--accent-gold); font-weight: 700; font-family: monospace; font-size: 11px; background: rgba(245, 158, 11, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px dashed rgba(245, 158, 11, 0.3); text-transform: uppercase;">{{ coupon.code }}</span>
229
- <span style="color: #e5e7eb; margin-left: 6px; font-size: 12px;">{{ coupon.description }}</span>
230
- </div>
231
- </div>
232
- {% endif %}
233
- {% endfor %}
234
- </li>
235
  {% endfor %}
236
  </ul>
237
 
@@ -243,29 +263,7 @@
243
  </summary>
244
  <ul style="margin-top: 15px;">
245
  {% for deal in deals[10:20] %}
246
- <li class="deal-item">
247
- <div class="deal-item-header">
248
- <img src="{{ deal.image if deal.image else 'https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG' }}" class="product-img" onerror="this.src='https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG'" />
249
- <div class="deal-info">
250
- <span class="item-title">{{ deal.title if deal.title else target_item }}</span>
251
- <div class="meta-container">
252
- <span class="domain-badge">{{ deal.source_domain }}</span>
253
- <span class="size-badge">{{ deal.size if deal.size else 'Standard' }}</span>
254
- {% if deal.rating %}
255
- <span class="rating-badge">
256
- {{ deal.rating }}
257
- </span>
258
- {% endif %}
259
- <a href="{{ deal.url }}" target="_blank" class="small-link">{{ deal.url }}</a>
260
- </div>
261
- </div>
262
- <div style="display: flex; flex-direction: column; align-items: flex-end;">
263
- <span class="price-tag">
264
- <a href="{{ deal.url }}" target="_blank">${{ "%.2f"|format(deal.price) }}</a>
265
- </span>
266
- </div>
267
- </div>
268
- </li>
269
  {% endfor %}
270
  </ul>
271
  </details>
 
12
  --bg-main: #0a0c14; --card-bg: #131622; --input-bg: #1b1f32; --border-color: rgba(255, 255, 255, 0.08);
13
  --text-main: #f3f4f6; --text-muted: #9ca3af; --accent-blue: #3b82f6; --accent-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
14
  --accent-green: #10b981; --glow-green: rgba(16, 185, 129, 0.2); --accent-gold: #f59e0b;
15
+ --badge-purple: #8b5cf6;
16
  }
17
  * { box-sizing: border-box; }
18
  body {
 
55
  .domain-badge { background: rgba(255, 255, 255, 0.05); color: #e5e7eb; font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 4px; text-transform: lowercase; border: 1px solid var(--border-color); white-space: nowrap; }
56
  .size-badge { background: rgba(59, 130, 246, 0.1); color: #60a5fa; font-size: 11px; font-weight: 500; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(59, 130, 246, 0.15); white-space: nowrap; }
57
  .rating-badge { background: rgba(245, 158, 11, 0.1); color: #fbbf24; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(245, 158, 11, 0.2); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
58
+
59
+ /* NEW DYNAMIC METRIC BADGES */
60
+ .condition-badge { background: rgba(139, 92, 246, 0.1); color: #a78bfa; font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(139, 92, 246, 0.2); white-space: nowrap; }
61
+ .shipping-badge { background: rgba(255, 255, 255, 0.04); color: #e5e7eb; font-size: 11px; font-family: monospace; padding: 2px 5px; border-radius: 4px; border: 1px solid var(--border-color); }
62
+
63
  .value-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.02em; white-space: nowrap; }
64
  .value-badge.best-value { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); box-shadow: 0 0 8px rgba(16, 185, 129, 0.1); }
65
  .value-badge.verified-retailer { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
 
107
  </script>
108
  </head>
109
  <body>
110
+
111
+ {% macro render_deal_row(deal, idx, target_item, coupons, is_ref_url) %}
112
+ <li class="deal-item">
113
+ <div class="deal-item-header">
114
+ <img src="{{ deal.image if deal.image else 'https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG' }}" class="product-img" onerror="this.src='https://placehold.co/100x100/1a1c28/9fa4b4?text=IMG'" />
115
+ <div class="deal-info">
116
+ <span class="item-title">{{ deal.title if deal.title else target_item }}</span>
117
+ <div class="meta-container">
118
+ <span class="domain-badge">{{ deal.source_domain }}</span>
119
+ <span class="size-badge">{{ deal.size if deal.size else 'Standard' }}</span>
120
+
121
+ {% if deal.condition and deal.condition.upper() != "NEW" %}
122
+ <span class="condition-badge">{{ deal.condition|upper }}</span>
123
+ {% endif %}
124
+
125
+ {% if deal.delivery_info %}
126
+ <span class="shipping-badge">📦 {{ deal.delivery_info }}</span>
127
+ {% endif %}
128
+
129
+ {% if deal.rating %}
130
+ <span class="rating-badge">
131
+ <svg class="icon" style="width:11px; height:11px; color:var(--accent-gold); fill:currentColor;" viewBox="0 0 24 24"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"/></svg>
132
+ {{ deal.rating }}{% if deal.reviews %} ({{ deal.reviews|int }}){% endif %}
133
+ </span>
134
+ {% endif %}
135
+
136
+ {% if idx == 0 %}
137
+ <span class="value-badge best-value">
138
+ <svg class="icon" style="width:12px; height:12px;" viewBox="0 0 24 24"><path d="M12 23l-1.45-1.32C5.4 16.25 2 13.17 2 9.5 2 6.5 4.5 4 7.5 4c1.74 0 3.41.81 4.5 2.09C13.09 4.81 14.76 4 16.5 4 19.5 4 22 6.5 22 9.5c0 3.67-3.4 6.75-8.55 12.18L12 23z"/></svg>
139
+ Best Value
140
+ </span>
141
+ {% endif %}
142
+
143
+ {% if deal.source %}
144
+ <span class="value-badge verified-retailer">
145
+ <svg class="icon" style="width:12px; height:12px;" viewBox="0 0 24 24"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>
146
+ Verified
147
+ </span>
148
+ {% endif %}
149
+
150
+ <a href="{{ deal.url }}" target="_blank" class="small-link">{{ deal.url }}</a>
151
+
152
+ {% if is_ref_url and deal.url == is_ref_url %}
153
+ <span class="size-badge" style="background:rgba(59,130,246,0.1); color:#60a5fa; border-color:rgba(59,130,246,0.2)">⭐ Ref Target</span>
154
+ {% endif %}
155
+ </div>
156
+ </div>
157
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
158
+ <span class="price-tag">
159
+ <a href="{{ deal.url }}" target="_blank">${{ "%.2f"|format(deal.price) }}</a>
160
+ </span>
161
+ {% if idx == 0 and deal.price_delta and deal.price_delta != 0.0 %}
162
+ {% if deal.price_delta < 0 %}
163
+ <span class="trend-indicator down">- $ {{ deal.price_delta|abs }}</span>
164
+ {% else %}
165
+ <span class="trend-indicator up">+ $ {{ deal.price_delta }}</span>
166
+ {% endif %}
167
+ {% endif %}
168
+ </div>
169
+ </div>
170
+
171
+ {% for coupon in coupons %}
172
+ {% if coupon.source and (coupon.source|lower in deal.source_domain|lower or coupon.source|lower in (deal.source or '')|lower) %}
173
+ <div class="inline-coupon">
174
+ <div style="min-width: 0;">
175
+ <span style="color: var(--accent-gold); font-weight: 700; font-family: monospace; font-size: 11px; background: rgba(245, 158, 11, 0.1); padding: 2px 6px; border-radius: 4px; border: 1px dashed rgba(245, 158, 11, 0.3); text-transform: uppercase;">{{ coupon.code }}</span>
176
+ <span style="color: #e5e7eb; margin-left: 6px; font-size: 12px;">{{ coupon.description }}</span>
177
+ </div>
178
+ </div>
179
+ {% endif %}
180
+ {% endfor %}
181
+ </li>
182
+ {% endmacro %}
183
+
184
+
185
  <h2>
186
  <svg class="icon" style="width:28px; height:28px; color:var(--accent-blue);" viewBox="0 0 24 24"><path d="M12 2L2 22h20L12 2zm0 3.99L19.53 19H4.47L12 5.99zM13 16h-2v2h2v-2zm0-6h-2v4h2v-4z"/></svg>
187
  Tarz Price Scout
 
251
 
252
  <ul style="margin-top: 15px;">
253
  {% for deal in deals[:10] %}
254
+ {{ render_deal_row(deal, loop.index0, target_item, coupons, is_ref_url) }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
  {% endfor %}
256
  </ul>
257
 
 
263
  </summary>
264
  <ul style="margin-top: 15px;">
265
  {% for deal in deals[10:20] %}
266
+ {{ render_deal_row(deal, loop.index0 + 10, target_item, coupons, is_ref_url) }}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
267
  {% endfor %}
268
  </ul>
269
  </details>