diff --git a/_includes/home-scripts.html b/_includes/home-scripts.html new file mode 100644 index 0000000..50aba70 --- /dev/null +++ b/_includes/home-scripts.html @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index db3ffd9..b66bd3b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -1,7 +1,7 @@ {% include head.html %} - + {{ content }} \ No newline at end of file diff --git a/_layouts/home.html b/_layouts/home.html index aad54ed..819406f 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -1,32 +1,28 @@ - - -{% include head.html %} - -
-
-
-
-

Adrián Mato

-

Design Director at GitHub Copilot & startup investor.

-

- For the last 18+ years, I've designed digital products between Madrid, London and now, from - San Francisco. I also co-founded and later sold my company Erasmusu. -

-

- My career started as a Software Developer, but it soon became clear that my true passion was Design. - I love combining both skillsets to create products that fulfill a clear purpose. -

-
+--- +layout: default +--- +
+
+
+
+

Adrián Mato

+

Design Director at GitHub Copilot & startup investor.

+

+ For the last 18+ years, I've designed digital products between Madrid, London and now, from + San Francisco. I also co-founded and later sold my company Erasmusu. +

+

+ My career started as a Software Developer, but it soon became clear that my true passion was Design. + I love combining both skillsets to create products that fulfill a clear purpose. +

- - -
- {% include home-navigation.html %} - {% include home-work.html %} + + + +
+{% include home-navigation.html %} +{% include home-work.html %} - - - - +{% include home-scripts.html %} diff --git a/_sass/_layout.scss b/_sass/_layout.scss index 59f91e3..33bf0cd 100644 --- a/_sass/_layout.scss +++ b/_sass/_layout.scss @@ -183,7 +183,6 @@ pre { font-size: var(--base-font-size); line-height: 2.8rem; margin-bottom: 0.7rem; - outline: none; a { color: var(--title-color); diff --git a/assets/js/s.js b/assets/js/s.js index dbd33f9..8c428a3 100644 --- a/assets/js/s.js +++ b/assets/js/s.js @@ -38,10 +38,15 @@ // HELPERS + // HELPERS: Get current time with fallback + function getCurrentTime() { + return "now" in window.performance ? performance.now() : new Date().getTime(); + } + // HELPERS: scrolling function from A -> B (modified from: https://bit.ly/2H3JKMV) function scrollToItem(destination, duration = 500, extraPadding) { const start = window.pageYOffset; - const startTime = "now" in window.performance ? performance.now() : new Date().getTime(); + const startTime = getCurrentTime(); const documentHeight = Math.max( document.body.scrollHeight, @@ -61,7 +66,8 @@ ? documentHeight - windowHeight : destinationOffset ) - if (start >= destinationOffsetToScroll) { // going up + const isScrollingUp = start >= destinationOffsetToScroll; + if (isScrollingUp) { destinationOffsetToScroll -= extraPadding; } @@ -71,8 +77,7 @@ } function scroll() { - const now = - "now" in window.performance ? performance.now() : new Date().getTime(); + const now = getCurrentTime(); const time = Math.min(1, (now - startTime) / duration); const timeFunction = 0.5 * (1 - Math.cos(Math.PI * time)); @@ -81,7 +86,7 @@ Math.ceil(timeFunction * (destinationOffsetToScroll - start) + start) ); - if (start >= destinationOffsetToScroll) { // going up + if (isScrollingUp) { if (Math.round(window.pageYOffset) <= Math.ceil(destinationOffsetToScroll)) { return; } diff --git a/index.html b/index.html index 8cc335f..c3c1b09 100644 --- a/index.html +++ b/index.html @@ -3,5 +3,6 @@ # Edit theme's home layout instead if you wanna make some changes # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults layout: home +body_class: home description: Personal site of Adrián Mato. Design Director at Github Copilot and startup investor. ---