Skip to content

Commit a40ddc4

Browse files
committed
updaet the background matrix code and set eliza img in footer
1 parent 1af222a commit a40ddc4

File tree

4 files changed

+53
-45
lines changed

4 files changed

+53
-45
lines changed

IMG_4108.webp

82.3 KB
Binary file not shown.

index.html

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</style>
66
</head>
77
<body>
8-
<div class="matrix-background" id="matrix"></div>
8+
<canvas class="matrix-bg" id="matrixCanvas"></canvas>
99

1010
<section class="hero">
1111
<div class="logo">ai16z</div>
@@ -70,6 +70,10 @@ <h2>About ai16z</h2>
7070
<div class="stat-label">Singularity ETA</div>
7171
</div>
7272
</div>
73+
74+
<footer style="text-align: center; padding: 2rem; margin-top: 2rem;">
75+
<img src="IMG_4108.webp" alt="eliza" style="border-radius: 10px; box-shadow: 0 0 20px var(--neon-purple);">
76+
</footer>
7377

7478
<script src="script.js"></script>
7579
</body>

script.js

+44-41
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,46 @@
1+
12
// Matrix rain effect
2-
function createMatrixRain() {
3-
const matrix = document.getElementById('matrix');
4-
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()';
5-
const columnCount = Math.floor(window.innerWidth / 20);
6-
7-
for (let i = 0; i < columnCount; i++) {
8-
const column = document.createElement('div');
9-
column.className = 'matrix-column';
10-
column.style.left = (i * 20) + 'px';
11-
column.style.animationDelay = (Math.random() * 20) + 's';
12-
13-
let content = '';
14-
for (let j = 0; j < 50; j++) {
15-
content += characters[Math.floor(Math.random() * characters.length)] + '<br>';
16-
}
17-
column.innerHTML = content;
18-
matrix.appendChild(column);
3+
const canvas = document.getElementById('matrixCanvas');
4+
const ctx = canvas.getContext('2d');
5+
6+
canvas.width = window.innerWidth;
7+
canvas.height = window.innerHeight;
8+
9+
const katakana = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン';
10+
const latin = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
11+
const nums = '0123456789';
12+
const alphabet = katakana + latin + nums;
13+
14+
const fontSize = 16;
15+
const columns = canvas.width/fontSize;
16+
17+
const rainDrops = [];
18+
19+
for( let x = 0; x < columns; x++ ) {
20+
rainDrops[x] = 1;
21+
}
22+
23+
function draw() {
24+
ctx.fillStyle = 'rgba(10, 10, 10, 0.05)';
25+
ctx.fillRect(0, 0, canvas.width, canvas.height);
26+
27+
ctx.fillStyle = '#0F0';
28+
ctx.font = fontSize + 'px monospace';
29+
30+
for(let i = 0; i < rainDrops.length; i++) {
31+
const text = alphabet.charAt(Math.floor(Math.random() * alphabet.length));
32+
ctx.fillText(text, i*fontSize, rainDrops[i]*fontSize);
33+
34+
if(rainDrops[i]*fontSize > canvas.height && Math.random() > 0.975){
35+
rainDrops[i] = 0;
36+
}
37+
rainDrops[i]++;
1938
}
20-
}
21-
22-
createMatrixRain();
23-
window.addEventListener('resize', () => {
24-
document.getElementById('matrix').innerHTML = '';
25-
createMatrixRain();
26-
});
27-
28-
// Intersection Observer for animations
29-
const observer = new IntersectionObserver((entries) => {
30-
entries.forEach(entry => {
31-
if (entry.isIntersecting) {
32-
entry.target.style.opacity = '1';
33-
entry.target.style.transform = 'translateY(0)';
34-
}
35-
});
36-
}, { threshold: 0.1 });
37-
38-
document.querySelectorAll('.area-card, .manifesto p, .about p').forEach(el => {
39-
el.style.opacity = '0';
40-
el.style.transform = 'translateY(20px)';
41-
el.style.transition = 'all 0.8s ease-out';
42-
observer.observe(el);
43-
});
39+
}
40+
41+
setInterval(draw, 30);
42+
43+
window.addEventListener('resize', () => {
44+
canvas.width = window.innerWidth;
45+
canvas.height = window.innerHeight;
46+
});

style.css

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');
23

34
:root {
@@ -35,14 +36,14 @@ body {
3536
overflow-x: hidden;
3637
}
3738

38-
.matrix-background {
39+
.matrix-bg {
3940
position: fixed;
4041
top: 0;
4142
left: 0;
4243
width: 100%;
4344
height: 100%;
44-
pointer-events: none;
4545
z-index: -1;
46+
opacity: 0.15;
4647
}
4748

4849
.matrix-column {
@@ -63,7 +64,7 @@ body {
6364
align-items: center;
6465
padding: 2rem;
6566
text-align: center;
66-
background: linear-gradient(rgba(10,10,18,0.9), rgba(10,10,18,0.95));
67+
6768
}
6869

6970
.logo {

0 commit comments

Comments
 (0)