Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
ui issue (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro100 authored Aug 23, 2024
1 parent 49e04e6 commit f46ae78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
10 changes: 5 additions & 5 deletions overrides/assets/landing/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ document.addEventListener('scroll', function(event) {
let newOpacity = (scrollTop / maxScroll);
newOpacity = Math.max(0.25, Math.min(newOpacity, 1));
gradient[0].style.opacity = newOpacity;
animateSection('.fade-in');
animateSection('.fade-in-2');
animateSection('.fade-in-3');
animateSection('.fade-in', 0.1); // Why use GTFS?
animateSection('.fade-in-2', 0.1); // Two Formats in One Standard
animateSection('.fade-in-3'); // Help develop the future of GTFS
});

function animateSection(querySelectorAll) {
function animateSection(querySelectorAll, delayIncrement = 0.2) {
const fadeInElements = document.querySelectorAll(querySelectorAll);
const baseDelay = 0.5; // Base delay in seconds
fadeInElements.forEach(function(element, index) {
const position = element.getBoundingClientRect().top;
const windowHeight = window.innerHeight;

// Calculate delay based on index
const delay = baseDelay * (index * 0.2);
const delay = baseDelay * (index * delayIncrement);

// Apply the delay to the transition
element.style.transitionDelay = `${delay}s`;
Expand Down
5 changes: 0 additions & 5 deletions overrides/assets/stylesheets/extra.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
--md-primary-fg-color: #ffff00;
--md-primary-fg-color--dark: #cccc00;
--md-secondary-fg-color: #1d64f2;
--md-accent-fg-color: red;
--md-highlight-color: #c6def4;
--md-secondary-fg-color-white: #ffffff;
--md-secondary-fg-color-gray: #f8f8f8;
Expand Down Expand Up @@ -106,10 +105,6 @@

/** global header end **/

.md-top:hover {
background-color: var(--md-primary-fg-color);
}

/* h1 style */
.md-typeset h1 {
font-size: 180%;
Expand Down

0 comments on commit f46ae78

Please sign in to comment.