diff --git a/_includes/head.html b/_includes/head.html index be1b0a9..bbcee67 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -18,11 +18,11 @@ - - + - + + diff --git a/_includes/home-work.html b/_includes/home-work.html index 7d74953..571f6d4 100644 --- a/_includes/home-work.html +++ b/_includes/home-work.html @@ -14,13 +14,13 @@

Lead & Design Manager (2018 – 2020)

Adrián Mato - Azure Pipelines
-
Adrián Mato - Azure Pipelines
-
Adrián Mato - Azure Pipelines
-
Adrián Mato - Azure Pipelines
@@ -35,7 +35,7 @@

Sr. Product Designer (2015 – 2018)

and more available on mobile, tablet and desktop.

-
Adrián Mato - Yammer Office 365
inThrottle = false, limit); + } + } + } + // scrolling event with throttling function scrollHandler() { - // scroll hint - let scroll = document.scrollingElement.scrollTop; + // cache scroll value to avoid repeated DOM access + const scroll = document.scrollingElement.scrollTop; // hide arrow when needed if (scroll >= arrowTreshold && arrow) { @@ -32,6 +42,9 @@ } } + // throttle scroll handler to run at most every 100ms + document.addEventListener("scroll", throttle(scrollHandler, 100)); + // initialize scroll hint showScrollHint(3); }