diff --git a/intro_overlay.py b/intro_overlay.py index 5261cd6..bd0767a 100644 --- a/intro_overlay.py +++ b/intro_overlay.py @@ -58,7 +58,7 @@ def render_intro_overlay(fallback_ms: int = INTRO_FALLBACK_MS, }} #eir-skip:hover {{ background: rgba(0,0,0,0.7); }} #eir-replay {{ - position: fixed; top: 12px; right: 14px; z-index: 2147483647; + position: fixed; top: 12px; right: 72px; z-index: 2147483647; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #17171a; border: 1px solid rgba(245,126,26,0.55); @@ -75,6 +75,22 @@ def render_intro_overlay(fallback_ms: int = INTRO_FALLBACK_MS, replay.innerHTML = ''; doc.body.appendChild(replay); + // Den ▶-Button links NEBEN Streamlits Menue-Leiste (oben rechts) platzieren, statt darueber. + // Die Toolbar (Deploy + ⋮-Menue) rendert asynchron -> mehrfach nachjustieren + bei Resize. + function positionReplay() {{ + var win = window.parent, gap = 12, fallback = 72; + var tb = doc.querySelector('[data-testid="stToolbar"]'); + var rightPx = fallback; + if (tb) {{ + var cluster = win.innerWidth - tb.getBoundingClientRect().left; // Breite des Menue-Clusters + if (cluster > 8 && cluster < win.innerWidth * 0.6) rightPx = Math.round(cluster) + gap; + }} + replay.style.right = rightPx + 'px'; + }} + positionReplay(); + [150, 500, 1200].forEach(function(t) {{ setTimeout(positionReplay, t); }}); + window.parent.addEventListener('resize', positionReplay); + var backdrop = doc.createElement('div'); backdrop.id = 'eir-backdrop'; backdrop.innerHTML =