Prints the link preview's card as an SVG, 1200 by 630: what Discord or Twitter shows when the
site's address is pasted. tools/build-web.sh turns it into the PNG the page's tags point at.
The look is the Jev sites' own (jev_ui::card): the dot field, the pink band with the site's
name, and a window. What is inside the window is this site's.
What the window says, a line each, in the card's pixel type.
11const LINES: [&str; 3] = ["JEV JUDGES WHAT", "CLAUDE CODE IS", "ABOUT TO DO"];
13fn main() { 14 let chrome = Chrome::new(2); 15 assert_eq!((chrome.width(), chrome.height()), (CARD_WIDTH, CARD_HEIGHT), "the card is the size the page's tags declare"); 16 let content = chrome.content(); 17 let scale = 4 * chrome.unit(); 18 // A glyph is eight units tall; a line and a half between baselines. 19 let step = 12 * scale; 20 let mut svg = chrome.background_svg("hooks.lmjtfy.fun"); 21 let end = svg.rfind("</svg>").expect("a whole SVG document"); 22 let mut inside = chrome.window_svg(NAME); 23 for (line, words) in LINES.iter().enumerate() { 24 inside.push_str(&text(content.x, content.y + line as u32 * step, scale, INK, words)); 25 } 26 svg.insert_str(end, &inside); 27 println!("{svg}"); 28}