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
5 changes: 3 additions & 2 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@

<link rel="preload" as="style" href="{{ " /assets/css/style.css" | relative_url }}">
<link rel="stylesheet" href="{{ " /assets/css/style.css" | relative_url }}">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="preload" as="style" href='https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap'>
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet" media="print" onload="this.media='all'">
<noscript><link href="https://fonts.googleapis.com/css2?family=EB+Garamond&display=swap" rel="stylesheet"></noscript>
<link
href="data:image/x-icon;base64,iVBORw0KGgoAAAANSUhEUgAAAMQAAADECAMAAAD3eH5ZAAACqVBMVEUAAAAYGCQSEhwSEhoTExoTExoSEhoSEhsSEhsSEhoUFB4SEhsSEhsSEhoUFCcUFBsTExogICAUFBwSEhv///8SEhoTExoaGiISEhoWFh4TExoSEhpVVVUUFBsTExs5LiqWb1DXnGrzsHb/uHoXFhybclH9t3rBjWGPkJjZ2uIvLzcUFBzg4Ony8/t1dX1HSFC7u8OOj5bw8fkjJCvU1d1nZ285OUKtrraBgorp6vMbGyLHyM9ZWmEuLjafoKhzc3vh4uoVFR25usJLS1MjIyvv8PiRkpplZW3W19+rq7Q9PUaDg4tXV1/Ky9KcnaWIiJDb3OQwMDjh4eo4OEGkpa12dn5ISVHk5e1sbXW8vMSOj5eys7s1Nj0kJSzV1t5+f4ff4OhoaHA6OkNKSlKoqLGur7eCg4txcXnq6/McHCPIydDExc1aW2KQkZni4+ugoal0dHxdXWWtrba6u8MpKTFMTFQ+PkaSk5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FMtLBY9Yi+Edyc88TP+lVyM979KINCKNSCPSiDQijUgj0og0oqi7uyaAKAaAILrhz8zkX+ZVx9xlMw6eguELEb8hguNHOFh+hIXhRxhofoSG4kcoSH6EhMjZDbkIYVQZyjKUf94ayEaXf2gczlqaf/LNv1sPaXyPbmI1TB0ujQunYRlx0xwxGqIZd62MiBUP7XyGHY9tB5vh2PCs2LkM+4ZXrREPIVrxpnlhMSwz3jZOHIZpxIe6fvCfMPQdPlc3rd+EtqnxvaKs/CVUZYEfS9Is9w+QZ2mCvxJSaWNdFHtQ5KzRSgq86QQV8UUzmeCE7wAAAABJRU5ErkJggg=="
rel="icon" type="image/x-icon" />
Expand Down
4 changes: 2 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ <h2>Design Director at GitHub Copilot <span class="ampersand">&amp;</span> start
{% 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>
<script defer type="text/javascript" src="/assets/js/ios.js"></script>
<script defer type="text/javascript" src="/assets/js/s.js"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions _sass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ ul{
a {
color: var(--brand-color);
text-decoration: none;
-webkit-transition: none;
transition: none;
-webkit-transition: color 0s, text-decoration 0s;
transition: color 0s, text-decoration 0s;

&:visited {
color: var(--brand-color);
Expand Down
21 changes: 11 additions & 10 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,16 @@ body {

padding: 0 var(--body-padding);
animation: body-animation 1.6s;
will-change: opacity;
}

@keyframes body-animation {
from {
opacity: 0;
}
to {
opacity: 1;
}
}

img {
Expand Down Expand Up @@ -94,7 +98,7 @@ pre {
text-decoration: none;
padding: 2rem 1.4rem;
position: relative;
transition: all var(--base-trans-slow) ease-in-out;
transition: color var(--base-trans-slow) ease-in-out;
}

.home-navigation a:hover {
Expand All @@ -114,11 +118,12 @@ pre {
fill: var(--text-color);
visibility: hidden;
opacity: 0;
transition: all var(--base-trans) ease-in-out;
transition: opacity var(--base-trans) ease-in-out, visibility var(--base-trans) ease-in-out;
position: fixed;
bottom: 5.2rem;
right: 4.8rem;
z-index: 2;
will-change: transform;
}

.home-intro-scroll.visible {
Expand All @@ -131,8 +136,6 @@ pre {
}

@keyframes home-intro-scroll {
20% {
}
45% {
transform: translateY(0);
}
Expand All @@ -142,8 +145,6 @@ pre {
65% {
transform: translateY(0);
}
75% {
}
}

@keyframes navigation-animation {
Expand Down Expand Up @@ -189,7 +190,7 @@ pre {
color: var(--title-color);
text-decoration: none;
outline: none;
transition: all var(--base-trans-slow) ease-in-out;
transition: color var(--base-trans-slow) ease-in-out;
}
}

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

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

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

.blog-list-item a:before {
Expand Down
15 changes: 10 additions & 5 deletions assets/js/s.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
}
}

// scrolling event
document.addEventListener("scroll", scrollHandler);
// scrolling event with passive listener for better performance
document.addEventListener("scroll", scrollHandler, { passive: true });

function scrollHandler() {
// scroll hint
Expand All @@ -43,6 +43,7 @@
const start = window.pageYOffset;
const startTime = "now" in window.performance ? performance.now() : new Date().getTime();

// Cache document height calculations
const documentHeight = Math.max(
document.body.scrollHeight,
document.body.offsetHeight,
Expand All @@ -60,7 +61,8 @@
documentHeight - destinationOffset < windowHeight
? documentHeight - windowHeight
: destinationOffset
)
);

if (start >= destinationOffsetToScroll) { // going up
destinationOffsetToScroll -= extraPadding;
}
Expand All @@ -81,13 +83,16 @@
Math.ceil(timeFunction * (destinationOffsetToScroll - start) + start)
);

const currentPosition = Math.round(window.pageYOffset);
const targetPosition = Math.ceil(destinationOffsetToScroll);

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