Вёрстка резюме и карточек проектов в теме Matrix/cacto

Резюме: ASCII-кактус, glitch-заголовок, таймлайн опыта, скилл-теги, контакты.
Проекты: карточки-терминалы (home_automatization, cactoz.su) со ссылками на git.cactoz.su.
Canvas-дождь на цифровых/катакана символах, пиксельный SVG-кактус как лого/favicon.
This commit is contained in:
2026-07-26 20:47:21 +05:00
parent a9d2a6b15c
commit 2036e909ea
9 changed files with 603 additions and 38 deletions
+40 -6
View File
@@ -1,11 +1,45 @@
// TODO: полноценный canvas-эффект цифрового дождя — этап 2
const canvas = document.getElementById('matrix-rain');
if (canvas) {
if (canvas && !window.matchMedia('(prefers-reduced-motion: reduce)').matches) {
const ctx = canvas.getContext('2d');
const resize = () => {
const chars = 'アカサタナハマヤラワ0123456789ABCDEFcacto$#@%&*'.split('');
const fontSize = 15;
const bg = getComputedStyle(document.documentElement).getPropertyValue('--color-bg').trim();
const accent = getComputedStyle(document.documentElement).getPropertyValue('--color-accent').trim();
const silver = getComputedStyle(document.documentElement).getPropertyValue('--color-silver').trim();
let columns = 0;
let drops = [];
function setup() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
};
resize();
window.addEventListener('resize', resize);
columns = Math.floor(canvas.width / fontSize);
drops = new Array(columns).fill(0).map(() => Math.floor((Math.random() * canvas.height) / fontSize));
}
function draw() {
ctx.fillStyle = `${bg}cc`;
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.font = `${fontSize}px monospace`;
for (let i = 0; i < columns; i++) {
const char = chars[Math.floor(Math.random() * chars.length)];
const x = i * fontSize;
const y = drops[i] * fontSize;
ctx.fillStyle = Math.random() > 0.98 ? silver : accent;
ctx.fillText(char, x, y);
if (y > canvas.height && Math.random() > 0.975) {
drops[i] = 0;
} else {
drops[i]++;
}
}
}
setup();
window.addEventListener('resize', setup);
setInterval(draw, 50);
}