feat(seo): swap the generated OG image for the designer-refined one (Gitea #4)

Replaces the code-generated opengraph-image.tsx (placeholder circles,
default font) with a static opengraph-image.png exported from the
designer's refined SVG — a properly-shaped paw mark and a different
typeface. The source SVG traces letterforms as vector paths and embeds
a raster background, which isn't practical to reproduce in a
next/og ImageResponse component, so it's shipped as a static asset
via Next.js's file-convention instead (same og:image/twitter:image
wiring, no proxy.ts change needed — same route path as before).
This commit is contained in:
admin committed 2026-08-11 19:12:11 +02:00
1 parent 747d9e1811
commit 2e5bacb966
3 files changed
+1 -105

No files matched your search

+1
View File
@@ -0,0 +1 @@
PawFeed — the social platform where pets are the stars.
Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

-105
View File
@@ -1,105 +0,0 @@
import { ImageResponse } from "next/og";
export const alt = "PawFeed — the social platform where pets are the stars.";
export const size = { width: 1200, height: 630 };
export const contentType = "image/png";
// Simple 1-big-pad + 4-toes paw print, built from plain positioned circles —
// Satori's CSS support doesn't need raw SVG for a shape this simple.
function PawMark({ scale = 1, opacity = 1 }: { scale?: number; opacity?: number }) {
const s = (n: number) => n * scale;
return (
<div style={{ position: "relative", width: s(340), height: s(340), opacity, display: "flex" }}>
<div
style={{
position: "absolute",
left: s(70),
top: s(140),
width: s(200),
height: s(170),
borderRadius: "50% 50% 45% 45%",
background: "#FFFFFF",
}}
/>
<div style={{ position: "absolute", left: s(30), top: s(30), width: s(90), height: s(110), borderRadius: "50%", background: "#FFFFFF" }} />
<div style={{ position: "absolute", left: s(140), top: s(0), width: s(90), height: s(115), borderRadius: "50%", background: "#FFFFFF" }} />
<div style={{ position: "absolute", left: s(250), top: s(30), width: s(90), height: s(110), borderRadius: "50%", background: "#FFFFFF" }} />
<div style={{ position: "absolute", left: s(-20), top: s(120), width: s(80), height: s(100), borderRadius: "50%", background: "#FFFFFF" }} />
</div>
);
}
export default function Image() {
return new ImageResponse(
(
<div
style={{
width: "100%",
height: "100%",
display: "flex",
background: "linear-gradient(135deg, #FB923C 0%, #F97316 45%, #C2410C 100%)",
position: "relative",
}}
>
{/* Decorative oversized paw mark bleeding off the right edge — depth/layering */}
<div style={{ position: "absolute", right: -60, top: -40, display: "flex" }}>
<PawMark scale={2.05} opacity={0.16} />
</div>
{/* Content column */}
<div
style={{
display: "flex",
flexDirection: "column",
justifyContent: "center",
paddingLeft: 96,
paddingRight: 96,
width: "100%",
height: "100%",
}}
>
<div style={{ display: "flex", alignItems: "center", marginBottom: 28 }}>
<PawMark scale={0.62} />
</div>
<div
style={{
display: "flex",
fontSize: 132,
fontWeight: 800,
color: "#FFFFFF",
letterSpacing: -3,
lineHeight: 1,
}}
>
PawFeed
</div>
<div
style={{
display: "flex",
fontSize: 40,
fontWeight: 500,
color: "#FFF7ED",
marginTop: 22,
maxWidth: 820,
}}
>
Where pets are the stars.
</div>
<div
style={{
display: "flex",
fontSize: 26,
fontWeight: 600,
color: "#FFEDD5",
marginTop: 44,
letterSpacing: 1,
}}
>
pawfeed.org
</div>
</div>
</div>
),
{ ...size }
);
}