Skip to content

Commit 3aeb466

Browse files
author
Paul Adams
committed
feat: style sub-header
1 parent 747a80c commit 3aeb466

File tree

4 files changed

+58
-10
lines changed

4 files changed

+58
-10
lines changed

app.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,29 @@ const matrixEffect = (canvasId, containerSelector) => {
187187
const columns = canvas.width / font_size;
188188
const drops = [];
189189

190+
let beginMatrixEffect = true;
190191
for (let x = 0; x < columns; x++) {
191192
drops[x] = 1;
192193
}
194+
for (let i = 0; i < drops.length; i++) {
195+
drops[i] = canvas.height / font_size;
196+
}
197+
198+
let frame = 0;
199+
let hideIniitalEffect = true;
193200

194201
function draw() {
195202
ctx.fillStyle = "rgba(0, 0, 0, 0.05)";
196203
ctx.fillRect(0, 0, canvas.width, canvas.height);
197204

198-
ctx.fillStyle = "#0F0";
205+
if (hideIniitalEffect) frame++;
206+
207+
//if (frame > drops.length) {
208+
// hideIniitalEffect = false;
209+
ctx.fillStyle = "rgba(3, 94, 3, 1)";
210+
//} else {
211+
// ctx.fillStyle = "rgba(210, 15, 15, 1)";
212+
//}
199213
ctx.font = font_size + "px arial";
200214

201215
for (let i = 0; i < drops.length; i++) {

index.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
<canvas id="fullscreen-matrix-canvas"></canvas>
2626
<header>
2727
<div class="logo">.codebase</div>
28+
<div class="sub-header">
29+
Adventures with code, copyright paul adams...
30+
</div>
2831
<button class="menu-toggle" aria-label="Toggle navigation">
2932
<span></span>
3033
<span></span>

pages/shader-presets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const shaderPresets = {
1515
const g = 0.5 + 0.5 * sin(time * 1.0 + uv.y * 10.0);
1616
const b = 0.5 + 0.5 * cos(time * 3.0 + (uv.x + uv.y) * 5.0);
1717
18-
return vec4(r, g, b, 1.0);
18+
return vec4(0, g*0.2, 0, 1.0);
1919
}`,
2020

2121
"Raytraced Sphere": `function main(x, y, width, height, time) {

style.css

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ body {
77
font-family: sans-serif;
88
margin: 0;
99
background-color: #000;
10-
color: #0f0;
10+
color: rgb(1, 113, 1);
1111
display: flex;
1212
flex-direction: column;
1313
}
@@ -34,7 +34,7 @@ header {
3434
position: relative;
3535
font-family: "Orbitron", sans-serif;
3636
font-weight: 400;
37-
font-size: 10em;
37+
font-size: 8em;
3838
color: transparent;
3939
-webkit-text-stroke: 1px #eee;
4040
text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #00ffde, 0 0 20px #00ffde,
@@ -52,6 +52,21 @@ header {
5252
text-shadow: 0 0 10px #0f0, 0 0 20px #0f0;
5353
}
5454

55+
.sub-header {
56+
background: rgba(0, 255, 0, 0.1);
57+
backdrop-filter: blur(4px);
58+
-webkit-backdrop-filter: blur(4px);
59+
border: 2px solid rgba(5, 114, 5, 0.304);
60+
padding: 0px 0px 0px 32px;
61+
text-align: left;
62+
width: 100%;
63+
margin: 0 0 0;
64+
box-sizing: border-box;
65+
color: #0f0;
66+
font-style: italic;
67+
clip-path: polygon(2% 0, 98% 0, 100% 100%, 0 100%);
68+
}
69+
5570
.container {
5671
display: flex;
5772
padding: 2rem;
@@ -63,12 +78,12 @@ header {
6378
.left-panel {
6479
width: 200px;
6580
background: rgba(0, 255, 0, 0.1);
66-
backdrop-filter: blur(10px);
67-
-webkit-backdrop-filter: blur(10px);
68-
border: 1px solid rgba(0, 255, 0, 0.2);
69-
border-radius: 15px;
70-
padding: 1rem;
71-
text-align: center;
81+
backdrop-filter: blur(4px);
82+
-webkit-backdrop-filter: blur(4px);
83+
border: 1px solid rgba(5, 114, 5, 0.304);
84+
border-radius: 0px;
85+
padding: 0rem;
86+
text-align: left;
7287
flex-shrink: 0; /* prevent panel from shrinking */
7388
}
7489

@@ -100,6 +115,22 @@ main a {
100115
transition: color 0.3s, text-shadow 0.3s;
101116
}
102117

118+
main h1,
119+
h2,
120+
h3,
121+
h4,
122+
h5,
123+
h6 {
124+
font-family: "Orbitron", sans-serif;
125+
color: rgb(30, 139, 30);
126+
text-shadow: 0 0 10px rgb(45, 144, 45);
127+
}
128+
main p {
129+
font-family: "Orbitron", sans-serif;
130+
line-height: 1.2rem;
131+
font-size: 1.1rem;
132+
}
133+
103134
main a:hover {
104135
color: #fff;
105136
text-shadow: 0 0 5px #0f0;

0 commit comments

Comments
 (0)