Update site — significant redesign: opengraph-image.tsx
This commit is contained in:
parent
b1bffe1440
commit
835363030c
1 changed files with 8 additions and 94 deletions
|
|
@ -8,11 +8,7 @@ export function generateStaticParams() {
|
||||||
return projects.map((p) => ({ slug: p.slug }));
|
return projects.map((p) => ({ slug: p.slug }));
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Image({
|
export default async function Image({ params }: { params: Promise<{ slug: string }> }) {
|
||||||
params,
|
|
||||||
}: {
|
|
||||||
params: Promise<{ slug: string }>;
|
|
||||||
}) {
|
|
||||||
const { slug } = await params;
|
const { slug } = await params;
|
||||||
const project = projects.find((p) => p.slug === slug);
|
const project = projects.find((p) => p.slug === slug);
|
||||||
|
|
||||||
|
|
@ -25,96 +21,14 @@ export default async function Image({
|
||||||
|
|
||||||
return new ImageResponse(
|
return new ImageResponse(
|
||||||
(
|
(
|
||||||
<div
|
<div style={{ background: "#0a0a0a", width: "100%", height: "100%", display: "flex", flexDirection: "column", alignItems: "flex-start", justifyContent: "center", padding: "80px 80px", position: "relative" }}>
|
||||||
style={{
|
<div style={{ position: "absolute", top: 56, left: 80, fontSize: 12, color: "#404040", letterSpacing: "0.25em" }}>WILD DRAGON</div>
|
||||||
background: "#0a0a0a",
|
<div style={{ position: "absolute", bottom: 56, right: 80, fontSize: 16, color: "#404040", letterSpacing: "0.08em" }}>wilddragon.net</div>
|
||||||
width: "100%",
|
<div style={{ width: 48, height: 3, background: "#3b82f6", marginBottom: 36 }} />
|
||||||
height: "100%",
|
<div style={{ fontSize: 68, fontWeight: 700, color: "#ffffff", lineHeight: 1.05, marginBottom: 28, maxWidth: 900, letterSpacing: "-0.5px" }}>{project.client}</div>
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
alignItems: "flex-start",
|
|
||||||
justifyContent: "center",
|
|
||||||
padding: "80px 80px",
|
|
||||||
position: "relative",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Brand mark top-left */}
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
top: 56,
|
|
||||||
left: 80,
|
|
||||||
fontSize: 12,
|
|
||||||
color: "#404040",
|
|
||||||
letterSpacing: "0.25em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
WILD DRAGON
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* URL bottom-right */}
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
position: "absolute",
|
|
||||||
bottom: 56,
|
|
||||||
right: 80,
|
|
||||||
fontSize: 16,
|
|
||||||
color: "#404040",
|
|
||||||
letterSpacing: "0.08em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
wilddragon.net
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Accent bar */}
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 48,
|
|
||||||
height: 3,
|
|
||||||
background: "#3b82f6",
|
|
||||||
marginBottom: 36,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{/* Client name */}
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
fontSize: 68,
|
|
||||||
fontWeight: 700,
|
|
||||||
color: "#ffffff",
|
|
||||||
lineHeight: 1.05,
|
|
||||||
marginBottom: 28,
|
|
||||||
maxWidth: 900,
|
|
||||||
letterSpacing: "-0.5px",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{project.client}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Category + Year row */}
|
|
||||||
<div style={{ display: "flex", alignItems: "center", gap: 20 }}>
|
<div style={{ display: "flex", alignItems: "center", gap: 20 }}>
|
||||||
<div
|
<div style={{ padding: "10px 20px", background: "rgba(59,130,246,0.12)", color: "#3b82f6", borderRadius: 8, fontSize: 16, fontWeight: 500, border: "1px solid rgba(59,130,246,0.2)" }}>{project.category}</div>
|
||||||
style={{
|
<div style={{ fontSize: 16, color: "#525252", letterSpacing: "0.05em" }}>{project.year}</div>
|
||||||
padding: "10px 20px",
|
|
||||||
background: "rgba(59,130,246,0.12)",
|
|
||||||
color: "#3b82f6",
|
|
||||||
borderRadius: 8,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: 500,
|
|
||||||
border: "1px solid rgba(59,130,246,0.2)",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{project.category}
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
fontSize: 16,
|
|
||||||
color: "#525252",
|
|
||||||
letterSpacing: "0.05em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{project.year}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue