Page: spacing for the echoed lines; shoot script scrolls play views to the newest
This commit is contained in:
parent
4e067a073a
commit
e0c466094d
2 changed files with 2 additions and 1 deletions
|
|
@ -46,7 +46,7 @@ textarea { resize: vertical; line-height: 1.5; }
|
|||
.line { border-left: 4px solid var(--bad); background: var(--badbg); border-radius: .4rem; padding: .6rem .8rem; margin: .75rem 0; }
|
||||
.line.info { border-color: var(--accent); background: var(--panel); }
|
||||
.turn { margin: 1.4rem 0; }
|
||||
.you { color: var(--muted); font-style: italic; border-left: 3px solid var(--line); padding-left: .8rem; margin: 0 0 .7rem; white-space: pre-wrap; }
|
||||
.you { color: var(--muted); font-style: italic; border-left: 3px solid var(--line); padding-left: .8rem; margin: .8rem 0; white-space: pre-wrap; }
|
||||
.story { white-space: pre-wrap; margin: 0; }
|
||||
.ask { border: 1px solid var(--accent); border-radius: .6rem; padding: .6rem .8rem; margin: .8rem 0; }
|
||||
.status { color: var(--muted); font: 500 .85rem var(--head); }
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ async function shot(name) {
|
|||
for (const [label, [w, h]] of Object.entries(widths)) {
|
||||
await cdp("Emulation.setDeviceMetricsOverride", { width: w, height: h, deviceScaleFactor: label === "phone" ? 2 : 1, mobile: label === "phone" });
|
||||
await sleep(350);
|
||||
await js("document.querySelector('#say') && window.scrollTo(0, document.documentElement.scrollHeight)"); await sleep(200);
|
||||
const overflow = await js("document.documentElement.scrollWidth > document.documentElement.clientWidth");
|
||||
const { result } = await cdp("Page.captureScreenshot", { format: "png" });
|
||||
writeFileSync(join(out, `${name}-${label}.png`), Buffer.from(result.data, "base64"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue