diff options
| -rw-r--r-- | src/pages/og/[slug].png.ts | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/src/pages/og/[slug].png.ts b/src/pages/og/[slug].png.ts index 52b790b..063c22e 100644 --- a/src/pages/og/[slug].png.ts +++ b/src/pages/og/[slug].png.ts @@ -66,26 +66,46 @@ export async function GET({ params }: { params: { slug: string } }) { { type: "div", props: { - style: { display: "flex", flexDirection: "column", gap: "16px", flex: "1" }, + style: { + display: "flex", + flexDirection: "column", + gap: "16px", + flex: "1", + }, children: [ { type: "div", props: { - style: { fontSize: "48px", fontWeight: "700", lineHeight: "1.3", letterSpacing: "-0.02em" }, + style: { + fontSize: "52px", + fontWeight: "700", + lineHeight: "1.2", + letterSpacing: "-0.02em", + }, children: title, }, }, { type: "div", props: { - style: { fontSize: "28px", fontWeight: "500", opacity: "0.8", color: "#e0e7ff" }, + style: { + fontSize: "36px", + fontWeight: "600", + color: "#e0e7ff", + }, children: "小平市議 安竹洋平", }, }, { type: "div", props: { - style: { fontSize: "20px", fontWeight: "400", opacity: "0.5", color: "#e0e7ff", marginTop: "8px" }, + style: { + fontSize: "24px", + fontWeight: "400", + opacity: "0.6", + color: "#e0e7ff", + marginTop: "4px", + }, children: "yasutakeyohei.com", }, }, @@ -98,8 +118,10 @@ export async function GET({ params }: { params: { slug: string } }) { { width: 1200, height: 630, - fonts: [{ name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" }], - } + fonts: [ + { name: "sans-serif", data: fontBuffer, weight: 400, style: "normal" }, + ], + }, ); const resvg = new Resvg(svg, { fitTo: { mode: "width", value: 1200 } }); |
