Skip to content

Commit

Permalink
resolved all corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiwrash committed Jul 8, 2024
1 parent eab9b5a commit cc62397
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .gitconfig

This file was deleted.

1 change: 0 additions & 1 deletion docs/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ PLATFORMS
arm64-darwin-23
x86_64-darwin-20
x86_64-darwin-21
x86_64-linux

DEPENDENCIES
github-pages
Expand Down
2 changes: 1 addition & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<div id="article-content">
<!-- Article title (only shown in article pages) -->
{% if page.url contains "/articles/" %}
<div class="title-platform-tabs">
<div class="tit le-platform-tabs">
<h1 class="title">
{{ page.name | remove: '.md' | split: "-" | join: " " }}
</h1>
Expand Down
7 changes: 5 additions & 2 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ function isInRange(num, min, max) {
* If a page is directly accessed (e.g., via deep link, bookmark, or opened in a new tab),the user will be navigated
* back to the relevant hub page of that article.
*/
let newPath;

function navigateBack() {
const currentPath = window.location.pathname;
const pathSegments = currentPath.split('/');
let newPath;

// Check if we're in an article page
if (pathSegments.length >= 5 && pathSegments[1] === 'articles') {
Expand All @@ -78,7 +79,6 @@ function navigateBack() {
}
}

// Add an event listener for the popstate event
window.addEventListener('popstate', (e)=>{
e.preventDefault()
navigateBack()
Expand Down Expand Up @@ -309,6 +309,7 @@ window.addEventListener('DOMContentLoaded', () => {
}
}
});

lhnContent.addEventListener('wheel', (e) => {
const scrollTop = lhnContent.scrollTop;
const isScrollingPastLHNTop = e.deltaY < 0 && scrollTop === 0;
Expand All @@ -317,6 +318,7 @@ window.addEventListener('DOMContentLoaded', () => {
e.preventDefault();
}
});

window.addEventListener('scroll', (e) => {
const scrollingElement = e.target.scrollingElement;
const scrollPercentageInArticleContent = clamp(scrollingElement.scrollTop - articleContent.offsetTop, 0, articleContent.scrollHeight) / articleContent.scrollHeight;
Expand All @@ -325,4 +327,5 @@ window.addEventListener('DOMContentLoaded', () => {
// Count property of y-axis to keep scroll position & reference it later for making the body fixed when sidebar opened
document.documentElement.style.setProperty('y-axis', `${window.scrollY}px`);
});

});

0 comments on commit cc62397

Please sign in to comment.