From 00b80620143a7d35e55aab2f39d0ed102ecb0e6c Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Tue, 6 Dec 2022 20:20:10 +0100 Subject: [PATCH] added snow --- 6/day6.css | 62 +++++++++++------------------------------------------ 6/day6.html | 36 +++++++++++++++++++------------ 6/day6.js | 15 +++++++++++++ 3 files changed, 50 insertions(+), 63 deletions(-) diff --git a/6/day6.css b/6/day6.css index 10f1858..6e1e7be 100644 --- a/6/day6.css +++ b/6/day6.css @@ -46,15 +46,20 @@ h1, h3 { } .snow { - position: fixed; + position: absolute; + top: -50px; + /* left: 0; */ + /* right: 0; */ + /* bottom: 0; */ width: 100%; - height: 100%; + /* width: 100%; */ + /* height: 100%; */ pointer-events: none; z-index: 100; } .snow__flake { - position: absolute; + /* position: fixed; */ top: -50px; left: -50px; right: -50px; @@ -62,52 +67,11 @@ h1, h3 { width: 10px; height: 10px; background: #fff; + color: #fff; border-radius: 50%; animation: snowAnimation 3s linear infinite; -} - -.snow__flake:nth-child(0) { - animation-delay: 0s; -} - -.snow__flake:nth-child(1) { - animation-delay: 0.2s; -} - -.snow__flake:nth-child(2) { - animation-delay: 0.4s; -} - -.snow__flake:nth-child(3) { - animation-delay: 0.6s; -} - -.snow__flake:nth-child(4) { - animation-delay: 0.8s; -} - -.snow__flake:nth-child(5) { - animation-delay: 1s; -} - -.snow__flake:nth-child(6) { - animation-delay: 1.2s; -} - -.snow__flake:nth-child(7) { - animation-delay: 1.4s; -} - -.snow__flake:nth-child(8) { - animation-delay: 1.6s; -} - -.snow__flake:nth-child(9) { - animation-delay: 1.8s; -} - -.snow__flake:nth-child(10) { - animation-delay: 2s; + float: left; + opacity: 0; } @keyframes snowAnimation { @@ -116,7 +80,7 @@ h1, h3 { opacity: 1; } 100% { - transform: translateY(1000px) rotate(360deg); - opacity: 0; + transform: translateY(1200px) rotate(360deg); + opacity: 0; } } diff --git a/6/day6.html b/6/day6.html index 3f433ef..853b4c2 100644 --- a/6/day6.html +++ b/6/day6.html @@ -10,6 +10,26 @@

ElvCom SC-22 Stream Analyzer

+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

This tool will help you find packets and messages in streams from your ElvCom SC-22.

@@ -34,26 +54,14 @@
     MMMMMMMMMMMMMN0dooooooodkKWMMMMMMMMMMMMM
     MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
   
-
-
penis
-
-
-
-
-
-
-
-
-
-

Select Stream-File:


Output:

-

Load a file and press the button to find the packet and

+

Load a file and press the button to find the packet and message begin

- + diff --git a/6/day6.js b/6/day6.js index c14c29f..00dd29f 100644 --- a/6/day6.js +++ b/6/day6.js @@ -58,3 +58,18 @@ function findPosition(line) { } } + +function randomizeSnowflakes() { + // Get all elements with the class "snow__flake" + var snowflakes = document.getElementsByClassName("snow__flake"); + + // Loop through the snowflakes + for (var i = 0; i < snowflakes.length; i++) { + // Generate a random number between 0 and 4 + var delay = Math.random() * 4; + + // Set the "animation-delay" property for the current snowflake + snowflakes[i].style.setProperty("animation-delay", delay + "s"); + } +} +randomizeSnowflakes();