managarten/games/whopixels/assets/create_placeholder_images.html
Till JS 8511c2ca4c feat(cd): add Matrix notification on deploy failure
Sends a message to a Matrix room when a deploy fails, including
the failing services, commit, deployer, and a link to the logs.

Requires two GitHub Actions secrets:
- DEPLOY_NOTIFY_ROOM_ID: Matrix room ID
- DEPLOY_NOTIFY_BOT_TOKEN: Matrix bot access token

Skips silently if secrets are not configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:47:53 +01:00

68 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Create Placeholder Images</title>
</head>
<body>
<h1>Creating placeholder images...</h1>
<canvas id="backgroundCanvas" width="800" height="600" style="display: none;"></canvas>
<canvas id="playerCanvas" width="32" height="32" style="display: none;"></canvas>
<canvas id="tileCanvas" width="32" height="32" style="display: none;"></canvas>
<div id="downloadLinks"></div>
<script>
// Create background image
const bgCanvas = document.getElementById('backgroundCanvas');
const bgCtx = bgCanvas.getContext('2d');
bgCtx.fillStyle = '#222233';
bgCtx.fillRect(0, 0, 800, 600);
// Add some pattern to background
bgCtx.fillStyle = '#1a1a2a';
for (let i = 0; i < 100; i++) {
const x = Math.random() * 800;
const y = Math.random() * 600;
const size = Math.random() * 5 + 2;
bgCtx.fillRect(x, y, size, size);
}
// Create player image
const playerCanvas = document.getElementById('playerCanvas');
const playerCtx = playerCanvas.getContext('2d');
playerCtx.fillStyle = '#ff0000';
playerCtx.fillRect(0, 0, 32, 32);
playerCtx.fillStyle = '#ff5555';
playerCtx.fillRect(8, 8, 16, 16);
// Create tile image
const tileCanvas = document.getElementById('tileCanvas');
const tileCtx = tileCanvas.getContext('2d');
tileCtx.fillStyle = '#ffffff';
tileCtx.fillRect(0, 0, 32, 32);
tileCtx.strokeStyle = '#cccccc';
tileCtx.lineWidth = 1;
tileCtx.strokeRect(0.5, 0.5, 31, 31);
// Create download links
const downloadDiv = document.getElementById('downloadLinks');
function createDownloadLink(canvas, filename) {
const link = document.createElement('a');
link.download = filename;
link.href = canvas.toDataURL('image/png');
link.textContent = `Download ${filename}`;
link.style.display = 'block';
link.style.margin = '10px';
downloadDiv.appendChild(link);
// Auto-click to download
setTimeout(() => link.click(), 500);
}
createDownloadLink(bgCanvas, 'background.png');
createDownloadLink(playerCanvas, 'player.png');
createDownloadLink(tileCanvas, 'tile.png');
</script>
</body>
</html>