Difference between revisions of "Template:Team:DTU-Denmark/footer"

 
(53 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<html>
 
<html>
 +
 +
<script>
 +
 +
 +
// When the user clicks on <span> (x), close the modal
 +
$("span.close").click( function() {
 +
    var cl = this.getAttribute('class').split(" ")[1]
 +
    var modal = document.getElementById( cl + "Modal" );
 +
    modal.style.display = "none";
 +
})
 +
 +
$("div.modal").click( function(){
 +
    this.style.display = "none";
 +
});
 +
 +
 +
// When the user clicks the image it will enlarge
 +
$("img.enlarge").click( function() {
 +
    // Get the modal
 +
    var modal = document.getElementById( this.id + "Modal" );
 +
 +
    // Get the image and insert it inside the modal - use its "alt" text as a caption
 +
    var img = document.getElementById( this.id );
 +
    var modalImg = document.getElementById( this.id + "Img");
 +
    var captionText = document.getElementById( this.id + "caption" );
 +
    modal.style.display = "block";
 +
    modalImg.src = this.src;
 +
})
 +
 +
 +
$(document).ready( function(){
 +
    var whight = $(window).height();
 +
    var dhight = $("#footer").offset().top;
 +
    var dimen = $("#footer").height();
 +
    var bre = "<br>"
 +
 +
    while (whight > dhight+dimen) {
 +
        document.getElementById("foot-comp").innerHTML = bre
 +
        var dhight = $("#footer").offset().top;
 +
        bre = bre.concat("<br>")
 +
    }
 +
});
 +
 +
$(window).resize( function(){
 +
    var whight = $(window).height();
 +
    var dhight = $("#footer").offset().top;
 +
    var dimen = $("#footer").height();
 +
    var bre = document.getElementById("foot-comp").innerHTML
 +
 +
    while (whight < dhight+dimen) {
 +
        bre = bre.slice(0,-4)
 +
        document.getElementById("foot-comp").innerHTML = bre
 +
        var dhight = $("#footer").offset().top;
 +
 +
        if (bre.length == 0){break}
 +
    }
 +
 +
    while (whight > dhight+dimen) {
 +
        bre = bre.concat("<br>")
 +
        document.getElementById("foot-comp").innerHTML = bre
 +
        var dhight = $("#footer").offset().top;
 +
    }
 +
});
 +
 +
 +
</script>
  
 
<style type="text/css">
 
<style type="text/css">
 
footer {
 
footer {
background: #999;
+
background: #848282;
 
color: white;
 
color: white;
 
margin: 0px;
 
margin: 0px;
Line 37: Line 103:
 
</style>
 
</style>
  
<body></body>
+
<body> <div id="foot-comp"> </div> </body>
 
<footer id = "footer">
 
<footer id = "footer">
 
<div class="container">
 
<div class="container">

Latest revision as of 23:11, 19 October 2016

  • FIND US AT:
Facebook Twitter
  • DTU BIOBUILDERS
  • DENMARK
  • DTU - SØLTOFTS PLADS, BYGN. 221/002
  • 2800 KGS. LYNGBY

  • E-mail:
  • dtu-biobuilders-2016@googlegroups.com
  • MAIN SPONSORS:
Lundbeck fundation DTU blue dot Lundbeck fundation Lundbeck fundation