优化首页canvas背景样式

This commit is contained in:
2026-03-04 01:23:12 +08:00
parent 7217c0f0c2
commit c8b35966b3
-11
View File
@@ -683,17 +683,6 @@
ctx.fillStyle = palette.divider; ctx.fillStyle = palette.divider;
ctx.fillRect(gutterWidth, 0, 1, height); ctx.fillRect(gutterWidth, 0, 1, height);
ctx.strokeStyle = palette.guide;
ctx.lineWidth = 1;
const guideOffset = compact ? (narrow ? 54 : 64) : 110;
const guideGap = compact ? (narrow ? 68 : 76) : 120;
for (let x = codeStartX + guideOffset; x < width; x += guideGap) {
ctx.beginPath();
ctx.moveTo(x, 0);
ctx.lineTo(x, height);
ctx.stroke();
}
const cyclePos = isStatic ? totalTypingDuration + holdDuration : elapsed % cycleDuration; const cyclePos = isStatic ? totalTypingDuration + holdDuration : elapsed % cycleDuration;
const writingPhase = cyclePos < totalTypingDuration; const writingPhase = cyclePos < totalTypingDuration;