Merge pull request #285 from gopesht/footer
Adds button to navigate to topmost component onscroll
This commit is contained in:
commit
c34991db44
3 changed files with 58 additions and 0 deletions
14
app/views/conference/_footer.html.haml
Normal file
14
app/views/conference/_footer.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
%div.scroll-top-wrapper
|
||||
= link_to "#splash-banner", class: "smoothscroll" do
|
||||
%i.fa.fa-2x.fa-arrow-circle-up
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
$(document).on( 'scroll', function(){
|
||||
if ($(window).scrollTop() > 100) {
|
||||
$('.scroll-top-wrapper').addClass('show');
|
||||
} else {
|
||||
$('.scroll-top-wrapper').removeClass('show');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -57,3 +57,5 @@
|
|||
.pad
|
||||
= render 'social_media'
|
||||
|
||||
= render 'footer'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue