diff --git a/css/general.css b/css/general.css index 530b087..07e4d4e 100644 --- a/css/general.css +++ b/css/general.css @@ -363,12 +363,66 @@ nav li a:focus::after{ opacity: 1; } } +@keyframes slidein-prize-2 { + 0% { + transform: translateX(-150px); + opacity: 0; + } + 40% { + opacity: 0; + } + 100% { + transform: translateX(0px); + opacity: 1; + } +} +@keyframes slidein-prize-1 { + 0% { + transform: translateY(-100px); + opacity: 0; + } + 40% { + opacity: 0; + } + 100% { + transform: translateY(0px); + opacity: 1; + } +} +@keyframes slidein-prize-3 { + 0% { + transform: translateX(300px); + opacity: 0; + } + 60% { + opacity: 0; + } + 100% { + transform: translateX(0px); + opacity: 1; + } +} @media (prefers-reduced-motion: no-preference) { .slide-animation { animation: slidein-side ease 1s; } } +@media (prefers-reduced-motion: no-preference) { + .slide-animation-prize-2 { + animation: slidein-prize-2 ease 3s; + } +} +@media (prefers-reduced-motion: no-preference) { + .slide-animation-prize-1 { + animation: slidein-prize-1 ease 2s; + } +} +@media (prefers-reduced-motion: no-preference) { + .slide-animation-prize-3 { + animation: slidein-prize-3 ease 3s; + } +} /* Main Section */ main { diff --git a/index.html b/index.html index a5ecca2..3ccfe52 100644 --- a/index.html +++ b/index.html @@ -193,6 +193,7 @@
+
-
+

Tech

profile picture
@@ -472,7 +473,7 @@
-
+

Marketing

profile picture
diff --git a/js/scroll_element.js b/js/scroll_element.js index 96392eb..15e5b80 100644 --- a/js/scroll_element.js +++ b/js/scroll_element.js @@ -8,7 +8,40 @@ const observer = new IntersectionObserver(entries => { } }); }); + + const observer_prize_2 = new IntersectionObserver(entries => { + // Loop over the entries + entries.forEach(entry => { + // If the element is visible + if (entry.isIntersecting) { + // Add the animation class + entry.target.classList.add('slide-animation-prize-2'); + } + }); + }); + + const observer_prize_1 = new IntersectionObserver(entries => { + // Loop over the entries + entries.forEach(entry => { + // If the element is visible + if (entry.isIntersecting) { + // Add the animation class + entry.target.classList.add('slide-animation-prize-1'); + } + }); + }); + const observer_prize_3 = new IntersectionObserver(entries => { + // Loop over the entries + entries.forEach(entry => { + // If the element is visible + if (entry.isIntersecting) { + // Add the animation class + entry.target.classList.add('slide-animation-prize-3'); + } + }); + }); + observer.observe(document.querySelector('#description-heading')); observer.observe(document.querySelector('#event-main-box')); observer.observe(document.querySelector('#timeline')); @@ -17,5 +50,14 @@ const observer = new IntersectionObserver(entries => { observer.observe(document.querySelector('#guidelines')); observer.observe(document.querySelector('#code-of-conduct')); observer.observe(document.querySelector('#photo-release-container')); - observer.observe(document.querySelector('#prizes-container')); - observer.observe(document.querySelector('#team-container')); \ No newline at end of file + observer.observe(document.querySelector('#second-column')); + observer.observe(document.querySelector('#first-column')); + observer.observe(document.querySelector('#third-column')); + observer_prize_2.observe(document.querySelector('#second-place')); + observer_prize_1.observe(document.querySelector('#first-place')); + observer_prize_3.observe(document.querySelector('#third-place')); + observer.observe(document.querySelector('#administration')); + observer.observe(document.querySelector('#logistics')); + observer.observe(document.querySelector('#outreach')); + observer.observe(document.querySelector('#tech')); + observer.observe(document.querySelector('#marketing')); \ No newline at end of file