Skip to content

Commit 0efddd2

Browse files
committed
feat: removed scroll to top feature
1 parent 992366e commit 0efddd2

File tree

3 files changed

+1
-66
lines changed

3 files changed

+1
-66
lines changed

assets/js/application.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -808,17 +808,4 @@ var Graphviz = {
808808
}
809809
}
810810

811-
// Scroll to Top
812-
$('#scrollToTop').removeClass('no-js');
813-
$(window).on('scroll', function() {
814-
$(this).scrollTop() > 150
815-
? $('#scrollToTop').fadeIn()
816-
: $('#scrollToTop').fadeOut();
817-
});
818-
$('#scrollToTop').on('click', function(e) {
819-
e.preventDefault();
820-
$("html, body").animate({
821-
scrollTop: 0
822-
}, "slow");
823-
return false;
824-
});
811+

assets/sass/layout.scss

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -414,52 +414,6 @@ table.benchmarks {
414414
}
415415
}
416416
}
417-
// scrollToTop
418-
.scrollToTop {
419-
@include border-radius(50px);
420-
display: none;
421-
position: fixed;
422-
background-color: var(--button-bg-color);
423-
right: 20px;
424-
bottom: 6.25rem;
425-
padding: 0.8rem;
426-
height: 20px;
427-
transition: background-color 0.2s;
428-
width: 20px;
429-
&:hover{
430-
background-color: var(--button-bg-hover-color);
431-
@include box-shadow(2px);
432-
&::before {
433-
@include center-transformX;
434-
width: 0;
435-
height: 0;
436-
color: var(--color-neutral-emphasis-plus);
437-
content: "";
438-
border: 6px solid transparent;
439-
border-color:var(--black-3) transparent transparent;
440-
top: -0.55rem;
441-
position: absolute;
442-
}
443-
&::after {
444-
@include center-transformX;
445-
top: -2rem;
446-
border-radius: 4px;
447-
position: absolute;
448-
content: attr(data-label);
449-
word-wrap: break-word;
450-
white-space: pre;
451-
padding: .5em .75em;
452-
color:var(--callout-color);
453-
background-color:var(--black-3);
454-
font: normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
455-
}
456-
}
457-
}
458-
.no-js{
459-
&.scrollToTop {
460-
display: block;
461-
}
462-
}
463417

464418
#content-wrapper {
465419
display: flex;
@@ -584,7 +538,4 @@ table.benchmarks {
584538
margin-bottom: 1rem;
585539
}
586540
}
587-
.scrollToTop {
588-
bottom: 6rem;
589-
}
590541
}

layouts/partials/footer.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
Git is a member of <a href="{{ relURL "sfc" }}">Software Freedom Conservancy</a>
88
</div>
99
</footer>
10-
<a href="#top" class="no-js scrollToTop" id="scrollToTop" data-label="Scroll to top">
11-
<img src="{{ relURL "images/icons/[email protected]" }}" width="20" height="20" alt="scroll-to-top"/>
12-
</a>
1310

1411
<script src="https://code.jquery.com/jquery-3.7.1.min.js"></script>
1512
<script src="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js"></script>

0 commit comments

Comments
 (0)