| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>BulletsNormalizeLevels_Test</title> |
| <link rel="preconnect" href="https://fonts.googleapis.com"> |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap"> |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Oswald:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap"> |
| <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap"> |
| <style> |
| * { margin: 0; padding: 0; box-sizing: border-box; } |
| body { |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| background: #1a1a2e; |
| color: #e0e0e0; |
| padding: 40px 20px; |
| } |
| h1 { |
| text-align: center; |
| margin-bottom: 8px; |
| font-size: 28px; |
| color: #fff; |
| } |
| .meta { |
| text-align: center; |
| margin-bottom: 40px; |
| color: #888; |
| font-size: 14px; |
| } |
| .slide-container { |
| margin: 0 auto 60px auto; |
| max-width: 100%; |
| } |
| .slide-label { |
| text-align: center; |
| margin-bottom: 12px; |
| font-size: 16px; |
| font-weight: 600; |
| color: #aaa; |
| } |
| .slide-wrapper { |
| display: flex; |
| justify-content: center; |
| overflow-x: auto; |
| } |
| .slide { |
| flex-shrink: 0; |
| transform-origin: top left; |
| box-shadow: 0 4px 24px rgba(0,0,0,0.5); |
| } |
| .images-section { |
| max-width: 1400px; |
| margin: 60px auto; |
| } |
| .images-section h2 { |
| text-align: center; |
| margin-bottom: 24px; |
| color: #fff; |
| } |
| .images-grid { |
| display: grid; |
| grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); |
| gap: 20px; |
| } |
| .image-card { |
| background: #16213e; |
| border-radius: 8px; |
| overflow: hidden; |
| box-shadow: 0 2px 12px rgba(0,0,0,0.3); |
| } |
| .image-card img { |
| width: 100%; |
| height: 200px; |
| object-fit: contain; |
| background: #0f0f23; |
| padding: 8px; |
| } |
| .image-label { |
| padding: 8px 12px; |
| font-size: 11px; |
| color: #888; |
| word-break: break-all; |
| } |
| @media (max-width: 1920px) { |
| .slide { |
| transform: scale(0.5); |
| margin-bottom: -25%; |
| } |
| .slide-wrapper { |
| max-height: 600px; |
| } |
| } |
| @media (min-width: 1921px) { |
| .slide { |
| transform: scale(0.75); |
| margin-bottom: -12%; |
| } |
| } |
| </style> |
| </head> |
| <body> |
| <h1>BulletsNormalizeLevels_Test</h1> |
| <div class="meta">1 slide(s)</div> |
| |
| <div class="slide-container"> |
| <div class="slide-label">Slide 0 — Frame</div> |
| <div class="slide-wrapper"> |
| <div class="slide" data-slide-id="1:40" style="width: 1920.0px; height: 1080.0px; background-color: rgba(255,255,255,1.0); background-image: linear-gradient(rgba(255,255,255,1.0), rgba(255,255,255,1.0)); background-size: auto; background-position: 0 0; background-repeat: repeat; position: relative; overflow: hidden;"> |
| <div class="ft" data-id="1:41" style="position: absolute; left: 128.0px; top: 432.0px; width: 660.0px; height: 216.0px; opacity: 1.0; overflow: visible; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center"><div style="font-size: 60.0px; font-family: 'Inter', 'Oswald', 'Inter', 'Noto Sans', 'Helvetica Neue', 'Hiragino Sans', 'Yu Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', 'PingFang SC', 'Microsoft YaHei', Helvetica, Arial, sans-serif; font-weight: 700; letter-spacing: -1.3200000286102296px; line-height: 72.0px; text-align: left; color: rgba(0,0,0,1.0)">Mixed bullet levels (Normalize levels to 0/1)</div></div> |
| <div class="ft" data-id="1:42" style="position: absolute; left: 968.0px; top: 240.0px; width: 680.0px; height: 600.0px; opacity: 1.0; overflow: visible; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center"><div style="font-size: 36.0px; font-family: 'Inter', 'Oswald', 'Inter', 'Noto Sans', 'Helvetica Neue', 'Hiragino Sans', 'Yu Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', 'PingFang SC', 'Microsoft YaHei', Helvetica, Arial, sans-serif; font-weight: 400; letter-spacing: -0.36px; line-height: 50.39999771118164px; text-align: left; color: rgba(0,0,0,1.0)">Project Alpha<br><ul style="margin: 0; padding-left: 3em"><li>requirements drafted</li><li>design in progress</li></ul>Project Beta<br><ul style="margin: 0; padding-left: 3em"><li>needs owner</li></ul><ul style="margin: 0; padding-left: 4em"><li>blocked by procurement</li></ul>Project Theta<br><ul style="margin: 0; padding-left: 3em"><li>4 steps to unblocking path state</li></ul><ul style="margin: 0; padding-left: 4em"><li>First: Copy</li></ul><ul style="margin: 0; padding-left: 5em"><li>Second: Untangle</li></ul><ul style="margin: 0; padding-left: 6em"><li>Third: Reroute</li><li>Fourth: Toggle</li></ul></div></div> |
|
|
| </div> |
| </div> |
| </div> |
|
|
| |
| <script> |
| |
| (function() { |
| |
| var slackCache = new WeakMap(); |
| function computeSlack(container) { |
| if (slackCache.has(container)) return slackCache.get(container); |
| var slide = container.closest('.slide'); |
| var er = container.getBoundingClientRect(); |
| var sliderc = slide ? slide.getBoundingClientRect() : null; |
| var leftS = Infinity, rightS = Infinity, topS = Infinity, botS = Infinity; |
| if (slide) { |
| |
| slide.querySelectorAll('.ft').forEach(function(other) { |
| if (other === container || container.contains(other) || other.contains(container)) return; |
| var or = other.getBoundingClientRect(); |
| var vertOverlap = or.top < er.bottom - 0.5 && or.bottom > er.top + 0.5; |
| var horzOverlap = or.left < er.right - 0.5 && or.right > er.left + 0.5; |
| if (vertOverlap) { |
| if (or.left >= er.right - 0.5) rightS = Math.min(rightS, or.left - er.right); |
| if (or.right <= er.left + 0.5) leftS = Math.min(leftS, er.left - or.right); |
| } |
| if (horzOverlap) { |
| if (or.top >= er.bottom - 0.5) botS = Math.min(botS, or.top - er.bottom); |
| if (or.bottom <= er.top + 0.5) topS = Math.min(topS, er.top - or.bottom); |
| } |
| }); |
| } |
| if (sliderc) { |
| leftS = Math.min(leftS, Math.max(0, er.left - sliderc.left)); |
| rightS = Math.min(rightS, Math.max(0, sliderc.right - er.right)); |
| topS = Math.min(topS, Math.max(0, er.top - sliderc.top)); |
| botS = Math.min(botS, Math.max(0, sliderc.bottom - er.bottom)); |
| } |
| var scale = er.width / (container.clientWidth || 1); |
| var toLayout = function(v) { return v === Infinity ? 99999 : Math.max(0, v / (scale || 1)); }; |
| var s = { left: toLayout(leftS), right: toLayout(rightS), top: toLayout(topS), bottom: toLayout(botS) }; |
| slackCache.set(container, s); |
| return s; |
| } |
| function fitOne(container) { |
| var inner = container.firstElementChild; |
| if (!inner) return; |
| var cw = container.clientWidth, ch = container.clientHeight; |
| if (!cw || !ch) return; |
| if (inner.dataset.origFs) { |
| inner.style.fontSize = inner.dataset.origFs; |
| if (inner.dataset.origLs) inner.style.letterSpacing = inner.dataset.origLs; |
| if (inner.dataset.origLh) inner.style.lineHeight = inner.dataset.origLh; |
| } else { |
| inner.dataset.origFs = getComputedStyle(inner).fontSize; |
| inner.dataset.origLs = getComputedStyle(inner).letterSpacing; |
| inner.dataset.origLh = getComputedStyle(inner).lineHeight; |
| } |
| var origFs = parseFloat(inner.dataset.origFs); |
| var origLs = parseFloat(inner.dataset.origLs) || 0; |
| var origLh = parseFloat(inner.dataset.origLh) || 0; |
| |
| var isSingleLine = getComputedStyle(inner).whiteSpace === 'nowrap' || !/<br/i.test(inner.innerHTML); |
| var slack = computeSlack(container); |
| var align = getComputedStyle(inner).textAlign; |
| |
| var allowedW; |
| if (align === 'right' || align === 'end') allowedW = cw + slack.left; |
| else if (align === 'center') allowedW = cw + 2 * Math.min(slack.left, slack.right); |
| else allowedW = cw + slack.right; |
| var allowedH = ch + slack.bottom; |
| var fs = origFs; |
| for (var iter = 0; iter < 8; iter++) { |
| var iw = inner.scrollWidth, ih = inner.scrollHeight; |
| var rw = iw > allowedW + 0.5 ? allowedW / iw : 1; |
| var rh = (!isSingleLine && ih > allowedH + 0.5) ? allowedH / ih : 1; |
| var r = Math.min(rw, rh); |
| if (r > 0.998) break; |
| var newFs = Math.max(6, fs * r); |
| if (newFs >= fs - 0.05) break; |
| fs = newFs; |
| inner.style.fontSize = fs + 'px'; |
| |
| if (origLs) inner.style.letterSpacing = (origLs * fs / origFs) + 'px'; |
| if (origLh) inner.style.lineHeight = (origLh * fs / origFs) + 'px'; |
| } |
| } |
| function fitAll() { document.querySelectorAll('.ft').forEach(fitOne); } |
| if (document.fonts && document.fonts.ready) { |
| document.fonts.ready.then(fitAll); |
| } else { |
| window.addEventListener('load', fitAll); |
| } |
| var t; |
| window.addEventListener('resize', function() { clearTimeout(t); t = setTimeout(fitAll, 150); }); |
| })(); |
| </script> |
| </body> |
| </html> |
|
|