feat: content engine
This commit is contained in:
14
packages/meme-generator/src/placeholder.ts
Normal file
14
packages/meme-generator/src/placeholder.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
export function getPlaceholderImage(
|
||||
width: number,
|
||||
height: number,
|
||||
text: string,
|
||||
): string {
|
||||
// Generate a simple SVG placeholder as base64
|
||||
const svg = `
|
||||
<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="100%" height="100%" fill="#1e293b"/>
|
||||
<text x="50%" y="50%" font-family="monospace" font-size="24" fill="#64748b" text-anchor="middle" dy=".3em">${text}</text>
|
||||
</svg>
|
||||
`.trim();
|
||||
return Buffer.from(svg).toString("base64");
|
||||
}
|
||||
Reference in New Issue
Block a user