feat: add extension implementation and docs
Add manifest.json, sidepanel components, and scripts. Include project assets and documentation files. Remove placeholder blank file.
This commit is contained in:
55
icons/create-icons.html
Normal file
55
icons/create-icons.html
Normal file
@@ -0,0 +1,55 @@
|
||||
<!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>
|
||||
BIN
icons/icon128.png
Normal file
BIN
icons/icon128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 861 B |
BIN
icons/icon16.png
Normal file
BIN
icons/icon16.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 196 B |
BIN
icons/icon48.png
Normal file
BIN
icons/icon48.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 378 B |
Reference in New Issue
Block a user