Add manifest.json, sidepanel components, and scripts. Include project assets and documentation files. Remove placeholder blank file.
56 lines
1.6 KiB
HTML
56 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Generate Icons</title>
|
|
</head>
|
|
<body>
|
|
<canvas id="canvas"></canvas>
|
|
<script>
|
|
const sizes = [16, 48, 128];
|
|
sizes.forEach(size => {
|
|
const canvas = document.getElementById('canvas');
|
|
canvas.width = size;
|
|
canvas.height = size;
|
|
const ctx = canvas.getContext('2d');
|
|
|
|
// Gradient background
|
|
const gradient = ctx.createLinearGradient(0, 0, size, size);
|
|
gradient.addColorStop(0, '#6366f1');
|
|
gradient.addColorStop(1, '#ec4899');
|
|
ctx.fillStyle = gradient;
|
|
ctx.fillRect(0, 0, size, size);
|
|
|
|
// White image icon
|
|
ctx.fillStyle = 'white';
|
|
const margin = size * 0.2;
|
|
const iconSize = size - (margin * 2);
|
|
ctx.fillRect(margin, margin, iconSize, iconSize * 0.7);
|
|
|
|
// Triangle (mountain)
|
|
ctx.beginPath();
|
|
ctx.moveTo(margin + iconSize * 0.3, margin + iconSize * 0.5);
|
|
ctx.lineTo(margin + iconSize * 0.6, margin + iconSize * 0.2);
|
|
ctx.lineTo(margin + iconSize * 0.9, margin + iconSize * 0.5);
|
|
ctx.closePath();
|
|
ctx.fillStyle = '#6366f1';
|
|
ctx.fill();
|
|
|
|
// Circle (sun)
|
|
ctx.beginPath();
|
|
ctx.arc(margin + iconSize * 0.25, margin + iconSize * 0.25, size * 0.08, 0, Math.PI * 2);
|
|
ctx.fillStyle = '#fbbf24';
|
|
ctx.fill();
|
|
|
|
// Download
|
|
canvas.toBlob(blob => {
|
|
const url = URL.createObjectURL(blob);
|
|
const a = document.createElement('a');
|
|
a.href = url;
|
|
a.download = `icon${size}.png`;
|
|
a.click();
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|