25 lines
1.2 KiB
Markdown
25 lines
1.2 KiB
Markdown
# Flyer source
|
|
|
|
`flyer.html` is the source for `public/assets/founders-break-flyer.pdf`. It is
|
|
not served by the site; it lives here so the flyer can be regenerated rather
|
|
than re-designed when a detail changes.
|
|
|
|
US Letter, one page, printed on white on purpose: a full-bleed dark flyer drinks
|
|
toner and collapses to a solid block on the mono laser printers in most campus
|
|
libraries. The blueprint line art carries the brand and survives a black-and-white
|
|
print intact.
|
|
|
|
Regenerate after editing (needs Chrome and playwright):
|
|
|
|
```js
|
|
const { chromium } = require('playwright');
|
|
const b = await chromium.launch({ executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' });
|
|
const p = await b.newPage({ viewport: { width: 816, height: 1056 }, deviceScaleFactor: 2 });
|
|
await p.goto('file:///abs/path/design/flyer.html', { waitUntil: 'networkidle' });
|
|
await p.evaluate(() => document.fonts.ready);
|
|
await p.pdf({ path: '../public/assets/founders-break-flyer.pdf', width: '8.5in', height: '11in',
|
|
printBackground: true, margin: { top: '0', right: '0', bottom: '0', left: '0' } });
|
|
```
|
|
|
|
Check `document.body.scrollHeight - 1056 === 0` before shipping: anything over
|
|
spills onto a second page, and the QR is the first thing to fall off.
|