Line 3: | Line 3: | ||
<html> | <html> | ||
<head> | <head> | ||
− | |||
<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> | <script> | ||
− | + | window.onscroll = function() {scrollFunction(); checkOffset();}; | |
− | window.onscroll = function() {scrollFunction()}; | + | |
function scrollFunction() { | function scrollFunction() { | ||
Line 17: | Line 17: | ||
} | } | ||
} | } | ||
+ | |||
+ | 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() { | function topFunction() { | ||
Line 22: | Line 30: | ||
document.documentElement.scrollTop = 0; // For IE and Firefox | document.documentElement.scrollTop = 0; // For IE and Firefox | ||
} | } | ||
+ | |||
+ | |||
</script> | </script> | ||
Line 104: | Line 114: | ||
</div> | </div> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<!-- Footer --> | <!-- Footer --> | ||
− | <footer class="w3-container w3-padding-32 w3-center w3-black w3-xlarge" style="position: absolute; width:100%;"> | + | <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.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://www.instagram.com/igem.bielefeld/?hl=de"><i class="fa fa-instagram"></i></a> | ||
Line 118: | Line 122: | ||
<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> | <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> | ||
+ | |||
+ | |||
Revision as of 15:56, 21 September 2018
Sponsors and partners