Spaces:
Sleeping
Sleeping
dhruv575 commited on
Commit ·
252f87c
1
Parent(s): ad35ae9
Add new unsub link
Browse files- app/market-row-comparison-polymarket.html +0 -654
- app/polygraph-email.html +25 -14
- app/post_process.py +12 -0
- app/templateify_new_service.py +19 -10
app/market-row-comparison-polymarket.html
DELETED
|
@@ -1,654 +0,0 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>Kalshi Market Row Styles Comparison</title>
|
| 7 |
-
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
|
| 8 |
-
<style>
|
| 9 |
-
* {
|
| 10 |
-
margin: 0;
|
| 11 |
-
padding: 0;
|
| 12 |
-
box-sizing: border-box;
|
| 13 |
-
}
|
| 14 |
-
|
| 15 |
-
body {
|
| 16 |
-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
|
| 17 |
-
background: #F3F4F6;
|
| 18 |
-
padding: 40px 20px;
|
| 19 |
-
min-height: 100vh;
|
| 20 |
-
}
|
| 21 |
-
|
| 22 |
-
.container {
|
| 23 |
-
max-width: 520px;
|
| 24 |
-
margin: 0 auto;
|
| 25 |
-
}
|
| 26 |
-
|
| 27 |
-
.style-section {
|
| 28 |
-
background: #fff;
|
| 29 |
-
border-radius: 12px;
|
| 30 |
-
padding: 24px;
|
| 31 |
-
margin-bottom: 32px;
|
| 32 |
-
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
.style-header {
|
| 36 |
-
display: flex;
|
| 37 |
-
align-items: center;
|
| 38 |
-
gap: 12px;
|
| 39 |
-
margin-bottom: 8px;
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
.style-number {
|
| 43 |
-
background: #2E5CFF;
|
| 44 |
-
color: white;
|
| 45 |
-
width: 28px;
|
| 46 |
-
height: 28px;
|
| 47 |
-
border-radius: 50%;
|
| 48 |
-
display: flex;
|
| 49 |
-
align-items: center;
|
| 50 |
-
justify-content: center;
|
| 51 |
-
font-weight: 700;
|
| 52 |
-
font-size: 14px;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
.style-title {
|
| 56 |
-
font-size: 18px;
|
| 57 |
-
font-weight: 700;
|
| 58 |
-
color: #111827;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
.style-description {
|
| 62 |
-
font-size: 14px;
|
| 63 |
-
color: #6B7280;
|
| 64 |
-
margin-bottom: 20px;
|
| 65 |
-
padding-left: 40px;
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
.demo-area {
|
| 69 |
-
background: #FAFAFA;
|
| 70 |
-
border-radius: 8px;
|
| 71 |
-
padding: 20px;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
.section-header {
|
| 75 |
-
display: flex;
|
| 76 |
-
justify-content: space-between;
|
| 77 |
-
align-items: center;
|
| 78 |
-
padding-bottom: 8px;
|
| 79 |
-
border-bottom: 2px solid #2E5CFF;
|
| 80 |
-
margin-bottom: 16px;
|
| 81 |
-
}
|
| 82 |
-
|
| 83 |
-
.section-title {
|
| 84 |
-
font-size: 16px;
|
| 85 |
-
font-weight: 600;
|
| 86 |
-
color: #111827;
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
.section-label {
|
| 90 |
-
font-size: 11px;
|
| 91 |
-
letter-spacing: 0.08em;
|
| 92 |
-
text-transform: uppercase;
|
| 93 |
-
color: #6B7280;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
/* ================================
|
| 97 |
-
STYLE 1: Horizontal Bar Style
|
| 98 |
-
================================ */
|
| 99 |
-
.bar-row {
|
| 100 |
-
display: flex;
|
| 101 |
-
align-items: center;
|
| 102 |
-
background: #fff;
|
| 103 |
-
border-radius: 8px;
|
| 104 |
-
padding: 12px 16px;
|
| 105 |
-
margin-bottom: 10px;
|
| 106 |
-
border: 1px solid #E5E7EB;
|
| 107 |
-
transition: border-color 0.2s;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
.bar-row:hover {
|
| 111 |
-
border-color: #2E5CFF;
|
| 112 |
-
}
|
| 113 |
-
|
| 114 |
-
.bar-row:last-child {
|
| 115 |
-
margin-bottom: 0;
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
.bar-content {
|
| 119 |
-
flex: 1;
|
| 120 |
-
min-width: 0;
|
| 121 |
-
}
|
| 122 |
-
|
| 123 |
-
.bar-title {
|
| 124 |
-
font-size: 15px;
|
| 125 |
-
line-height: 1.4;
|
| 126 |
-
color: #111827;
|
| 127 |
-
margin-bottom: 4px;
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
.bar-link {
|
| 131 |
-
font-size: 12px;
|
| 132 |
-
color: #2E5CFF;
|
| 133 |
-
text-decoration: none;
|
| 134 |
-
}
|
| 135 |
-
|
| 136 |
-
.bar-odds {
|
| 137 |
-
display: flex;
|
| 138 |
-
align-items: center;
|
| 139 |
-
gap: 8px;
|
| 140 |
-
margin-left: 16px;
|
| 141 |
-
}
|
| 142 |
-
|
| 143 |
-
.bar-odds-main {
|
| 144 |
-
background: #2E5CFF;
|
| 145 |
-
color: white;
|
| 146 |
-
font-size: 15px;
|
| 147 |
-
font-weight: 700;
|
| 148 |
-
padding: 6px 12px;
|
| 149 |
-
border-radius: 6px;
|
| 150 |
-
}
|
| 151 |
-
|
| 152 |
-
.bar-odds-change {
|
| 153 |
-
font-size: 12px;
|
| 154 |
-
font-weight: 600;
|
| 155 |
-
color: #27AE60;
|
| 156 |
-
}
|
| 157 |
-
|
| 158 |
-
.bar-odds-change.down {
|
| 159 |
-
color: #EB5757;
|
| 160 |
-
}
|
| 161 |
-
|
| 162 |
-
/* ================================
|
| 163 |
-
STYLE 2: Card Grid Style
|
| 164 |
-
================================ */
|
| 165 |
-
.card-grid {
|
| 166 |
-
display: grid;
|
| 167 |
-
grid-template-columns: 1fr 1fr;
|
| 168 |
-
gap: 12px;
|
| 169 |
-
}
|
| 170 |
-
|
| 171 |
-
.grid-card {
|
| 172 |
-
background: #fff;
|
| 173 |
-
border-radius: 10px;
|
| 174 |
-
padding: 16px;
|
| 175 |
-
border: 1px solid #E5E7EB;
|
| 176 |
-
transition: all 0.2s;
|
| 177 |
-
cursor: pointer;
|
| 178 |
-
}
|
| 179 |
-
|
| 180 |
-
.grid-card:hover {
|
| 181 |
-
border-color: #2E5CFF;
|
| 182 |
-
box-shadow: 0 4px 12px rgba(46, 92, 255, 0.15);
|
| 183 |
-
}
|
| 184 |
-
|
| 185 |
-
.grid-odds {
|
| 186 |
-
font-size: 32px;
|
| 187 |
-
font-weight: 700;
|
| 188 |
-
color: #2E5CFF;
|
| 189 |
-
margin-bottom: 8px;
|
| 190 |
-
line-height: 1;
|
| 191 |
-
}
|
| 192 |
-
|
| 193 |
-
.grid-change {
|
| 194 |
-
display: inline-block;
|
| 195 |
-
font-size: 11px;
|
| 196 |
-
font-weight: 600;
|
| 197 |
-
color: #27AE60;
|
| 198 |
-
background: #E8F5E9;
|
| 199 |
-
padding: 2px 6px;
|
| 200 |
-
border-radius: 4px;
|
| 201 |
-
margin-bottom: 10px;
|
| 202 |
-
}
|
| 203 |
-
|
| 204 |
-
.grid-change.down {
|
| 205 |
-
color: #EB5757;
|
| 206 |
-
background: #FDECEC;
|
| 207 |
-
}
|
| 208 |
-
|
| 209 |
-
.grid-title {
|
| 210 |
-
font-size: 13px;
|
| 211 |
-
line-height: 1.4;
|
| 212 |
-
color: #374151;
|
| 213 |
-
display: -webkit-box;
|
| 214 |
-
-webkit-line-clamp: 3;
|
| 215 |
-
-webkit-box-orient: vertical;
|
| 216 |
-
overflow: hidden;
|
| 217 |
-
}
|
| 218 |
-
|
| 219 |
-
.grid-thumb {
|
| 220 |
-
width: 100%;
|
| 221 |
-
height: 80px;
|
| 222 |
-
object-fit: cover;
|
| 223 |
-
border-radius: 6px;
|
| 224 |
-
margin-bottom: 12px;
|
| 225 |
-
background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
|
| 226 |
-
}
|
| 227 |
-
|
| 228 |
-
/* ================================
|
| 229 |
-
STYLE 3: Ticker Style
|
| 230 |
-
================================ */
|
| 231 |
-
.ticker-list {
|
| 232 |
-
background: #fff;
|
| 233 |
-
border-radius: 8px;
|
| 234 |
-
overflow: hidden;
|
| 235 |
-
border: 1px solid #E5E7EB;
|
| 236 |
-
}
|
| 237 |
-
|
| 238 |
-
.ticker-row {
|
| 239 |
-
display: flex;
|
| 240 |
-
align-items: center;
|
| 241 |
-
padding: 10px 14px;
|
| 242 |
-
border-bottom: 1px solid #F3F4F6;
|
| 243 |
-
transition: background 0.15s;
|
| 244 |
-
}
|
| 245 |
-
|
| 246 |
-
.ticker-row:last-child {
|
| 247 |
-
border-bottom: none;
|
| 248 |
-
}
|
| 249 |
-
|
| 250 |
-
.ticker-row:hover {
|
| 251 |
-
background: #F9FAFB;
|
| 252 |
-
}
|
| 253 |
-
|
| 254 |
-
.ticker-symbol {
|
| 255 |
-
background: #111827;
|
| 256 |
-
color: #fff;
|
| 257 |
-
font-size: 10px;
|
| 258 |
-
font-weight: 700;
|
| 259 |
-
letter-spacing: 0.05em;
|
| 260 |
-
padding: 4px 8px;
|
| 261 |
-
border-radius: 4px;
|
| 262 |
-
margin-right: 12px;
|
| 263 |
-
min-width: 52px;
|
| 264 |
-
text-align: center;
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
.ticker-title {
|
| 268 |
-
flex: 1;
|
| 269 |
-
font-size: 14px;
|
| 270 |
-
color: #374151;
|
| 271 |
-
white-space: nowrap;
|
| 272 |
-
overflow: hidden;
|
| 273 |
-
text-overflow: ellipsis;
|
| 274 |
-
margin-right: 12px;
|
| 275 |
-
}
|
| 276 |
-
|
| 277 |
-
.ticker-odds {
|
| 278 |
-
font-size: 15px;
|
| 279 |
-
font-weight: 700;
|
| 280 |
-
color: #111827;
|
| 281 |
-
min-width: 48px;
|
| 282 |
-
text-align: right;
|
| 283 |
-
}
|
| 284 |
-
|
| 285 |
-
.ticker-change {
|
| 286 |
-
font-size: 12px;
|
| 287 |
-
font-weight: 600;
|
| 288 |
-
min-width: 44px;
|
| 289 |
-
text-align: right;
|
| 290 |
-
margin-left: 8px;
|
| 291 |
-
}
|
| 292 |
-
|
| 293 |
-
.ticker-change.up {
|
| 294 |
-
color: #27AE60;
|
| 295 |
-
}
|
| 296 |
-
|
| 297 |
-
.ticker-change.down {
|
| 298 |
-
color: #EB5757;
|
| 299 |
-
}
|
| 300 |
-
|
| 301 |
-
/* Original style reference */
|
| 302 |
-
.original-row {
|
| 303 |
-
display: flex;
|
| 304 |
-
align-items: flex-start;
|
| 305 |
-
margin-bottom: 14px;
|
| 306 |
-
}
|
| 307 |
-
|
| 308 |
-
.original-row:last-child {
|
| 309 |
-
margin-bottom: 0;
|
| 310 |
-
}
|
| 311 |
-
|
| 312 |
-
.original-thumb {
|
| 313 |
-
width: 48px;
|
| 314 |
-
height: 48px;
|
| 315 |
-
border-radius: 8px;
|
| 316 |
-
background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
|
| 317 |
-
flex-shrink: 0;
|
| 318 |
-
}
|
| 319 |
-
|
| 320 |
-
.original-content {
|
| 321 |
-
flex: 1;
|
| 322 |
-
padding: 0 12px;
|
| 323 |
-
}
|
| 324 |
-
|
| 325 |
-
.original-title {
|
| 326 |
-
font-size: 15px;
|
| 327 |
-
line-height: 1.4;
|
| 328 |
-
color: #111827;
|
| 329 |
-
margin-bottom: 4px;
|
| 330 |
-
}
|
| 331 |
-
|
| 332 |
-
.original-link {
|
| 333 |
-
font-size: 12px;
|
| 334 |
-
color: #2E5CFF;
|
| 335 |
-
text-decoration: none;
|
| 336 |
-
}
|
| 337 |
-
|
| 338 |
-
.original-odds {
|
| 339 |
-
text-align: right;
|
| 340 |
-
}
|
| 341 |
-
|
| 342 |
-
.original-odds-main {
|
| 343 |
-
font-size: 16px;
|
| 344 |
-
font-weight: 600;
|
| 345 |
-
color: #2C2C2C;
|
| 346 |
-
margin-bottom: 4px;
|
| 347 |
-
}
|
| 348 |
-
|
| 349 |
-
.original-odds-change {
|
| 350 |
-
font-size: 12px;
|
| 351 |
-
color: #27AE60;
|
| 352 |
-
}
|
| 353 |
-
|
| 354 |
-
/* Comparison label */
|
| 355 |
-
.comparison-label {
|
| 356 |
-
text-align: center;
|
| 357 |
-
padding: 16px;
|
| 358 |
-
background: #FEF3C7;
|
| 359 |
-
border-radius: 8px;
|
| 360 |
-
margin-bottom: 24px;
|
| 361 |
-
font-size: 14px;
|
| 362 |
-
color: #92400E;
|
| 363 |
-
}
|
| 364 |
-
|
| 365 |
-
.pros-cons {
|
| 366 |
-
display: grid;
|
| 367 |
-
grid-template-columns: 1fr 1fr;
|
| 368 |
-
gap: 12px;
|
| 369 |
-
margin-top: 16px;
|
| 370 |
-
padding-top: 16px;
|
| 371 |
-
border-top: 1px dashed #E5E7EB;
|
| 372 |
-
}
|
| 373 |
-
|
| 374 |
-
.pros, .cons {
|
| 375 |
-
font-size: 12px;
|
| 376 |
-
line-height: 1.6;
|
| 377 |
-
}
|
| 378 |
-
|
| 379 |
-
.pros-title, .cons-title {
|
| 380 |
-
font-weight: 600;
|
| 381 |
-
margin-bottom: 4px;
|
| 382 |
-
}
|
| 383 |
-
|
| 384 |
-
.pros-title {
|
| 385 |
-
color: #059669;
|
| 386 |
-
}
|
| 387 |
-
|
| 388 |
-
.cons-title {
|
| 389 |
-
color: #DC2626;
|
| 390 |
-
}
|
| 391 |
-
|
| 392 |
-
.pros ul, .cons ul {
|
| 393 |
-
padding-left: 16px;
|
| 394 |
-
color: #6B7280;
|
| 395 |
-
}
|
| 396 |
-
</style>
|
| 397 |
-
</head>
|
| 398 |
-
<body>
|
| 399 |
-
<div class="container">
|
| 400 |
-
|
| 401 |
-
<div class="comparison-label">
|
| 402 |
-
📊 Comparing 3 different market row styles for Polymarket Polygraph
|
| 403 |
-
</div>
|
| 404 |
-
|
| 405 |
-
<!-- CURRENT/ORIGINAL STYLE -->
|
| 406 |
-
<div class="style-section">
|
| 407 |
-
<div class="style-header">
|
| 408 |
-
<div class="style-number" style="background: #6B7280;">0</div>
|
| 409 |
-
<div class="style-title">Current Style (Reference)</div>
|
| 410 |
-
</div>
|
| 411 |
-
<p class="style-description">This is what you have now — same as Polygraph</p>
|
| 412 |
-
|
| 413 |
-
<div class="demo-area">
|
| 414 |
-
<div class="section-header">
|
| 415 |
-
<span class="section-title">Breaking news</span>
|
| 416 |
-
<span class="section-label">Odds</span>
|
| 417 |
-
</div>
|
| 418 |
-
|
| 419 |
-
<div class="original-row">
|
| 420 |
-
<div class="original-thumb"></div>
|
| 421 |
-
<div class="original-content">
|
| 422 |
-
<div class="original-title">Will another Louvre heist robber be arrested by October 31?</div>
|
| 423 |
-
<a href="#" class="original-link">View market →</a>
|
| 424 |
-
</div>
|
| 425 |
-
<div class="original-odds">
|
| 426 |
-
<div class="original-odds-main">99%</div>
|
| 427 |
-
<div class="original-odds-change">↑ 4%</div>
|
| 428 |
-
</div>
|
| 429 |
-
</div>
|
| 430 |
-
|
| 431 |
-
<div class="original-row">
|
| 432 |
-
<div class="original-thumb"></div>
|
| 433 |
-
<div class="original-content">
|
| 434 |
-
<div class="original-title">Fed rate cut before September FOMC meeting?</div>
|
| 435 |
-
<a href="#" class="original-link">View market →</a>
|
| 436 |
-
</div>
|
| 437 |
-
<div class="original-odds">
|
| 438 |
-
<div class="original-odds-main">23%</div>
|
| 439 |
-
<div class="original-odds-change">↓ 2%</div>
|
| 440 |
-
</div>
|
| 441 |
-
</div>
|
| 442 |
-
</div>
|
| 443 |
-
</div>
|
| 444 |
-
|
| 445 |
-
<!-- STYLE 1: Horizontal Bar -->
|
| 446 |
-
<div class="style-section">
|
| 447 |
-
<div class="style-header">
|
| 448 |
-
<div class="style-number">1</div>
|
| 449 |
-
<div class="style-title">Horizontal Bar Style</div>
|
| 450 |
-
</div>
|
| 451 |
-
<p class="style-description">Full-width rows with odds as a prominent colored badge on the right. Clean, scannable, and emphasizes the probability.</p>
|
| 452 |
-
|
| 453 |
-
<div class="demo-area">
|
| 454 |
-
<div class="section-header">
|
| 455 |
-
<span class="section-title">Breaking news</span>
|
| 456 |
-
<span class="section-label">Odds</span>
|
| 457 |
-
</div>
|
| 458 |
-
|
| 459 |
-
<div class="bar-row">
|
| 460 |
-
<div class="bar-content">
|
| 461 |
-
<div class="bar-title">Will another Louvre heist robber be arrested by October 31?</div>
|
| 462 |
-
<a href="#" class="bar-link">View market →</a>
|
| 463 |
-
</div>
|
| 464 |
-
<div class="bar-odds">
|
| 465 |
-
<span class="bar-odds-change">↑ 4%</span>
|
| 466 |
-
<span class="bar-odds-main">99%</span>
|
| 467 |
-
</div>
|
| 468 |
-
</div>
|
| 469 |
-
|
| 470 |
-
<div class="bar-row">
|
| 471 |
-
<div class="bar-content">
|
| 472 |
-
<div class="bar-title">Fed rate cut before September FOMC meeting?</div>
|
| 473 |
-
<a href="#" class="bar-link">View market →</a>
|
| 474 |
-
</div>
|
| 475 |
-
<div class="bar-odds">
|
| 476 |
-
<span class="bar-odds-change down">↓ 2%</span>
|
| 477 |
-
<span class="bar-odds-main">23%</span>
|
| 478 |
-
</div>
|
| 479 |
-
</div>
|
| 480 |
-
|
| 481 |
-
<div class="bar-row">
|
| 482 |
-
<div class="bar-content">
|
| 483 |
-
<div class="bar-title">Bitcoin above $100K by end of January?</div>
|
| 484 |
-
<a href="#" class="bar-link">View market →</a>
|
| 485 |
-
</div>
|
| 486 |
-
<div class="bar-odds">
|
| 487 |
-
<span class="bar-odds-change">↑ 12%</span>
|
| 488 |
-
<span class="bar-odds-main">67%</span>
|
| 489 |
-
</div>
|
| 490 |
-
</div>
|
| 491 |
-
</div>
|
| 492 |
-
|
| 493 |
-
<div class="pros-cons">
|
| 494 |
-
<div class="pros">
|
| 495 |
-
<div class="pros-title">✓ Pros</div>
|
| 496 |
-
<ul>
|
| 497 |
-
<li>Very scannable</li>
|
| 498 |
-
<li>Odds stand out</li>
|
| 499 |
-
<li>No thumbnail needed</li>
|
| 500 |
-
<li>Works well in email</li>
|
| 501 |
-
</ul>
|
| 502 |
-
</div>
|
| 503 |
-
<div class="cons">
|
| 504 |
-
<div class="cons-title">✗ Cons</div>
|
| 505 |
-
<ul>
|
| 506 |
-
<li>Less visual interest</li>
|
| 507 |
-
<li>Similar to other newsletters</li>
|
| 508 |
-
</ul>
|
| 509 |
-
</div>
|
| 510 |
-
</div>
|
| 511 |
-
</div>
|
| 512 |
-
|
| 513 |
-
<!-- STYLE 2: Card Grid -->
|
| 514 |
-
<div class="style-section">
|
| 515 |
-
<div class="style-header">
|
| 516 |
-
<div class="style-number">2</div>
|
| 517 |
-
<div class="style-title">Card Grid Style</div>
|
| 518 |
-
</div>
|
| 519 |
-
<p class="style-description">2-up cards with large odds as the hero element. More visual, makes percentages impossible to miss.</p>
|
| 520 |
-
|
| 521 |
-
<div class="demo-area">
|
| 522 |
-
<div class="section-header">
|
| 523 |
-
<span class="section-title">Breaking news</span>
|
| 524 |
-
<span class="section-label"></span>
|
| 525 |
-
</div>
|
| 526 |
-
|
| 527 |
-
<div class="card-grid">
|
| 528 |
-
<div class="grid-card">
|
| 529 |
-
<div class="grid-thumb"></div>
|
| 530 |
-
<div class="grid-odds">99%</div>
|
| 531 |
-
<span class="grid-change">↑ 4%</span>
|
| 532 |
-
<div class="grid-title">Will another Louvre heist robber be arrested by October 31?</div>
|
| 533 |
-
</div>
|
| 534 |
-
|
| 535 |
-
<div class="grid-card">
|
| 536 |
-
<div class="grid-thumb"></div>
|
| 537 |
-
<div class="grid-odds">23%</div>
|
| 538 |
-
<span class="grid-change down">↓ 2%</span>
|
| 539 |
-
<div class="grid-title">Fed rate cut before September FOMC meeting?</div>
|
| 540 |
-
</div>
|
| 541 |
-
|
| 542 |
-
<div class="grid-card">
|
| 543 |
-
<div class="grid-thumb"></div>
|
| 544 |
-
<div class="grid-odds">67%</div>
|
| 545 |
-
<span class="grid-change">↑ 12%</span>
|
| 546 |
-
<div class="grid-title">Bitcoin above $100K by end of January?</div>
|
| 547 |
-
</div>
|
| 548 |
-
|
| 549 |
-
<div class="grid-card">
|
| 550 |
-
<div class="grid-thumb"></div>
|
| 551 |
-
<div class="grid-odds">41%</div>
|
| 552 |
-
<span class="grid-change down">↓ 5%</span>
|
| 553 |
-
<div class="grid-title">Government shutdown ends before February 1?</div>
|
| 554 |
-
</div>
|
| 555 |
-
</div>
|
| 556 |
-
</div>
|
| 557 |
-
|
| 558 |
-
<div class="pros-cons">
|
| 559 |
-
<div class="pros">
|
| 560 |
-
<div class="pros-title">✓ Pros</div>
|
| 561 |
-
<ul>
|
| 562 |
-
<li>Very distinctive</li>
|
| 563 |
-
<li>Odds are the hero</li>
|
| 564 |
-
<li>Great for featured markets</li>
|
| 565 |
-
<li>Visually engaging</li>
|
| 566 |
-
</ul>
|
| 567 |
-
</div>
|
| 568 |
-
<div class="cons">
|
| 569 |
-
<div class="cons-title">✗ Cons</div>
|
| 570 |
-
<ul>
|
| 571 |
-
<li>Needs images/thumbnails</li>
|
| 572 |
-
<li>Takes more vertical space</li>
|
| 573 |
-
<li>Trickier in email clients</li>
|
| 574 |
-
</ul>
|
| 575 |
-
</div>
|
| 576 |
-
</div>
|
| 577 |
-
</div>
|
| 578 |
-
|
| 579 |
-
<!-- STYLE 3: Ticker Style -->
|
| 580 |
-
<div class="style-section">
|
| 581 |
-
<div class="style-header">
|
| 582 |
-
<div class="style-number">3</div>
|
| 583 |
-
<div class="style-title">Ticker Style</div>
|
| 584 |
-
</div>
|
| 585 |
-
<p class="style-description">Compact single-line items like a stock ticker. Dense information, financial/trading aesthetic, very efficient.</p>
|
| 586 |
-
|
| 587 |
-
<div class="demo-area">
|
| 588 |
-
<div class="section-header">
|
| 589 |
-
<span class="section-title">Breaking news</span>
|
| 590 |
-
<span class="section-label"></span>
|
| 591 |
-
</div>
|
| 592 |
-
|
| 593 |
-
<div class="ticker-list">
|
| 594 |
-
<div class="ticker-row">
|
| 595 |
-
<span class="ticker-symbol">LOUVRE</span>
|
| 596 |
-
<span class="ticker-title">Will another Louvre heist robber be arrested by Oct 31?</span>
|
| 597 |
-
<span class="ticker-odds">99%</span>
|
| 598 |
-
<span class="ticker-change up">+4%</span>
|
| 599 |
-
</div>
|
| 600 |
-
|
| 601 |
-
<div class="ticker-row">
|
| 602 |
-
<span class="ticker-symbol">FEDCUT</span>
|
| 603 |
-
<span class="ticker-title">Fed rate cut before September FOMC meeting?</span>
|
| 604 |
-
<span class="ticker-odds">23%</span>
|
| 605 |
-
<span class="ticker-change down">-2%</span>
|
| 606 |
-
</div>
|
| 607 |
-
|
| 608 |
-
<div class="ticker-row">
|
| 609 |
-
<span class="ticker-symbol">BTC100K</span>
|
| 610 |
-
<span class="ticker-title">Bitcoin above $100K by end of January?</span>
|
| 611 |
-
<span class="ticker-odds">67%</span>
|
| 612 |
-
<span class="ticker-change up">+12%</span>
|
| 613 |
-
</div>
|
| 614 |
-
|
| 615 |
-
<div class="ticker-row">
|
| 616 |
-
<span class="ticker-symbol">SHTDWN</span>
|
| 617 |
-
<span class="ticker-title">Government shutdown ends before February 1?</span>
|
| 618 |
-
<span class="ticker-odds">41%</span>
|
| 619 |
-
<span class="ticker-change down">-5%</span>
|
| 620 |
-
</div>
|
| 621 |
-
|
| 622 |
-
<div class="ticker-row">
|
| 623 |
-
<span class="ticker-symbol">TSLA500</span>
|
| 624 |
-
<span class="ticker-title">Tesla stock closes above $500 this week?</span>
|
| 625 |
-
<span class="ticker-odds">12%</span>
|
| 626 |
-
<span class="ticker-change up">+1%</span>
|
| 627 |
-
</div>
|
| 628 |
-
</div>
|
| 629 |
-
</div>
|
| 630 |
-
|
| 631 |
-
<div class="pros-cons">
|
| 632 |
-
<div class="pros">
|
| 633 |
-
<div class="pros-title">✓ Pros</div>
|
| 634 |
-
<ul>
|
| 635 |
-
<li>Very space-efficient</li>
|
| 636 |
-
<li>Looks like trading terminal</li>
|
| 637 |
-
<li>Can show many markets</li>
|
| 638 |
-
<li>Unique vs Polymarket</li>
|
| 639 |
-
</ul>
|
| 640 |
-
</div>
|
| 641 |
-
<div class="cons">
|
| 642 |
-
<div class="cons-title">✗ Cons</div>
|
| 643 |
-
<ul>
|
| 644 |
-
<li>Titles get truncated</li>
|
| 645 |
-
<li>Less friendly/approachable</li>
|
| 646 |
-
<li>Needs ticker symbols</li>
|
| 647 |
-
</ul>
|
| 648 |
-
</div>
|
| 649 |
-
</div>
|
| 650 |
-
</div>
|
| 651 |
-
|
| 652 |
-
</div>
|
| 653 |
-
</body>
|
| 654 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/polygraph-email.html
CHANGED
|
@@ -50,18 +50,29 @@
|
|
| 50 |
<tr>
|
| 51 |
<td style="padding:24px 20px 24px 20px;">
|
| 52 |
|
| 53 |
-
<!-- DATE -->
|
| 54 |
-
<
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
<!-- TOP INTRO -->
|
| 67 |
<p class="top_p" style="
|
|
@@ -1132,8 +1143,8 @@
|
|
| 1132 |
<table width="100%" cellpadding="0" cellspacing="0" border="0" role="presentation">
|
| 1133 |
<tr>
|
| 1134 |
<td align="center" style="padding:0 0 24px 0; color:#6B7280; font-family:'Open Sauce One', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; font-size:12px; line-height:19px;">
|
| 1135 |
-
<div style="margin:0; padding:0;">
|
| 1136 |
-
<div style="margin:0; padding:0;">New York, NY
|
| 1137 |
</td>
|
| 1138 |
</tr>
|
| 1139 |
</table>
|
|
|
|
| 50 |
<tr>
|
| 51 |
<td style="padding:24px 20px 24px 20px;">
|
| 52 |
|
| 53 |
+
<!-- DATE + UNSUBSCRIBE -->
|
| 54 |
+
<table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin-bottom:24px;">
|
| 55 |
+
<tr>
|
| 56 |
+
<td style="
|
| 57 |
+
font-family:'Open Sauce One', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
| 58 |
+
font-size:15px;
|
| 59 |
+
line-height:20px;
|
| 60 |
+
color:#000000;
|
| 61 |
+
text-align:left;
|
| 62 |
+
font-style:italic;
|
| 63 |
+
">
|
| 64 |
+
January 15, 2024
|
| 65 |
+
</td>
|
| 66 |
+
<td align="right" style="
|
| 67 |
+
font-family:'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
|
| 68 |
+
font-size:15px;
|
| 69 |
+
line-height:20px;
|
| 70 |
+
color:#6B7280;
|
| 71 |
+
">
|
| 72 |
+
<a href="#" style="color:#6B7280; text-decoration:underline;">Unsubscribe</a>
|
| 73 |
+
</td>
|
| 74 |
+
</tr>
|
| 75 |
+
</table>
|
| 76 |
|
| 77 |
<!-- TOP INTRO -->
|
| 78 |
<p class="top_p" style="
|
|
|
|
| 1143 |
<table width="100%" cellpadding="0" cellspacing="0" border="0" role="presentation">
|
| 1144 |
<tr>
|
| 1145 |
<td align="center" style="padding:0 0 24px 0; color:#6B7280; font-family:'Open Sauce One', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; font-size:12px; line-height:19px;">
|
| 1146 |
+
<div style="margin:0; padding:0;">64 Bleecker Street, 167</div>
|
| 1147 |
+
<div style="margin:0; padding:0;">New York, NY 10012 U.S.</div>
|
| 1148 |
</td>
|
| 1149 |
</tr>
|
| 1150 |
</table>
|
app/post_process.py
CHANGED
|
@@ -427,6 +427,18 @@ def fix_unsubscribe_link(html_content: str) -> str:
|
|
| 427 |
modified = True
|
| 428 |
print(" Fixed unsubscribe 'here' link href to {% manage_subscription_preferences_url %}")
|
| 429 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 430 |
if not modified:
|
| 431 |
print(f" No unsubscribe links found that need href fixing")
|
| 432 |
|
|
|
|
| 427 |
modified = True
|
| 428 |
print(" Fixed unsubscribe 'here' link href to {% manage_subscription_preferences_url %}")
|
| 429 |
|
| 430 |
+
# Date-row "Unsubscribe" link (standalone link text "Unsubscribe")
|
| 431 |
+
pattern3 = r'(<a[^>]*href=["\']#["\'][^>]*>\s*Unsubscribe\s*</a>)'
|
| 432 |
+
if re.search(pattern3, html_content, re.IGNORECASE):
|
| 433 |
+
html_content = re.sub(
|
| 434 |
+
pattern3,
|
| 435 |
+
lambda m: re.sub(r'href=["\']#["\']', 'href="{% manage_subscription_preferences_url %}"', m.group(0), flags=re.IGNORECASE),
|
| 436 |
+
html_content,
|
| 437 |
+
flags=re.IGNORECASE
|
| 438 |
+
)
|
| 439 |
+
modified = True
|
| 440 |
+
print(" Fixed date-row Unsubscribe link href to {% manage_subscription_preferences_url %}")
|
| 441 |
+
|
| 442 |
if not modified:
|
| 443 |
print(f" No unsubscribe links found that need href fixing")
|
| 444 |
|
app/templateify_new_service.py
CHANGED
|
@@ -153,20 +153,29 @@ class TemplateifyNewService:
|
|
| 153 |
else:
|
| 154 |
logger.warning(f"Template node {selector} has no parent, cannot wrap in loop")
|
| 155 |
|
| 156 |
-
# Find and tokenize the date
|
| 157 |
main_card_table = find_main_content_table()
|
| 158 |
if main_card_table:
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
register("{{DATE}}", "Newsletter date")
|
| 168 |
-
logger.info("Tokenized date
|
| 169 |
break
|
|
|
|
|
|
|
|
|
|
| 170 |
|
| 171 |
set_text(".top_p", "{{{INTRO_TEXT}}}", "Intro paragraph under the hero (can include HTML, unescaped).")
|
| 172 |
|
|
|
|
| 153 |
else:
|
| 154 |
logger.warning(f"Template node {selector} has no parent, cannot wrap in loop")
|
| 155 |
|
| 156 |
+
# Find and tokenize the date row (table row with date in first cell and Unsubscribe link in second)
|
| 157 |
main_card_table = find_main_content_table()
|
| 158 |
if main_card_table:
|
| 159 |
+
for table in main_card_table.find_all("table"):
|
| 160 |
+
for tr in table.find_all("tr"):
|
| 161 |
+
tds = tr.find_all("td")
|
| 162 |
+
if len(tds) < 2:
|
| 163 |
+
continue
|
| 164 |
+
first_td, second_td = tds[0], tds[1]
|
| 165 |
+
first_style = first_td.get("style", "")
|
| 166 |
+
if "font-style:italic" not in first_style and "font-style: italic" not in first_style:
|
| 167 |
+
continue
|
| 168 |
+
unsub_link = second_td.find("a", href="#")
|
| 169 |
+
if not unsub_link or unsub_link.get_text(strip=True) != "Unsubscribe":
|
| 170 |
+
continue
|
| 171 |
+
first_td.clear()
|
| 172 |
+
first_td.append("{{DATE}}")
|
| 173 |
register("{{DATE}}", "Newsletter date")
|
| 174 |
+
logger.info("Tokenized date row with {{DATE}}")
|
| 175 |
break
|
| 176 |
+
else:
|
| 177 |
+
continue
|
| 178 |
+
break
|
| 179 |
|
| 180 |
set_text(".top_p", "{{{INTRO_TEXT}}}", "Intro paragraph under the hero (can include HTML, unescaped).")
|
| 181 |
|