askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
test-card-grid.html · 22.5 KB · 556 lines
| 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>Semantic Card Grid Testing</title> |
| 7 | <script src="semantic-components.js"></script> |
| 8 | <style> |
| 9 | body { |
| 10 | background: #000; |
| 11 | color: #fff; |
| 12 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 13 | padding: 40px; |
| 14 | max-width: 1400px; |
| 15 | margin: 0 auto; |
| 16 | } |
| 17 | |
| 18 | h1 { |
| 19 | margin-bottom: 40px; |
| 20 | } |
| 21 | |
| 22 | .demo-section { |
| 23 | margin-bottom: 80px; |
| 24 | } |
| 25 | |
| 26 | .demo-section h2 { |
| 27 | font-size: 20px; |
| 28 | color: #8e8e93; |
| 29 | margin-bottom: 30px; |
| 30 | } |
| 31 | |
| 32 | .demo-section p { |
| 33 | color: #8e8e93; |
| 34 | margin-bottom: 20px; |
| 35 | } |
| 36 | |
| 37 | /* Grid layouts */ |
| 38 | .grid-2col { |
| 39 | display: grid; |
| 40 | grid-template-columns: repeat(2, 1fr); |
| 41 | gap: 24px; |
| 42 | } |
| 43 | |
| 44 | .grid-3col { |
| 45 | display: grid; |
| 46 | grid-template-columns: repeat(3, 1fr); |
| 47 | gap: 24px; |
| 48 | } |
| 49 | |
| 50 | .grid-4col { |
| 51 | display: grid; |
| 52 | grid-template-columns: repeat(4, 1fr); |
| 53 | gap: 20px; |
| 54 | } |
| 55 | |
| 56 | .grid-auto { |
| 57 | display: grid; |
| 58 | grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); |
| 59 | gap: 24px; |
| 60 | } |
| 61 | |
| 62 | .grid-masonry { |
| 63 | display: grid; |
| 64 | grid-template-columns: repeat(3, 1fr); |
| 65 | gap: 24px; |
| 66 | grid-auto-flow: dense; |
| 67 | } |
| 68 | |
| 69 | .grid-masonry semantic-card:nth-child(3n+1) { |
| 70 | grid-row: span 1; |
| 71 | } |
| 72 | |
| 73 | .grid-masonry semantic-card:nth-child(3n+2) { |
| 74 | grid-row: span 1; |
| 75 | } |
| 76 | |
| 77 | /* Responsive */ |
| 78 | @media (max-width: 1024px) { |
| 79 | .grid-3col, .grid-4col { |
| 80 | grid-template-columns: repeat(2, 1fr); |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | @media (max-width: 640px) { |
| 85 | .grid-2col, .grid-3col, .grid-4col { |
| 86 | grid-template-columns: 1fr; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | /* Card content styling */ |
| 91 | .card-title { |
| 92 | font-size: 18px; |
| 93 | font-weight: 600; |
| 94 | margin: 0 0 8px 0; |
| 95 | } |
| 96 | |
| 97 | .card-description { |
| 98 | color: #8a8a8a; |
| 99 | font-size: 14px; |
| 100 | margin: 0; |
| 101 | line-height: 1.5; |
| 102 | } |
| 103 | |
| 104 | .stats { |
| 105 | display: flex; |
| 106 | gap: 16px; |
| 107 | margin-top: 12px; |
| 108 | font-size: 13px; |
| 109 | color: #8e8e93; |
| 110 | } |
| 111 | |
| 112 | .stat { |
| 113 | display: flex; |
| 114 | align-items: center; |
| 115 | gap: 4px; |
| 116 | } |
| 117 | </style> |
| 118 | </head> |
| 119 | <body> |
| 120 | <h1>semantic-card Grid Testing</h1> |
| 121 | |
| 122 | <div class="demo-section"> |
| 123 | <h2>2-Column Grid</h2> |
| 124 | <p>Perfect for product listings, blog posts, or featured content.</p> |
| 125 | |
| 126 | <div class="grid-2col"> |
| 127 | <semantic-card intent="primary"> |
| 128 | <h3 slot="title" class="card-title">MacBook Pro 16"</h3> |
| 129 | <p slot="description" class="card-description"> |
| 130 | Supercharged by M3 Pro and M3 Max chips. Up to 22 hours of battery life. |
| 131 | <div class="stats"> |
| 132 | <span class="stat">💻 Laptop</span> |
| 133 | <span class="stat">⭐ 4.9</span> |
| 134 | <span class="stat">💰 $2,499</span> |
| 135 | </div> |
| 136 | </p> |
| 137 | <div slot="actions"> |
| 138 | <semantic-action intent="primary">View Details</semantic-action> |
| 139 | <semantic-action intent="secondary">Compare</semantic-action> |
| 140 | </div> |
| 141 | </semantic-card> |
| 142 | |
| 143 | <semantic-card intent="success"> |
| 144 | <h3 slot="title" class="card-title">iPad Air</h3> |
| 145 | <p slot="description" class="card-description"> |
| 146 | Serious performance in a thin and light design. M2 chip delivers incredible power. |
| 147 | <div class="stats"> |
| 148 | <span class="stat">📱 Tablet</span> |
| 149 | <span class="stat">⭐ 4.8</span> |
| 150 | <span class="stat">💰 $599</span> |
| 151 | </div> |
| 152 | </p> |
| 153 | <div slot="actions"> |
| 154 | <semantic-action intent="primary">View Details</semantic-action> |
| 155 | <semantic-action intent="secondary">Compare</semantic-action> |
| 156 | </div> |
| 157 | </semantic-card> |
| 158 | |
| 159 | <semantic-card intent="warning"> |
| 160 | <h3 slot="title" class="card-title">AirPods Pro</h3> |
| 161 | <p slot="description" class="card-description"> |
| 162 | Active Noise Cancellation and Adaptive Audio. USB-C charging case included. |
| 163 | <div class="stats"> |
| 164 | <span class="stat">🎧 Audio</span> |
| 165 | <span class="stat">⭐ 4.7</span> |
| 166 | <span class="stat">💰 $249</span> |
| 167 | </div> |
| 168 | </p> |
| 169 | <div slot="actions"> |
| 170 | <semantic-action intent="primary">View Details</semantic-action> |
| 171 | <semantic-action intent="secondary">Compare</semantic-action> |
| 172 | </div> |
| 173 | </semantic-card> |
| 174 | |
| 175 | <semantic-card intent="danger"> |
| 176 | <h3 slot="title" class="card-title">Apple Watch Ultra 2</h3> |
| 177 | <p slot="description" class="card-description"> |
| 178 | The most rugged and capable Apple Watch. Titanium case, precision GPS. |
| 179 | <div class="stats"> |
| 180 | <span class="stat">⌚ Watch</span> |
| 181 | <span class="stat">⭐ 4.9</span> |
| 182 | <span class="stat">💰 $799</span> |
| 183 | </div> |
| 184 | </p> |
| 185 | <div slot="actions"> |
| 186 | <semantic-action intent="primary">View Details</semantic-action> |
| 187 | <semantic-action intent="secondary">Compare</semantic-action> |
| 188 | </div> |
| 189 | </semantic-card> |
| 190 | </div> |
| 191 | </div> |
| 192 | |
| 193 | <div class="demo-section"> |
| 194 | <h2>3-Column Grid</h2> |
| 195 | <p>Ideal for dashboards, feature showcases, or service offerings.</p> |
| 196 | |
| 197 | <div class="grid-3col"> |
| 198 | <semantic-card intent="primary"> |
| 199 | <h3 slot="title" class="card-title">🚀 Performance</h3> |
| 200 | <p slot="description" class="card-description"> |
| 201 | Lightning-fast load times and smooth interactions. Optimized for speed. |
| 202 | </p> |
| 203 | </semantic-card> |
| 204 | |
| 205 | <semantic-card intent="success"> |
| 206 | <h3 slot="title" class="card-title">🔒 Security</h3> |
| 207 | <p slot="description" class="card-description"> |
| 208 | Enterprise-grade security with end-to-end encryption and 2FA support. |
| 209 | </p> |
| 210 | </semantic-card> |
| 211 | |
| 212 | <semantic-card intent="warning"> |
| 213 | <h3 slot="title" class="card-title">📊 Analytics</h3> |
| 214 | <p slot="description" class="card-description"> |
| 215 | Real-time insights and detailed reports to track your progress. |
| 216 | </p> |
| 217 | </semantic-card> |
| 218 | |
| 219 | <semantic-card intent="danger"> |
| 220 | <h3 slot="title" class="card-title">🎨 Customization</h3> |
| 221 | <p slot="description" class="card-description"> |
| 222 | Fully customizable themes, layouts, and components to match your brand. |
| 223 | </p> |
| 224 | </semantic-card> |
| 225 | |
| 226 | <semantic-card intent="neutral"> |
| 227 | <h3 slot="title" class="card-title">🌐 Global CDN</h3> |
| 228 | <p slot="description" class="card-description"> |
| 229 | Content delivered from edge locations worldwide for minimal latency. |
| 230 | </p> |
| 231 | </semantic-card> |
| 232 | |
| 233 | <semantic-card intent="primary"> |
| 234 | <h3 slot="title" class="card-title">💬 Support</h3> |
| 235 | <p slot="description" class="card-description"> |
| 236 | 24/7 customer support with average response time under 2 minutes. |
| 237 | </p> |
| 238 | </semantic-card> |
| 239 | </div> |
| 240 | </div> |
| 241 | |
| 242 | <div class="demo-section"> |
| 243 | <h2>4-Column Grid</h2> |
| 244 | <p>Great for showing many items compactly, like app icons or mini-cards.</p> |
| 245 | |
| 246 | <div class="grid-4col"> |
| 247 | <semantic-card intent="primary"> |
| 248 | <h3 slot="title" class="card-title">📧 Email</h3> |
| 249 | <p slot="description" class="card-description">1,234 unread</p> |
| 250 | </semantic-card> |
| 251 | |
| 252 | <semantic-card intent="success"> |
| 253 | <h3 slot="title" class="card-title">✅ Tasks</h3> |
| 254 | <p slot="description" class="card-description">45 completed</p> |
| 255 | </semantic-card> |
| 256 | |
| 257 | <semantic-card intent="warning"> |
| 258 | <h3 slot="title" class="card-title">📅 Calendar</h3> |
| 259 | <p slot="description" class="card-description">5 events today</p> |
| 260 | </semantic-card> |
| 261 | |
| 262 | <semantic-card intent="danger"> |
| 263 | <h3 slot="title" class="card-title">🔔 Alerts</h3> |
| 264 | <p slot="description" class="card-description">3 urgent</p> |
| 265 | </semantic-card> |
| 266 | |
| 267 | <semantic-card intent="neutral"> |
| 268 | <h3 slot="title" class="card-title">📁 Files</h3> |
| 269 | <p slot="description" class="card-description">2.4 GB used</p> |
| 270 | </semantic-card> |
| 271 | |
| 272 | <semantic-card intent="primary"> |
| 273 | <h3 slot="title" class="card-title">👥 Team</h3> |
| 274 | <p slot="description" class="card-description">12 members</p> |
| 275 | </semantic-card> |
| 276 | |
| 277 | <semantic-card intent="success"> |
| 278 | <h3 slot="title" class="card-title">💰 Revenue</h3> |
| 279 | <p slot="description" class="card-description">$45,230</p> |
| 280 | </semantic-card> |
| 281 | |
| 282 | <semantic-card intent="warning"> |
| 283 | <h3 slot="title" class="card-title">📈 Growth</h3> |
| 284 | <p slot="description" class="card-description">+23.5%</p> |
| 285 | </semantic-card> |
| 286 | </div> |
| 287 | </div> |
| 288 | |
| 289 | <div class="demo-section"> |
| 290 | <h2>Auto-Fill Responsive Grid</h2> |
| 291 | <p>Automatically adjusts columns based on available space (min 300px per card).</p> |
| 292 | |
| 293 | <div class="grid-auto"> |
| 294 | <semantic-card intent="primary"> |
| 295 | <h3 slot="title" class="card-title">Project Alpha</h3> |
| 296 | <p slot="description" class="card-description"> |
| 297 | Next-generation web platform with AI-powered features. |
| 298 | <div class="stats"> |
| 299 | <span class="stat">👥 8 members</span> |
| 300 | <span class="stat">📅 Due: Mar 15</span> |
| 301 | </div> |
| 302 | </p> |
| 303 | <div slot="actions"> |
| 304 | <semantic-action intent="primary">Open</semantic-action> |
| 305 | </div> |
| 306 | </semantic-card> |
| 307 | |
| 308 | <semantic-card intent="success"> |
| 309 | <h3 slot="title" class="card-title">Project Beta</h3> |
| 310 | <p slot="description" class="card-description"> |
| 311 | Mobile app redesign with modern UI and improved UX. |
| 312 | <div class="stats"> |
| 313 | <span class="stat">👥 5 members</span> |
| 314 | <span class="stat">📅 Due: Mar 20</span> |
| 315 | </div> |
| 316 | </p> |
| 317 | <div slot="actions"> |
| 318 | <semantic-action intent="primary">Open</semantic-action> |
| 319 | </div> |
| 320 | </semantic-card> |
| 321 | |
| 322 | <semantic-card intent="warning"> |
| 323 | <h3 slot="title" class="card-title">Project Gamma</h3> |
| 324 | <p slot="description" class="card-description"> |
| 325 | Backend infrastructure upgrade to support 10x traffic. |
| 326 | <div class="stats"> |
| 327 | <span class="stat">👥 12 members</span> |
| 328 | <span class="stat">📅 Due: Apr 1</span> |
| 329 | </div> |
| 330 | </p> |
| 331 | <div slot="actions"> |
| 332 | <semantic-action intent="primary">Open</semantic-action> |
| 333 | </div> |
| 334 | </semantic-card> |
| 335 | |
| 336 | <semantic-card intent="danger"> |
| 337 | <h3 slot="title" class="card-title">Project Delta</h3> |
| 338 | <p slot="description" class="card-description"> |
| 339 | Critical security patches and compliance updates. |
| 340 | <div class="stats"> |
| 341 | <span class="stat">👥 6 members</span> |
| 342 | <span class="stat">📅 Due: Mar 10</span> |
| 343 | </div> |
| 344 | </p> |
| 345 | <div slot="actions"> |
| 346 | <semantic-action intent="primary">Open</semantic-action> |
| 347 | </div> |
| 348 | </semantic-card> |
| 349 | |
| 350 | <semantic-card intent="neutral"> |
| 351 | <h3 slot="title" class="card-title">Project Epsilon</h3> |
| 352 | <p slot="description" class="card-description"> |
| 353 | Documentation and training materials for new features. |
| 354 | <div class="stats"> |
| 355 | <span class="stat">👥 3 members</span> |
| 356 | <span class="stat">📅 Due: Apr 15</span> |
| 357 | </div> |
| 358 | </p> |
| 359 | <div slot="actions"> |
| 360 | <semantic-action intent="primary">Open</semantic-action> |
| 361 | </div> |
| 362 | </semantic-card> |
| 363 | </div> |
| 364 | </div> |
| 365 | |
| 366 | <div class="demo-section"> |
| 367 | <h2>Mixed Content Lengths</h2> |
| 368 | <p>Cards with varying content heights in a 3-column grid.</p> |
| 369 | |
| 370 | <div class="grid-3col"> |
| 371 | <semantic-card intent="primary"> |
| 372 | <h3 slot="title" class="card-title">Short Card</h3> |
| 373 | <p slot="description" class="card-description">Brief description.</p> |
| 374 | </semantic-card> |
| 375 | |
| 376 | <semantic-card intent="success"> |
| 377 | <h3 slot="title" class="card-title">Medium Length Card</h3> |
| 378 | <p slot="description" class="card-description"> |
| 379 | This card has a moderate amount of content to display. It demonstrates how cards with different content lengths align in a grid layout. |
| 380 | </p> |
| 381 | </semantic-card> |
| 382 | |
| 383 | <semantic-card intent="warning"> |
| 384 | <h3 slot="title" class="card-title">Longer Card with More Content</h3> |
| 385 | <p slot="description" class="card-description"> |
| 386 | This card contains significantly more text content to test how the grid layout handles varying heights. Cards should maintain consistent spacing and alignment despite content differences. The grid system ensures a clean, organized appearance regardless of individual card content length. |
| 387 | </p> |
| 388 | </semantic-card> |
| 389 | |
| 390 | <semantic-card intent="danger"> |
| 391 | <h3 slot="title" class="card-title">Card with Actions</h3> |
| 392 | <p slot="description" class="card-description"> |
| 393 | This card demonstrates how action buttons affect card height. |
| 394 | </p> |
| 395 | <div slot="actions"> |
| 396 | <semantic-action intent="primary">Primary</semantic-action> |
| 397 | <semantic-action intent="secondary">Secondary</semantic-action> |
| 398 | </div> |
| 399 | </semantic-card> |
| 400 | |
| 401 | <semantic-card intent="neutral"> |
| 402 | <h3 slot="title" class="card-title">Another Short One</h3> |
| 403 | <p slot="description" class="card-description">Minimal content here.</p> |
| 404 | </semantic-card> |
| 405 | |
| 406 | <semantic-card intent="primary"> |
| 407 | <h3 slot="title" class="card-title">Final Card</h3> |
| 408 | <p slot="description" class="card-description"> |
| 409 | A medium-length card to complete the grid and show how the layout handles the last row. |
| 410 | </p> |
| 411 | </semantic-card> |
| 412 | </div> |
| 413 | </div> |
| 414 | |
| 415 | <div class="demo-section"> |
| 416 | <h2>Real-World E-commerce Example</h2> |
| 417 | <p>Product grid with consistent styling and hover effects.</p> |
| 418 | |
| 419 | <div class="grid-3col"> |
| 420 | <semantic-card intent="primary"> |
| 421 | <h3 slot="title" class="card-title">Wireless Keyboard</h3> |
| 422 | <p slot="description" class="card-description"> |
| 423 | Bluetooth mechanical keyboard with RGB backlighting. Cherry MX switches. |
| 424 | <div class="stats"> |
| 425 | <span class="stat">⭐ 4.8 (2,450)</span> |
| 426 | <span class="stat">📦 In Stock</span> |
| 427 | <span class="stat" style="color: #30d158; font-weight: 600;">$129.99</span> |
| 428 | </div> |
| 429 | </p> |
| 430 | <div slot="actions"> |
| 431 | <semantic-action intent="primary">Add to Cart</semantic-action> |
| 432 | <semantic-action intent="secondary">♡ Save</semantic-action> |
| 433 | </div> |
| 434 | </semantic-card> |
| 435 | |
| 436 | <semantic-card intent="primary"> |
| 437 | <h3 slot="title" class="card-title">Ergonomic Mouse</h3> |
| 438 | <p slot="description" class="card-description"> |
| 439 | Vertical design reduces wrist strain. Precision optical sensor. |
| 440 | <div class="stats"> |
| 441 | <span class="stat">⭐ 4.6 (1,820)</span> |
| 442 | <span class="stat">📦 In Stock</span> |
| 443 | <span class="stat" style="color: #30d158; font-weight: 600;">$79.99</span> |
| 444 | </div> |
| 445 | </p> |
| 446 | <div slot="actions"> |
| 447 | <semantic-action intent="primary">Add to Cart</semantic-action> |
| 448 | <semantic-action intent="secondary">♡ Save</semantic-action> |
| 449 | </div> |
| 450 | </semantic-card> |
| 451 | |
| 452 | <semantic-card intent="primary"> |
| 453 | <h3 slot="title" class="card-title">4K Webcam</h3> |
| 454 | <p slot="description" class="card-description"> |
| 455 | Ultra HD video with auto-focus and noise cancellation. |
| 456 | <div class="stats"> |
| 457 | <span class="stat">⭐ 4.9 (3,100)</span> |
| 458 | <span class="stat">📦 In Stock</span> |
| 459 | <span class="stat" style="color: #30d158; font-weight: 600;">$199.99</span> |
| 460 | </div> |
| 461 | </p> |
| 462 | <div slot="actions"> |
| 463 | <semantic-action intent="primary">Add to Cart</semantic-action> |
| 464 | <semantic-action intent="secondary">♡ Save</semantic-action> |
| 465 | </div> |
| 466 | </semantic-card> |
| 467 | |
| 468 | <semantic-card intent="warning"> |
| 469 | <h3 slot="title" class="card-title">USB-C Hub</h3> |
| 470 | <p slot="description" class="card-description"> |
| 471 | 7-in-1 adapter with HDMI, USB 3.0, SD card, and 100W PD charging. |
| 472 | <div class="stats"> |
| 473 | <span class="stat">⭐ 4.7 (890)</span> |
| 474 | <span class="stat" style="color: #ff9f0a;">⚠️ Low Stock</span> |
| 475 | <span class="stat" style="color: #30d158; font-weight: 600;">$49.99</span> |
| 476 | </div> |
| 477 | </p> |
| 478 | <div slot="actions"> |
| 479 | <semantic-action intent="primary">Add to Cart</semantic-action> |
| 480 | <semantic-action intent="secondary">♡ Save</semantic-action> |
| 481 | </div> |
| 482 | </semantic-card> |
| 483 | |
| 484 | <semantic-card intent="success"> |
| 485 | <h3 slot="title" class="card-title">Monitor Arm</h3> |
| 486 | <p slot="description" class="card-description"> |
| 487 | Gas spring adjustable stand for 13-32" monitors. VESA compatible. |
| 488 | <div class="stats"> |
| 489 | <span class="stat">⭐ 4.8 (1,560)</span> |
| 490 | <span class="stat">📦 In Stock</span> |
| 491 | <span class="stat" style="color: #ff453a; font-weight: 600; text-decoration: line-through;">$89.99</span> |
| 492 | <span class="stat" style="color: #30d158; font-weight: 600;">$69.99</span> |
| 493 | </div> |
| 494 | </p> |
| 495 | <div slot="actions"> |
| 496 | <semantic-action intent="primary">Add to Cart</semantic-action> |
| 497 | <semantic-action intent="secondary">♡ Save</semantic-action> |
| 498 | </div> |
| 499 | </semantic-card> |
| 500 | |
| 501 | <semantic-card intent="danger"> |
| 502 | <h3 slot="title" class="card-title">Gaming Headset</h3> |
| 503 | <p slot="description" class="card-description"> |
| 504 | 7.1 surround sound with noise-cancelling microphone. |
| 505 | <div class="stats"> |
| 506 | <span class="stat">⭐ 4.5 (2,780)</span> |
| 507 | <span class="stat" style="color: #ff453a;">🔴 Out of Stock</span> |
| 508 | <span class="stat" style="color: #8e8e93; font-weight: 600;">$159.99</span> |
| 509 | </div> |
| 510 | </p> |
| 511 | <div slot="actions"> |
| 512 | <semantic-action intent="secondary" disabled>Notify Me</semantic-action> |
| 513 | </div> |
| 514 | </semantic-card> |
| 515 | </div> |
| 516 | </div> |
| 517 | |
| 518 | <div class="demo-section"> |
| 519 | <h2>Grid Performance Test</h2> |
| 520 | <p>Many cards to test rendering performance and scroll behavior.</p> |
| 521 | |
| 522 | <div class="grid-4col"> |
| 523 | <script> |
| 524 | // Generate 24 cards dynamically |
| 525 | for (let i = 1; i <= 24; i++) { |
| 526 | const intents = ['primary', 'success', 'warning', 'danger', 'neutral']; |
| 527 | const intent = intents[i % intents.length]; |
| 528 | document.write(` |
| 529 | <semantic-card intent="${intent}"> |
| 530 | <h3 slot="title" class="card-title">Card ${i}</h3> |
| 531 | <p slot="description" class="card-description"> |
| 532 | Performance test card #${i} |
| 533 | </p> |
| 534 | </semantic-card> |
| 535 | `); |
| 536 | } |
| 537 | </script> |
| 538 | </div> |
| 539 | </div> |
| 540 | |
| 541 | <script> |
| 542 | // Test interaction handlers |
| 543 | document.querySelectorAll('semantic-card').forEach((card, index) => { |
| 544 | card.addEventListener('click', (e) => { |
| 545 | // Only log if clicking the card itself, not buttons |
| 546 | if (e.target === card) { |
| 547 | console.log(`Card ${index + 1} clicked`); |
| 548 | } |
| 549 | }); |
| 550 | }); |
| 551 | |
| 552 | // Log grid layout info |
| 553 | console.log('Total cards on page:', document.querySelectorAll('semantic-card').length); |
| 554 | </script> |
| 555 | </body> |
| 556 | </html> |