All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 54s
Build & Deploy / 🏗️ Build (push) Successful in 1m55s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
- Uses raw SVG paths for the logo instead of PNG - Implements Dark Navy, Grid, Accent Green project styling - Respects draft layout rules.
22 lines
881 B
TypeScript
22 lines
881 B
TypeScript
import * as fs from 'fs';
|
|
|
|
const svgContent = fs.readFileSync('public/logo-white.svg', 'utf8');
|
|
const dMatches = [...svgContent.matchAll(/d="([^"]+)"/g)].map((m) => m[1]);
|
|
|
|
let tsx = `import React from 'react';\nimport { Svg, G, Path } from '@react-pdf/renderer';\n\n`;
|
|
tsx += `export const KLZLogoVector = ({ width, color }: { width: number, color: string }) => {\n`;
|
|
tsx += ` // Original viewBox was 0 0 295 99, so height is width * 99 / 295\n`;
|
|
tsx += ` const height = width * (99 / 295);\n`;
|
|
tsx += ` return (\n`;
|
|
tsx += ` <Svg viewBox="0 0 295 99" width={width} height={height}>\n`;
|
|
tsx += ` <G transform="matrix(1,0,0,1,0.000798697,0)">\n`;
|
|
|
|
for (const d of dMatches) {
|
|
tsx += ` <Path d="${d}" fill={color} />\n`;
|
|
}
|
|
|
|
tsx += ` </G>\n </Svg>\n );\n};\n`;
|
|
|
|
fs.writeFileSync('lib/KLZLogoVector.tsx', tsx);
|
|
console.log('Generated KLZLogoVector.tsx');
|