Skip to content

Commit

Permalink
more code optimizaion
Browse files Browse the repository at this point in the history
  • Loading branch information
cold-magma committed Apr 7, 2020
1 parent 77a2adb commit c10bb52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 42 deletions.
17 changes: 0 additions & 17 deletions empyrean/app.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,9 @@
window.onload = function() {
$(".loader-wrapper").fadeOut("slow");

lax.setup() // init

const updateLax = () => {
lax.update(window.scrollY)
window.requestAnimationFrame(updateLax)
}

window.requestAnimationFrame(updateLax)
updatescreen()
}

updatescreen();

function updatescreen() {
if(window.innerWidth < 600){
document.getElementById("d1").classList.add("small");
document.getElementById("d2").classList.add("small");
}else{

document.getElementById("d1").classList.remove("small");
document.getElementById("d2").classList.remove("small");
}
}
2 changes: 1 addition & 1 deletion empyrean/empyrean.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div class="context">
<br>
<p id="p11" class="lax" data-lax-preset="linger fadeInOut">Thanks for reading!</p>
<p id="p12" class="lax" data-lax-preset="linger fadeInOut">And scrolling!</p>
<p id="p12" class="lax" data-lax-preset="linger fadeInOut">And for scrolling!</p>
<p id="p13" class="lax" data-lax-preset="linger fadeInOut">Want to suggest changes?</p>
<p id="p14" class="lax" data-lax-preset="linger fadeInOut">Send me a mail. E-mail in the readme.</p>
<span></span>
Expand Down
29 changes: 5 additions & 24 deletions empyrean/empyreanstylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body{
overflow-x: hidden;
}
body::-webkit-scrollbar{
width: 0.2rem;
width: 0.15rem;
}
body::-webkit-scrollbar-track{
background: black;
Expand All @@ -24,8 +24,8 @@ body::-webkit-scrollbar-thumb{
background: white;
}
body::-webkit-scrollbar:horizontal{
width: 0.2rem;
height: 0.2rem;
width: 0.15rem;
height: 0.15rem;
}
body::-webkit-scrollbar-track:horizontal{
background: black;
Expand Down Expand Up @@ -98,25 +98,6 @@ body::-webkit-scrollbar-thumb:horizontal{
height: 80vh;
box-shadow: 0 0 2px #000, 0 0 5px #000, 0 0 20px #000, 0 0 50px #000, 0 0 100px #000;
}
.lax.lax1{
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100vh;
}
.lax.lax1 #d1{
z-index: -1;
background: url("./images/l1small.png");
background-size: cover;
background-repeat: no-repeat;
}
.lax.lax1 #d2{
z-index:1;
background: url("./images/l2small.png");
background-size: cover;
background-repeat: no-repeat;
}
.lax img{
position: relative;
z-index: 2;
Expand All @@ -131,7 +112,7 @@ body::-webkit-scrollbar-thumb:horizontal{
font-size: 1.15rem;
text-align: center;
letter-spacing: 0.5rem;
text-shadow: -2px 2px 10px #000;
text-shadow: 1px 1px 1px #000, 2px 2px 5px #000,4px 4px 10px #000;
}
.cont{
background:black;
Expand Down Expand Up @@ -186,7 +167,7 @@ a{
width: 1rem;
}
}
@media (max-height: 2160px) {
@media (max-width: 500px) {
#d1 {
background: url("./images/l1small.png");
background-size: cover;
Expand Down

0 comments on commit c10bb52

Please sign in to comment.