| 1 | <!DOCTYPE html> |
| 2 | <html lang="zh-CN"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"><title>Theme Showcase — html-ppt v2</title> |
| 5 | <link rel="stylesheet" href="../assets/fonts.css"> |
| 6 | <link rel="stylesheet" href="../assets/base.css"> |
| 7 | <link rel="stylesheet" href="../assets/animations/animations.css"> |
| 8 | <style> |
| 9 | /* NOTE: theme isolation via <iframe srcdoc> per slide. Each slide loads base.css |
| 10 | + its OWN theme.css, so pressing → actually shows a different look. */ |
| 11 | html,body{background:#0b0c10;color:#e8ebf4} |
| 12 | .deck{background:#0b0c10} |
| 13 | .slide{padding:0;background:transparent} |
| 14 | .theme-frame{ |
| 15 | position:absolute;inset:0;width:100%;height:100%; |
| 16 | border:0;background:#fff; |
| 17 | } |
| 18 | .theme-chrome{ |
| 19 | position:absolute;top:22px;left:40px;right:40px;display:flex;justify-content:space-between; |
| 20 | font-family:'JetBrains Mono',monospace;font-size:12px;color:#aab0c0;letter-spacing:.12em; |
| 21 | text-transform:uppercase;z-index:20;pointer-events:none;mix-blend-mode:difference; |
| 22 | } |
| 23 | .theme-chrome .name{color:#fff;font-weight:700} |
| 24 | </style> |
| 25 | </head> |
| 26 | <body> |
| 27 | <div class="deck"></div> |
| 28 | |
| 29 | <script> |
| 30 | /* 36 themes total (24 v1 + 12 v2). Each rendered in its OWN iframe so CSS is isolated. */ |
| 31 | const THEMES = [ |
| 32 | ['minimal-white', '极简白 · clean restraint'], |
| 33 | ['editorial-serif', '杂志衬线 · high editorial'], |
| 34 | ['soft-pastel', '马卡龙 · soft pastel'], |
| 35 | ['sharp-mono', '黑白高对比 · sharp mono'], |
| 36 | ['arctic-cool', '冷色调 · arctic'], |
| 37 | ['sunset-warm', '暖色调 · sunset'], |
| 38 | ['catppuccin-latte', 'Catppuccin Latte'], |
| 39 | ['catppuccin-mocha', 'Catppuccin Mocha'], |
| 40 | ['dracula', 'Dracula'], |
| 41 | ['tokyo-night', 'Tokyo Night'], |
| 42 | ['nord', 'Nord · nordic cool'], |
| 43 | ['solarized-light', 'Solarized Light'], |
| 44 | ['gruvbox-dark', 'Gruvbox Dark'], |
| 45 | ['rose-pine', 'Rose Pine'], |
| 46 | ['neo-brutalism', 'Neo-Brutalism'], |
| 47 | ['glassmorphism', 'Glassmorphism'], |
| 48 | ['bauhaus', 'Bauhaus 几何原色'], |
| 49 | ['swiss-grid', 'Swiss Grid'], |
| 50 | ['terminal-green', 'Terminal Green'], |
| 51 | ['xiaohongshu-white', '小红书白底'], |
| 52 | ['rainbow-gradient', 'Rainbow Gradient'], |
| 53 | ['aurora', 'Aurora 极光'], |
| 54 | ['blueprint', 'Blueprint 蓝图'], |
| 55 | ['memphis-pop', 'Memphis Pop'], |
| 56 | /* v2 additions */ |
| 57 | ['cyberpunk-neon', 'Cyberpunk Neon 霓虹'], |
| 58 | ['y2k-chrome', 'Y2K Chrome 镜面'], |
| 59 | ['retro-tv', 'Retro TV CRT 扫描线'], |
| 60 | ['japanese-minimal', '和风极简 · 朱红'], |
| 61 | ['vaporwave', 'Vaporwave 蒸汽波'], |
| 62 | ['midcentury', 'Mid-Century Modern'], |
| 63 | ['corporate-clean', 'Corporate Clean 商务'], |
| 64 | ['academic-paper', '学术白皮书'], |
| 65 | ['news-broadcast', 'News Broadcast 新闻'], |
| 66 | ['pitch-deck-vc', 'Pitch Deck VC / YC'], |
| 67 | ['magazine-bold', 'Magazine Bold 大字杂志'], |
| 68 | ['engineering-whiteprint','Engineering Whiteprint'] |
| 69 | ]; |
| 70 | |
| 71 | /* The demo content that each iframe will render. Uses tokens only, so it picks up |
| 72 | whatever theme the iframe loads. Self-contained — no external references. */ |
| 73 | function demoHTML(themeName, label){ |
| 74 | return `<!doctype html><html><head><meta charset="utf-8"> |
| 75 | <link rel="stylesheet" href="../assets/fonts.css"> |
| 76 | <link rel="stylesheet" href="../assets/base.css"> |
| 77 | <link rel="stylesheet" href="../assets/themes/${themeName}.css"> |
| 78 | <link rel="stylesheet" href="../assets/animations/animations.css"> |
| 79 | <style> |
| 80 | html,body{height:100%} |
| 81 | .wrap{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center; |
| 82 | padding:72px 96px;box-sizing:border-box;background:var(--bg);color:var(--text-1); |
| 83 | font-family:var(--font-sans)} |
| 84 | .swatch{display:flex;gap:10px;margin-top:18px} |
| 85 | .swatch div{width:44px;height:44px;border-radius:10px;border:1px solid var(--border)} |
| 86 | .kpi{font-size:54px;font-weight:800;letter-spacing:-.02em} |
| 87 | .mini-code{font-family:var(--font-mono);font-size:11px;background:var(--surface-2); |
| 88 | padding:10px 12px;border-radius:8px;margin:6px 0 0;white-space:pre;color:var(--text-1); |
| 89 | border:1px solid var(--border)} |
| 90 | </style> |
| 91 | </head><body><div class="wrap"> |
| 92 | <p class="kicker">Theme · ${themeName}</p> |
| 93 | <h1 class="h1">${label}</h1> |
| 94 | <p class="lede">Same demo slide, different tokens. Background, type, accent, radius, shadow all come from <code>assets/themes/${themeName}.css</code>.</p> |
| 95 | <div class="grid g3 mt-l"> |
| 96 | <div class="card"> |
| 97 | <h4>Palette · 调色盘</h4> |
| 98 | <p class="dim">accent / accent-2 / accent-3 / text / surface-2</p> |
| 99 | <div class="swatch"> |
| 100 | <div style="background:var(--accent)"></div> |
| 101 | <div style="background:var(--accent-2)"></div> |
| 102 | <div style="background:var(--accent-3)"></div> |
| 103 | <div style="background:var(--text-1)"></div> |
| 104 | <div style="background:var(--surface-2)"></div> |
| 105 | </div> |
| 106 | </div> |
| 107 | <div class="card"> |
| 108 | <h4>KPI</h4> |
| 109 | <div class="kpi gradient-text">2.4K</div> |
| 110 | <p class="dim">上周月活 · weekly active</p> |
| 111 | </div> |
| 112 | <div class="card"> |
| 113 | <h4>Code · 令牌</h4> |
| 114 | <pre class="mini-code">:root { |
| 115 | --accent: /* theme */; |
| 116 | --radius: /* theme */; |
| 117 | }</pre> |
| 118 | </div> |
| 119 | </div> |
| 120 | <div class="row mt-m" style="gap:10px;flex-wrap:wrap"> |
| 121 | <span class="pill">#tokens</span> |
| 122 | <span class="pill pill-accent">primary</span> |
| 123 | <span class="pill">#radius</span> |
| 124 | <span class="pill">#shadow</span> |
| 125 | <span class="pill">#type</span> |
| 126 | </div> |
| 127 | </div></body></html>`; |
| 128 | } |
| 129 | |
| 130 | (function(){ |
| 131 | const deck = document.querySelector('.deck'); |
| 132 | THEMES.forEach((t,i)=>{ |
| 133 | const s = document.createElement('section'); |
| 134 | s.className = 'slide'; |
| 135 | s.setAttribute('data-title', t[0]); |
| 136 | const chrome = `<div class="theme-chrome"><span class="name">${String(i+1).padStart(2,'0')} · ${t[0]}</span><span>${i+1}/${THEMES.length}</span></div>`; |
| 137 | const iframe = document.createElement('iframe'); |
| 138 | iframe.className = 'theme-frame'; |
| 139 | iframe.setAttribute('loading','eager'); |
| 140 | // Use src via data URL for the inline demo HTML so relative paths still resolve from the templates/ dir. |
| 141 | // Easier: use srcdoc but set <base href> to the templates dir so relative ../assets paths work. |
| 142 | const base = `<base href="${location.href}">`; |
| 143 | iframe.srcdoc = demoHTML(t[0], t[1]).replace('<head>','<head>'+base); |
| 144 | s.innerHTML = chrome; |
| 145 | s.appendChild(iframe); |
| 146 | deck.appendChild(s); |
| 147 | }); |
| 148 | })(); |
| 149 | </script> |
| 150 | <script src="../assets/runtime.js"></script> |
| 151 | </body></html> |
| 152 |