|
| 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>Shop – 3D Prints</title> |
| 7 | + |
| 8 | + <script src="https://cdn.tailwindcss.com"></script> |
| 9 | + <script> |
| 10 | + tailwind.config = { |
| 11 | + theme: { |
| 12 | + extend: { |
| 13 | + colors: { |
| 14 | + brand: '#10b981', |
| 15 | + } |
| 16 | + } |
| 17 | + } |
| 18 | + }; |
| 19 | + </script> |
| 20 | + </head> |
| 21 | + |
| 22 | + <body class="bg-gray-950 min-h-screen text-white font-sans"> |
| 23 | + |
| 24 | + <!-- HEADER --> |
| 25 | + <header class="max-w-5xl mx-auto px-6 py-6 flex justify-between items-center"> |
| 26 | + <h1 class="text-2xl font-semibold">Shop</h1> |
| 27 | + |
| 28 | + <a href="./index.html" |
| 29 | + class="px-4 py-2 bg-white/10 border border-white/20 rounded-lg hover:bg-white/20 transition"> |
| 30 | + ← Back to Home |
| 31 | + </a> |
| 32 | + </header> |
| 33 | + |
| 34 | + <!-- SHOP CONTAINER --> |
| 35 | + <main class="max-w-5xl mx-auto px-6 py-10"> |
| 36 | + |
| 37 | + <h2 class="text-xl font-semibold mb-6">All Products</h2> |
| 38 | + |
| 39 | + <!-- Shop Items Grid --> |
| 40 | + <div id="shopItems" class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6"></div> |
| 41 | + |
| 42 | + </main> |
| 43 | + |
| 44 | + <!-- JS ITEM BUILDER --> |
| 45 | + <script> |
| 46 | + function addShopItem(name, price, image, link) { |
| 47 | + const container = document.getElementById("shopItems"); |
| 48 | + |
| 49 | + const item = document.createElement("div"); |
| 50 | + item.className = |
| 51 | + "bg-white/5 backdrop-blur-xl p-6 rounded-2xl border border-white/10 shadow-lg transition hover:scale-[1.02] hover:shadow-brand/20"; |
| 52 | + |
| 53 | + item.innerHTML = ` |
| 54 | + <img alt="" src="${image}" class="w-full h-40 object-cover rounded-xl mb-4 border border-white/10"> |
| 55 | +
|
| 56 | + <h3 class="text-lg font-semibold">${name}</h3> |
| 57 | + <p class="text-gray-400 text-sm mb-4">${price}$</p> |
| 58 | +
|
| 59 | + <a href="${link}" target="_blank" |
| 60 | + class="inline-block bg-brand text-black font-semibold px-4 py-2 rounded-lg hover:bg-brand/80 transition"> |
| 61 | + Buy → |
| 62 | + </a> |
| 63 | + `; |
| 64 | + |
| 65 | + container.appendChild(item); |
| 66 | + } |
| 67 | + |
| 68 | + // Example items — replace with your real ones: |
| 69 | + addShopItem("Fidget Spinner", 1.25, "./images/fidgetspinner.png", "https://www.paypal.com/ncp/payment/JDDULBSP3A4XN"); |
| 70 | + addShopItem("Fidget Gyro Ring", 1.00, "./images/gyroringfidget.png", "https://www.paypal.com/ncp/payment/99836MVB6AZKA"); |
| 71 | + addShopItem("Door Unlocker", 1.50, "./images/unlocker.png", "https://www.paypal.com/ncp/payment/BT9X7R8B6A4GW") |
| 72 | + </script> |
| 73 | + |
| 74 | + </body> |
| 75 | + </html> |
0 commit comments