Skip to content
Merged
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: 0 additions & 15 deletions assets/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -807,18 +807,3 @@ 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"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the chevron-up PNGs be deleted at the same time?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, but that's in my .gitignore i guess how can I push it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh there's the same in public/ as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess if I remove the pngs from static, then they would not be generated in the public/ folder
so the correct course would be to infact remove the pngs from static/

if the above is correct do give me the go ahead, I'll push these changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, public/ contains the output of Hugo. Parts of that tree are verbatim copies from files that live in static/.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(And to make sure that this is clear: removing the files from static/ and then re-running Hugo will not remove the files from public/; You'd have to remove the public/ folder completely and then run Hugo again for that to happen.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks for confirming

</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
Binary file removed static/images/icons/chevron-up.png
Binary file not shown.
Binary file removed static/images/icons/[email protected]
Binary file not shown.
Loading