Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body>
<body{% if page.body_class %} class="{{ page.body_class }}"{% endif %}>
{{ content }}
</body>
</html>
54 changes: 26 additions & 28 deletions _layouts/home.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,30 @@
<!DOCTYPE html>
<html lang="en">
{% include head.html %}
<body class="home">
<div class="home-intro">
<div class="home-intro-bio">
<div class="home-intro-bio-desc">
<div>
<h1>Adrián Mato</h1>
<h2>Design Director at GitHub Copilot <span class="ampersand">&amp;</span> startup investor.</h2>
<p>
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.
</p>
<p>
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.
</p>
</div>
---
layout: default
body_class: home
---
<div class="home-intro">
<div class="home-intro-bio">
<div class="home-intro-bio-desc">
<div>
<h1>Adrián Mato</h1>
<h2>Design Director at GitHub Copilot <span class="ampersand">&amp;</span> startup investor.</h2>
<p>
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.
</p>
<p>
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.
</p>
</div>
</div>
<svg class="home-intro-scroll" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<path d="M12 18.23l5.584-5.584 1.365 1.365-8.041 8.04-7.857-7.856 1.377-1.376L10 18.391V1h2v17.23z" fill-rule="evenodd"/>
</svg>
</div>
{% include home-navigation.html %}
{% include home-work.html %}
<svg class="home-intro-scroll" viewBox="0 0 22 22" xmlns="http://www.w3.org/2000/svg">
<path d="M12 18.23l5.584-5.584 1.365 1.365-8.041 8.04-7.857-7.856 1.377-1.376L10 18.391V1h2v17.23z" fill-rule="evenodd"/>
</svg>
</div>
{% include home-navigation.html %}
{% include home-work.html %}

<script type="text/javascript" src="/assets/js/ios.js"></script>
<script type="text/javascript" src="/assets/js/s.js"></script>
</body>
</html>
<script type="text/javascript" src="/assets/js/ios.js"></script>
<script type="text/javascript" src="/assets/js/s.js"></script>
16 changes: 16 additions & 0 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,22 @@ a {
}


/**
* Transition helpers
*/
%transition-base {
transition: all var(--base-trans) ease-in-out;
}

%transition-mid {
transition: all var(--base-trans-mid) ease-in-out;
}

%transition-slow {
transition: all var(--base-trans-slow) ease-in-out;
}


/**
* Helpers
*/
Expand Down
12 changes: 6 additions & 6 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pre {
text-decoration: none;
padding: 2rem 1.4rem;
position: relative;
transition: all var(--base-trans-slow) ease-in-out;
@extend %transition-slow;
}

.home-navigation a:hover {
Expand All @@ -114,7 +114,7 @@ pre {
fill: var(--text-color);
visibility: hidden;
opacity: 0;
transition: all var(--base-trans) ease-in-out;
@extend %transition-base;
position: fixed;
bottom: 5.2rem;
right: 4.8rem;
Expand Down Expand Up @@ -189,7 +189,7 @@ pre {
color: var(--title-color);
text-decoration: none;
outline: none;
transition: all var(--base-trans-slow) ease-in-out;
@extend %transition-slow;
}
}

Expand Down Expand Up @@ -262,7 +262,7 @@ pre {
position: relative;
text-decoration: none;
font-weight: 500;
transition: all var(--base-trans) ease-in-out;
@extend %transition-base;
}

.post a:before {
Expand All @@ -272,7 +272,7 @@ pre {
bottom: 0;
left: 0;
right: 0;
transition: all var(--base-trans) ease-in-out;
@extend %transition-base;
}

.post a:hover:before {
Expand Down Expand Up @@ -426,7 +426,7 @@ pre {
padding: 1.6rem 0;
overflow: hidden;
text-overflow: ellipsis;
transition: all var(--base-trans-mid) ease-in-out;
@extend %transition-mid;
}

.blog-list-item a:before {
Expand Down
62 changes: 0 additions & 62 deletions assets/js/s.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,66 +35,4 @@
// initialize scroll hint
showScrollHint(3);
}

// HELPERS

// 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 documentHeight = Math.max(
document.body.scrollHeight,
document.body.offsetHeight,
document.documentElement.clientHeight,
document.documentElement.scrollHeight,
document.documentElement.offsetHeight
);
const windowHeight =
window.innerHeight ||
document.documentElement.clientHeight ||
document.getElementsByTagName("body")[0].clientHeight;
const destinationOffset =
typeof destination === "number" ? destination : destination.offsetTop;
let destinationOffsetToScroll = Math.round(
documentHeight - destinationOffset < windowHeight
? documentHeight - windowHeight
: destinationOffset
)
if (start >= destinationOffsetToScroll) { // going up
destinationOffsetToScroll -= extraPadding;
}

if ("requestAnimationFrame" in window === false) {
window.scroll(0, destinationOffsetToScroll);
return;
}

function scroll() {
const now =
"now" in window.performance ? performance.now() : new Date().getTime();

const time = Math.min(1, (now - startTime) / duration);
const timeFunction = 0.5 * (1 - Math.cos(Math.PI * time));
window.scroll(
0,
Math.ceil(timeFunction * (destinationOffsetToScroll - start) + start)
);

if (start >= destinationOffsetToScroll) { // going up
if (Math.round(window.pageYOffset) <= Math.ceil(destinationOffsetToScroll)) {
return;
}
}
else { // going down
if (Math.round(window.pageYOffset) >= Math.ceil(destinationOffsetToScroll)) {
return;
}
}

requestAnimationFrame(scroll);
}

scroll();
}
})();