Files
sweet/www/utils/screenshot.ts
T
c7cbd23052 www: new landing page (#602)
* design: add icons to features

* www: update intro layout

* www: add copy button

* www: create CopyArea island

* www: update info style

* www: add showcase

* Update www/routes/index.tsx

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>

* www: set text-center to feature descriptions

* www: remove showcase image tabindex

add hover feedback to the showcase tiles

* www: add deno install / update links

* www: left align the feature descriptions on small screens

* www: fix broken getting started layout on mobile

* www: always show the copy buttons

* www: add some additional vertical spacing

* improve screenshots

Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-08-10 14:50:29 +09:00

19 lines
484 B
TypeScript

import puppeteer from "https://deno.land/x/puppeteer@14.1.1/mod.ts";
const url = Deno.args[0];
const id = Deno.args[1];
if (!url || !id) {
console.log("Usage: screenshot <url> <id>");
Deno.exit(1);
}
const browser = await puppeteer.launch({
defaultViewport: { width: 1200, height: 675 },
});
const page = await browser.newPage();
await page.goto(url, { waitUntil: "networkidle2" });
await page.screenshot({ path: `./www/static/showcase/${id}.png` });
await browser.close();