diff --git a/src/render.ts b/src/render.ts index d0ddbb4..a0ca671 100644 --- a/src/render.ts +++ b/src/render.ts @@ -101,18 +101,18 @@ h1 { margin: 0; font-size: clamp(28px, 5vw, 44px); line-height: 1.12; letter-spa .content img { max-width: 100%; height: auto; border-radius: 8px; } .content a[data-citation] { color: var(--muted); font-size: 0.92em; white-space: nowrap; text-decoration-thickness: 1px; text-underline-offset: 2px; } .content a[data-citation] img { width: 14px; height: 14px; max-width: 14px; max-height: 14px; border-radius: 3px; object-fit: cover; vertical-align: -2px; margin: 0 3px 0 4px; } -.downloads { border-top: 1px solid var(--border); background: var(--soft); } -.downloads-inner { max-width: 880px; margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; overflow-x: auto; } +.downloads { position: relative; z-index: 3; border-top: 1px solid var(--border); background: var(--soft); } +.downloads-inner { max-width: 880px; margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; overflow: visible; } .icon-button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text); padding: 0; display: inline-grid; place-items: center; flex: 0 0 auto; cursor: pointer; text-decoration: none; } .icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; } .icon-button:hover { background: color-mix(in srgb, var(--panel) 88%, var(--text) 12%); } .shot-control { display: inline-flex; align-items: stretch; flex: 0 0 auto; position: relative; } .shot-control .shot-main { border-radius: 8px 0 0 8px; border-right: 0; } -.shot-control details { position: relative; } +.shot-control details { position: static; } .shot-control summary { list-style: none; border-radius: 0 8px 8px 0; width: 28px; } .shot-control summary::-webkit-details-marker { display: none; } .shot-control summary svg { width: 15px; height: 15px; } -.shot-menu { position: absolute; right: 0; bottom: calc(100% + 8px); z-index: 4; min-width: 150px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.12); } +.shot-menu { position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 20; min-width: 150px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); box-shadow: 0 12px 30px rgba(0,0,0,.12); } .shot-menu button { width: 100%; border: 0; border-radius: 6px; background: transparent; color: var(--text); padding: 8px 10px; font: inherit; font-size: 13px; text-align: left; cursor: pointer; } .shot-menu button:hover, .shot-menu button[data-current="true"] { background: var(--soft); } .source { max-width: 880px; margin: 0 auto; padding: 18px 20px 34px; color: var(--muted); font-size: 12px; } @@ -151,8 +151,14 @@ function pageScript(slug: string): string { var copy = document.querySelector("[data-copy]"); if (copy) copy.addEventListener("click", async function () { await navigator.clipboard.writeText(location.href.replace(/[?#].*$/, "")); - copy.textContent = "Copied"; - setTimeout(function () { copy.textContent = "Copy link"; }, 1400); + copy.dataset.copied = "true"; + copy.setAttribute("aria-label", "Copied"); + copy.setAttribute("title", "Copied"); + setTimeout(function () { + delete copy.dataset.copied; + copy.setAttribute("aria-label", "Copy link"); + copy.setAttribute("title", "Copy link"); + }, 1400); }); document.querySelectorAll("[data-copy-code]").forEach(function (button) { button.addEventListener("click", async function () {