Skip to content

Commit fbb5d6a

Browse files
committed
wip
1 parent 95d8a9d commit fbb5d6a

File tree

2 files changed

+30
-4
lines changed

2 files changed

+30
-4
lines changed

_layouts/default.html

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@
2424
function createMatrixRain() {
2525
const matrixContainer = document.getElementById('matrixRain');
2626
if (!matrixContainer) return;
27+
// Clear any existing content
28+
matrixContainer.innerHTML = '';
29+
if (!matrixContainer) return;
30+
2731

2832
const chars = '01アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン';
2933

3034
// Clear existing columns first
3135
matrixContainer.innerHTML = '';
3236

37+
3338
for (let i = 0; i < 30; i++) {
3439
const column = document.createElement('div');
3540
column.className = 'matrix-column';
@@ -39,13 +44,30 @@
3944
column.style.animation = `matrix-fall ${column.style.animationDuration} linear infinite`;
4045
column.style.animationDelay = column.style.animationDelay;
4146

47+
column.style.left = (i * 3.33) + '%';
48+
column.style.animationDuration = (Math.random() * 5 + 3) + 's';
49+
column.style.animationDelay = Math.random() * 5 + 's';
50+
4251
let text = '';
43-
for (let j = 0; j < 15; j++) {
44-
text += chars[Math.floor(Math.random() * chars.length)] + '<br>';
52+
for (let j = 0; j < 25; j++) {
53+
text += chars[Math.floor(Math.random() * chars.length)] + '\n';
4554
}
46-
column.innerHTML = text;
55+
column.textContent = text;
4756
matrixContainer.appendChild(column);
4857
}
58+
// Refresh columns periodically
59+
setInterval(() => {
60+
const columns = matrixContainer.querySelectorAll('.matrix-column');
61+
columns.forEach(column => {
62+
if (Math.random() > 0.95) {
63+
let text = '';
64+
for (let j = 0; j < 25; j++) {
65+
text += chars[Math.floor(Math.random() * chars.length)] + '\n';
66+
}
67+
column.textContent = text;
68+
}
69+
});
70+
}, 100);
4971
}
5072
// Floating Particles
5173
function createParticles() {

assets/css/style.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,18 +528,22 @@ pre code {
528528
width: 100%;
529529
height: 100%;
530530
pointer-events: none;
531-
z-index: -1;
531+
z-index: -2;
532532
overflow: hidden;
533+
opacity: 0.3;
533534
}
534535
.matrix-column {
535536
position: absolute;
537+
top: -20px;
536538
color: #00ff41;
537539
font-family: 'Share Tech Mono', monospace;
538540
font-size: 12px;
539541
line-height: 1.2;
540542
text-shadow: 0 0 5px #00ff41;
541543
opacity: 0.8;
542544
animation: matrix-fall linear infinite;
545+
opacity: 0.7;
546+
white-space: pre;
543547
}
544548
@keyframes matrix-fall {
545549
0% {

0 commit comments

Comments
 (0)