Skip to content

Commit 0e8ab31

Browse files
authored
feat: removed scroll to top button (#2089)
Feature: removed scroll to top button As we are currently refreshing the website, per the discussion in issue #2067 , the consensus is to try a "Just Do It, and Revert It If Necessary" approach. Therefore, this PR removes the scroll-to-top button. If this change triggers a negative response from users, it will be reverted and we will pretend it never happened. Removed the Scroll to top button in its entirety This includes its css, the element itself and all references to it. cc: @To1ne @dscho
2 parents 1c5a4ea + 06012ae commit 0e8ab31

File tree

5 files changed

+0
-67
lines changed

5 files changed

+0
-67
lines changed

assets/js/application.js

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -807,18 +807,3 @@ var Graphviz = {
807807
});
808808
}
809809
}
810-
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-
});

assets/sass/layout.scss

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -463,52 +463,6 @@ table.benchmarks {
463463
}
464464
}
465465
}
466-
// scrollToTop
467-
.scrollToTop {
468-
@include border-radius(50px);
469-
display: none;
470-
position: fixed;
471-
background-color: var(--button-bg-color);
472-
right: 20px;
473-
bottom: 6.25rem;
474-
padding: 0.8rem;
475-
height: 20px;
476-
transition: background-color 0.2s;
477-
width: 20px;
478-
&:hover{
479-
background-color: var(--button-bg-hover-color);
480-
@include box-shadow(2px);
481-
&::before {
482-
@include center-transformX;
483-
width: 0;
484-
height: 0;
485-
color: var(--color-neutral-emphasis-plus);
486-
content: "";
487-
border: 6px solid transparent;
488-
border-color:var(--black-3) transparent transparent;
489-
top: -0.55rem;
490-
position: absolute;
491-
}
492-
&::after {
493-
@include center-transformX;
494-
top: -2rem;
495-
border-radius: 4px;
496-
position: absolute;
497-
content: attr(data-label);
498-
word-wrap: break-word;
499-
white-space: pre;
500-
padding: .5em .75em;
501-
color:var(--callout-color);
502-
background-color:var(--black-3);
503-
font: normal normal 11px/1.5 -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;
504-
}
505-
}
506-
}
507-
.no-js{
508-
&.scrollToTop {
509-
display: block;
510-
}
511-
}
512466

513467
#content-wrapper {
514468
display: flex;
@@ -633,7 +587,4 @@ table.benchmarks {
633587
margin-bottom: 1rem;
634588
}
635589
}
636-
.scrollToTop {
637-
bottom: 6rem;
638-
}
639590
}

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>

static/images/icons/chevron-up.png

-227 Bytes
Binary file not shown.
-314 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)