Skip to content
Closed
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
15 changes: 1 addition & 14 deletions assets/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -808,17 +808,4 @@ var Graphviz = {
}
}

// Scroll to Top
$('#scrollToTop').removeClass('no-js');
$(window).on('scroll', function() {
$(this).scrollTop() > 150
? $('#scrollToTop').fadeIn()
: $('#scrollToTop').fadeOut();
});
$('#scrollToTop').on('click', function(e) {
e.preventDefault();
$("html, body").animate({
scrollTop: 0
}, "slow");
return false;
});

49 changes: 0 additions & 49 deletions assets/sass/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -414,52 +414,6 @@ table.benchmarks {
}
}
}
// scrollToTop
.scrollToTop {
@include border-radius(50px);
display: none;
position: fixed;
background-color: var(--button-bg-color);
right: 20px;
bottom: 6.25rem;
padding: 0.8rem;
height: 20px;
transition: background-color 0.2s;
width: 20px;
&:hover{
background-color: var(--button-bg-hover-color);
@include box-shadow(2px);
&::before {
@include center-transformX;
width: 0;
height: 0;
color: var(--color-neutral-emphasis-plus);
content: "";
border: 6px solid transparent;
border-color:var(--black-3) transparent transparent;
top: -0.55rem;
position: absolute;
}
&::after {
@include center-transformX;
top: -2rem;
border-radius: 4px;
position: absolute;
content: attr(data-label);
word-wrap: break-word;
white-space: pre;
padding: .5em .75em;
color:var(--callout-color);
background-color:var(--black-3);
font: normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
}
}
}
.no-js{
&.scrollToTop {
display: block;
}
}

#content-wrapper {
display: flex;
Expand Down Expand Up @@ -584,7 +538,4 @@ table.benchmarks {
margin-bottom: 1rem;
}
}
.scrollToTop {
bottom: 6rem;
}
}
3 changes: 0 additions & 3 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
Git is a member of <a href="{{ relURL "sfc" }}">Software Freedom Conservancy</a>
</div>
</footer>
<a href="#top" class="no-js scrollToTop" id="scrollToTop" data-label="Scroll to top">
<img src="{{ relURL "images/icons/[email protected]" }}" width="20" height="20" alt="scroll-to-top"/>
</a>

<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js"></script>
Expand Down
Loading