Skip to content

Commit 1cf7e79

Browse files
committed
updated header animation
1 parent c32dfdb commit 1cf7e79

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎_sass/home/_header.scss‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@
469469
@keyframes box4 {
470470
0% { fill: #fff; }
471471
5% { fill: #fff; }
472-
15% { fill: #56c69f; }
473-
50% { fill: #56c69f; }
474-
75% { fill: #fff; }
472+
15% { fill: #56c69f; }
473+
69% { fill: #56c69f; }
474+
70% { fill: #fff; }
475475
100% { fill: #fff; }
476476
}
477477

‎assets/js/banneranimation.js‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ const svgns = "http://www.w3.org/2000/svg";
88
const svg = document.querySelector(".header-bg svg");
99

1010

11-
// let opacities = [ 0.0, 0.05, 0.1, 0.15 ];
12-
let opacities = [ 0.10, 0.125, 0.15, 0.175 ];
13-
// let opacities = [ 0.0, 0.025, 0.05, 0.075 ];
11+
12+
// let opacities = [ 0.10, 0.125, 0.15, 0.175 ];
13+
// let opacities = [ 0.15, 0.175, 0.20, 0.225, 0.25 ];
14+
let opacities = [ 0.15, 0.1675, 0.175, 0.1875, 0.20, 0.2175, 0.225, 0.2375, 0.25 ];
1415
// let opacities = [ 0.025, 0.05, 0.075, 0.1, 0.125, 0.15, 0.175, 0.20, 0.225, 0.25 ];
1516

1617
for(let i = 0; i < 10; i++) {
@@ -21,7 +22,7 @@ for(let i = 0; i < 10; i++) {
2122
newRect.setAttribute("width", "10%");
2223
newRect.setAttribute("height", "10%");
2324
newRect.setAttribute("fill", "#ffffff");
24-
newRect.setAttribute("opacity", "" + opacities[getRndInteger(0, 4)]);
25+
newRect.setAttribute("opacity", "" + opacities[getRndInteger(0, opacities.length)]);
2526

2627
newRect.setAttribute("id", "x" + i + "y" + j);
2728
svg.appendChild(newRect);

0 commit comments

Comments
 (0)