8000 Update index.html · snojs/snojs.github.io@0ff72cd · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ff72cd

Browse files
Update index.html
1 parent 119a29c commit 0ff72cd

File tree

1 file changed

+63
-6
lines changed

1 file changed

+63
-6
lines changed

index.html

Lines changed: 63 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
margin:0;
1818
padding:0;
1919
overflow-x: hidden;
20-
background-color:#242424;
2120
color:white;
2221
}
2322
.ehh{
@@ -29,6 +28,9 @@
2928
b{
3029
font-weight:600;
3130
}
31+
.blur{
32+
backdrop-filter:blur(10px);
33+
}
3234
.f-respond{
3335
font-size: 17px;
3436
white-space: nowrap;
@@ -37,13 +39,13 @@
3739
font-weight: 900;
3840
}
3941
.border-light{
40-
border: 1px solid lightgray;
42+
border: 1px solid gray;
4143
}
4244
.border-right-light{
43-
border-right: 1px solid lightgray;
45+
border-right: 1px solid gray;
4446
}
4547
.border-bottom-light{
46-
border-bottom: 1px solid lightgray;
48+
border-bottom: 1px solid gray;
4749
}
4850
.plr-l{
4951
padding-left: 32px;
@@ -74,6 +76,14 @@
7476
left:0;
7577
width: 93.5%;
7678
}
79+
#myCanvas{
80+
position:fixed;
81+
z-index:-1000;
82+
top:0;
83+
left:0;
84+
width:100%;
85+
height:100%;
86+
}
7787
</style>
7888
</head>
7989
<body data='{
@@ -90,7 +100,7 @@
90100
<p>Building the web <span class="grad karla fw-strong">{ your way }.</span></p>
91101
</div><br/><br/>
92102
<div class="text-center m-m" computer>
93-
<div class="grid-2 left-center border-light r">
103+
<div class="grid-2 left-center border-light r blur">
94104
<div class="border-right-light">
95105
<div class="plr-l f-respond p-m text-left karla">
96106
<span class="gray">1|</span> &lt;<b>body</b> data=<span class="ehh">'{count:0}'</span>&gt;<br/>
@@ -107,7 +117,7 @@
107117
</div>
108118
</div>
109119
<div class="text-center m-m" mobile>
110-
<div class="left-center border-light r">
120+
<div class="left-center border-light r blur">
111121
<div class="border-bottom-light">
112122
<div class="plr-l f-respond p-m text-left karla">
113123
<span class="gray">1|</span> &lt;<b>body</b> data=<span class="ehh">'{count:0}'</span>&gt;<br/>
@@ -144,5 +154,52 @@
144154
}
145155
</script>
146156
<script src="https://snojs.github.io/sno/crystal.js"></script>
157+
<canvas id="myCanvas"></canvas>
158+
<script src="https://classicmc-studios.github.io/js/moss.js"></script>
159+
<script>
160+
createCanvas(screen.width,screen.height);
161+
bg("#242424");
162+
//Snow_Particles
163+
var angle = 0;
164+
var W = screen.width;
165+
var H = screen.height;
166+
var mp = 50;//max particles
167+
var particles = [];
168+
for(var i = 0; i < mp; i++){
169+
particles.push({
170+
x: Math.random()*W,
171+
y: Math.random()*H,
172+
r: Math.random()*4+1,
173+
d: Math.random()*mp
174+
});
175+
}
176+
function update(){
177+
angle += 0.01;
178+
for(var i = 0; i < mp; i++){
179+
var p = particles[i];
180+
p.y += Math.cos(angle+p.d) + 1 + p.r/2;
181+
p.x += Math.sin(angle) * 2;
182+
if(p.x > W+5 || p.x < -5 || p.y > H){
183+
if(i%3 > 0){particles[i] = {x: Math.random()*W, y: -10, r: p.r, d: p.d};}
184+
else{
185+
if(Math.sin(angle) > 0){particles[i] = {x: -5, y: Math.random()*H, r: p.r, d: p.d};}
186+
else{particles[i] = {x: W+5, y: Math.random()*H, r: p.r 67E6 , d: p.d};}
187+
}
188+
}
189+
}
190+
}
191+
function draw(){
192+
for(var i = 0; i < mp; i++){
193+
noStroke();selectColor("#ffffff");var p = particles[i];ellipse(p.x,p.y,p.r);
194+
}
195+
update();
196+
}
197+
window.main = function(){
198+
requestAnimationFrame( main )
199+
bg("#242424");
200+
draw();
201+
};main();
202+
</script>
203+
147204
</body>
148205
</html>

0 commit comments

Comments
 (0)
0