52 lines
2.0 KiB
JavaScript
Executable File
52 lines
2.0 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
// Create an SVG favicon with a professional design for a resume site
|
|
function generateFavicon() {
|
|
// Define colors
|
|
const backgroundColor = '#2c3e50'; // Dark blue-gray
|
|
const accentColor = '#3498db'; // Bright blue
|
|
const textColor = '#ecf0f1'; // Light gray/white
|
|
|
|
// Create SVG content with a professional design
|
|
const svgContent = `<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
|
<defs>
|
|
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
<stop offset="0%" stop-color="${backgroundColor}" />
|
|
<stop offset="100%" stop-color="#1a2530" />
|
|
</linearGradient>
|
|
</defs>
|
|
<!-- Background -->
|
|
<rect width="64" height="64" rx="8" fill="url(#gradient)" />
|
|
|
|
<!-- Document/Resume icon -->
|
|
<rect x="18" y="14" width="28" height="36" rx="2" fill="${textColor}" />
|
|
<rect x="22" y="20" width="20" height="2" rx="1" fill="${backgroundColor}" />
|
|
<rect x="22" y="24" width="16" height="2" rx="1" fill="${backgroundColor}" />
|
|
<rect x="22" y="28" width="20" height="2" rx="1" fill="${backgroundColor}" />
|
|
<rect x="22" y="32" width="12" height="2" rx="1" fill="${backgroundColor}" />
|
|
|
|
<!-- Accent corner fold -->
|
|
<path d="M46,14 L46,22 L38,14 Z" fill="${accentColor}" />
|
|
|
|
<!-- Initials as paths instead of text for better compatibility -->
|
|
<g transform="translate(20, 42)">
|
|
<!-- C letter -->
|
|
<path d="M8,2 C5,2 3,3.5 3,6 C3,8.5 5,10 8,10 C10,10 11.5,9 12,7.5"
|
|
stroke="${accentColor}" stroke-width="2" fill="none" stroke-linecap="round" />
|
|
<!-- K letter -->
|
|
<path d="M16,2 L16,10 M16,6 L20,2 M16,6 L20,10"
|
|
stroke="${accentColor}" stroke-width="2" fill="none" stroke-linecap="round" />
|
|
</g>
|
|
</svg>`;
|
|
|
|
// Write SVG file
|
|
fs.writeFileSync(path.join(__dirname, 'favicon.svg'), svgContent);
|
|
console.log('Generated favicon.svg');
|
|
}
|
|
|
|
// Run the generator
|
|
generateFavicon();
|