Skip to content

Commit b476677

Browse files
Merge pull request #68 from deariary/feat/og-image
feat: add OG image for repository social preview
2 parents 9e632e4 + 61265a9 commit b476677

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

video/og-image.png

867 KB
Loading

video/src/scenes/og.meta

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"version": 0,
3+
"timeEvents": [],
4+
"seed": 1090537650
5+
}

video/src/scenes/og.tsx

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import { Img, Layout, makeScene2D, Node, Txt } from "@motion-canvas/2d";
2+
import { waitFor } from "@motion-canvas/core";
3+
4+
import reportImg from "../../report.png";
5+
6+
// 1280x640 OG image - single frame, no animation
7+
8+
export default makeScene2D(function* (view) {
9+
view.fill("#050505");
10+
11+
view.add(
12+
<>
13+
{/* Report screenshot, tilted */}
14+
<Node rotation={-12} scale={1.4} x={200} y={30}>
15+
<Img
16+
src={reportImg}
17+
width={700}
18+
radius={12}
19+
y={-200}
20+
/>
21+
</Node>
22+
23+
{/* Title text, left side */}
24+
<Layout
25+
layout
26+
direction="column"
27+
gap={10}
28+
x={-250}
29+
y={-20}
30+
>
31+
<Txt
32+
text="GitHub"
33+
fontSize={72}
34+
fontWeight={900}
35+
fontFamily="'Inter', system-ui, sans-serif"
36+
fill="white"
37+
letterSpacing={-3}
38+
/>
39+
<Txt
40+
text="Weekly Reporter"
41+
fontSize={72}
42+
fontWeight={900}
43+
fontFamily="'Inter', system-ui, sans-serif"
44+
fill="white"
45+
letterSpacing={-3}
46+
/>
47+
<Txt
48+
text="Your week. Narrated by AI."
49+
fontSize={26}
50+
fontWeight={400}
51+
fontFamily="'Inter', system-ui, sans-serif"
52+
fill="rgba(255,255,255,0.5)"
53+
marginTop={12}
54+
letterSpacing={-0.5}
55+
/>
56+
</Layout>
57+
</>,
58+
);
59+
60+
yield* waitFor(0.1);
61+
});

0 commit comments

Comments
 (0)