Generate high-density editorial HTML info cards in a modern magazine and Swiss-international style, then capture them as ratio-specific screenshots. Use when the user provides text or core information and wants: (1) a complete responsive HTML info card, (2) the design to follow the stored editorial prompt, (3) output in fixed visual ratios such as 3:4, 4:3, 1:1, 16:9, 9:16, 2.35:1, 3:1, or 5:2, or (4) both HTML and a rendered PNG cover/card from the same content.
Turn source text into a compact, high-contrast HTML information card that follows the user's editorial prompt, then render a screenshot in one of the supported aspect ratios.
Always preserve three output stages unless the user explicitly asks to skip one:
1. Write one sentence judging the information density as high, medium, or low.
Output the complete HTML with embedded CSS.
Self-check that body text remains readable on mobile.
Workflow
1. Analyze Content Density
Choose layout strategy from the content itself:
- Use "big-character" composition when content is sparse and a single phrase, number, or hook can carry the page.
Use a two-column or three-column editorial grid when content is dense and needs stronger hierarchy.
Use oversized numbers, heavy rules, tinted blocks, and pull-quote scale to avoid dead space.
Do not force dense content into evenly weighted tiles. Build primary blocks, secondary blocks, and lighter supporting blocks.
Match structure to content type:
- Ranking / recommendation content: allow asymmetric hero + structured list.
- Tutorial / analysis / interpretation content: group into overview, core judgment, interpretation, boundary, and conclusion.
Before compressing content, first change the layout skeleton.
- Ratio changes should primarily change reading path, hierarchy, and module arrangement.
Do not treat ratio changes as a reason to delete content by default.
Only compress, group, or summarize when the current ratio cannot hold the content clearly after layout has already been restructured.
2. Apply the Stored Editorial Rules
Use these defaults unless the user overrides them:
The rendering helper requires a local Chrome or Chromium binary.
It first respects CHROME_BIN when set, then falls back to common binary names and a macOS Chrome app path.
Before running the script:
- Save the generated HTML to a local file.
Ensure the page is self-contained except for fonts.
If you keep the default font imports, rendering will request Google Fonts over the network.
Ensure the HTML uses a fixed-size design canvas that matches the chosen ratio preset.
Ensure the viewport composition already matches the requested ratio.
6. Ratio Policy
Accept only these ratio presets:
- INLINECODE29
INLINECODE30
INLINECODE31
INLINECODE32
INLINECODE33
INLINECODE34
INLINECODE35
INLINECODE36
If the user gives a ratio outside this set, ask them to map it to the nearest supported preset rather than inventing a new one.
Output Contract
When responding to a card-generation request:
- Start with exactly one sentence describing information density.
Then output complete HTML in one code block.
If the user also requested an image, state the ratio used and the screenshot command after the HTML.
Keep prose short; the HTML is the deliverable.
Resources
references/ratios.md
Open this when you need the exact preset names or capture dimensions.
references/editorial-card-prompt.md
Use this as the canonical prompt spec when the user wants the latest validated editorial-card behavior.
scripts/capture_card.sh
Run this to capture a PNG from a local HTML file using a supported ratio preset.
It requires a local Chrome or Chromium binary or an explicit CHROME_BIN override.
assets/card-template.html
Use this as a starting shell when you want a minimal ratio-ready HTML canvas before filling in real content.
Failure Checks
Before finalizing HTML or PNG, explicitly reject the result if any of these happen:
- The title overlaps, visually collides with, or blocks summary/body content.
The title becomes a narrow vertical strip when more horizontal width is available.
Dense cards are split into too many equal-weight boxes.
Large blocks contain too little copy and read like empty containers.
The canvas shows large areas of dead space that could be filled by stronger hierarchy, richer block content, or a heavier main module.
The PNG feels meaningfully emptier than the HTML layout intent.
- Improved guidance for ratio-specific layouts: layout skeleton and reading path are now always adapted to the chosen aspect ratio before compressing or summarizing content.
- HTML output for screenshots now uses fixed pixel dimensions (width/height) per ratio preset, rather than fluid responsive sizes like 100vw/100vh.
- New detailed composition guidelines for each supported ratio, ensuring proportions, hierarchy, and module arrangements are ratio-appropriate.
- Emphasized stronger internal structure (subheads, bullets, labels) in dense cards and discouraged equal-weight box layouts.
- Updated instructions to match screenshot canvas pixel size to the selected ratio and clarified responsive output policy.