Difference between revisions of "Team:Bielefeld-CeBiTec/Description"

Line 7: Line 7:
 
<link rel="stylesheet" type="text/css"  
 
<link rel="stylesheet" type="text/css"  
 
href="https://2018.igem.org/Team:Bielefeld-CeBiTec/CSS?action=raw&ctype=text/css" />
 
href="https://2018.igem.org/Team:Bielefeld-CeBiTec/CSS?action=raw&ctype=text/css" />
 +
 +
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
 +
 +
<script>
 +
 +
window.onscroll = function() {scrollFunction(); checkOffset();};
 +
 +
function scrollFunction() {
 +
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) {
 +
document.getElementById("page-arrow-top").style.display = "block";
 +
} else {
 +
document.getElementById("page-arrow-top").style.display = "none";
 +
}
 +
}
 +
 +
function checkOffset() {
 +
    if($('#page-arrow-top').offset().top + $('#page-arrow-top').height()
 +
                                          >= $('#footer').offset().top - 10)
 +
        $('#page-arrow-top').css('position', 'absolute');
 +
    if($(document).scrollTop() + window.innerHeight < $('#footer').offset().top)
 +
        $('#page-arrow-top').css('position', 'fixed'); // restore when you scroll up
 +
}
 +
 +
function topFunction() {
 +
document.body.scrollTop = 0; // For Chrome, Safari and Opera
 +
document.documentElement.scrollTop = 0; // For IE and Firefox
 +
}
 +
 +
 +
 +
</script>
 +
  
 
</head>
 
</head>
Line 25: Line 57:
  
 
</div>
 
</div>
 +
 +
<!-- Footer -->
 +
<footer id="footer" class="w3-container w3-padding-32 w3-center w3-black w3-xlarge" style="position: absolute; width:100%; z-index:200;">
 +
  <a class="footer-icon" href="https://www.facebook.com/igembielefeld/"> <i class="fa fa-facebook-official" ></i></a>
 +
  <a class="footer-icon" href="https://www.instagram.com/igem.bielefeld/?hl=de"><i class="fa fa-instagram"></i></a>
 +
  <a class="footer-icon" href="https://twitter.com/iGEM_Bielefeld"><i class="fa fa-twitter"></i></a>
 +
</footer>
 +
 +
<img id="page-arrow-top"  src="https://static.igem.org/mediawiki/2018/d/d4/T--Bielefeld-CeBiTec--top_arrow_vk.svg" style="width:3%" onclick="topFunction()"></img>
 +
 +
 
</div>
 
</div>
  

Revision as of 15:27, 21 September 2018