Template:Team:Valencia Biocampus/Templates/Header

From 2014.igem.org

(Difference between revisions)
 
(107 intermediate revisions not shown)
Line 1: Line 1:
{{CSS/Main}}
{{CSS/Main}}
 +
__NOTOC__
<html>
<html>
<script>
<script>
Line 7: Line 8:
   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
   })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
-
   ga('create', 'UA-43355032-2', 'igem.org');
+
   ga('create', 'UA-43355032-2', 'auto');
   ga('send', 'pageview');
   ga('send', 'pageview');
Line 17: Line 18:
<link rel="stylesheet" type="text/css" href="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/css/main&action=raw&ctype=text/css" />
<link rel="stylesheet" type="text/css" href="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/css/main&action=raw&ctype=text/css" />
 +
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
-
  <div class="container">
+
<script type="text/javascript" src="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/bootstrap&action=raw&ctype=text/javascript"></script>
-
    <div class="row">
+
<script type="text/javascript" src="https://2014.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/jqueryUI&action=raw&ctype=text/javascript"></script>
-
      <a href="https://2014.igem.org/Team:Valencia_Biocampus" class="col-sm-3" id="logo" style="padding:0;margin:0">
+
<script type="text/javascript" src="https://2013.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/js/slimbox2.js&action=raw&ctype=text/javascript"></script>
-
         <img src="https://static.igem.org/mediawiki/2014/5/5c/Vbt_logo.png" data-alt-src="https://static.igem.org/mediawiki/2014/5/5c/Vbt_logo.png" alt="The St2ool project" id="logoimage" />
+
<link rel="stylesheet" type="text/css" href="https://2013.igem.org/wiki/index.php?title=Template:Team:Valencia_Biocampus/Templates/css/slimbox2.css&action=raw&ctype=text/css" />
-
      </a>
+
<script type="text/javascript">
-
          <a href="#" id="igem-logo" class="col-sm-2 pull-right">
+
$(document).ready(function() {
-
        <img src="https://static.igem.org/mediawiki/2014/0/0a/Vbt_igem-logo.png" alt="Valencia Biocampus - iGEM Logo" />
+
 
-
      </a>
+
  // cache the id
-
      <ul class="col-sm-7" id="header-menu">
+
  var navbox = $('#myTab');
-
        <li id="menu_a_team">
+
  // activate tab on click
-
          <a href="https://2014.igem.org/Team:Valencia_Biocampus/Team">The team</a>
+
  navbox.on('click', 'a', function (e) {
-
         </li>
+
      // add a hash to the URL when the user clicks on a tab
-
         <li id="menu_a_project" class="active">
+
      history.pushState(null, null, $(this).attr('href'));
 +
      var $this = $(this);
 +
      // prevent the Default behavior
 +
      e.preventDefault();
 +
      // set the hash to the address bar
 +
      window.location.hash = $this.attr('href');
 +
      // activate the clicked tab
 +
      $this.tab('show');
 +
      //return false;
 +
  })
 +
 
 +
  // if we have a hash in the address bar
 +
  if(window.location.hash){
 +
    // show right tab on load (read hash from address bar)
 +
    $('a[href="'+window.location.hash+'"]').tab('show');
 +
  }
 +
 
 +
  // navigate to a tab when the history changes
 +
  window.addEventListener("popstate", function(e) {
 +
    var activeTab = $('[href=' + location.hash + ']');
 +
    if (activeTab.length) {
 +
         activeTab.tab('show');
 +
    } else {
 +
        $('.nav-tabs a:first').tab('show');
 +
    }
 +
  });
 +
  $(".container.withBackground").after("<div id='footer2'>Valencia Biocampus. iGEM 2014<div class='footer-link'><a href='http://www.facebook.com/pages/València-Biocampus-IGEM/284330661673814'><img src='https://static.igem.org/mediawiki/2013/9/91/1380788391_facebook_square.png' alt='Facebook' title='Facebook' /></a><a href='http://twitter.com/vlc_biocampus'><img src='https://static.igem.org/mediawiki/2013/b/b6/1380788385_twitter_square.png' alt='Twitter' title='Twitter' /></a><a href='http://www.youtube.com/channel/UCvnn8shHH64omOF17Ei4H7w'><img src='https://static.igem.org/mediawiki/2013/e/ea/1380788439_youtube_square_color.png' alt='Youtube' title='Youtube' /></a><a href='http://instagram.com/vlc_biocampus'><img src='https://static.igem.org/mediawiki/2013/5/5f/1380788401_instagram_square_color.png' alt='Instagram' title='Instagram' /></a></div></div>");
 +
 
 +
 
 +
});
 +
 
 +
</script>
 +
  <div class="container" id="headerWrapper">
 +
      <div id="logo" style="padding:0;margin:0; position:relative" >
 +
        <a href="https://2014.igem.org/Team:Valencia_Biocampus" id="logo-header-link">
 +
        </a>
 +
         <a href="https://igem.org" id="igem-logo">
 +
         </a>
 +
      </div>
 +
 
 +
      <ul id="header-top-menu" class="header-top-menu pull-right">
 +
        <li id="menu_a_project">
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Project">Project</a>
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Project">Project</a>
 +
        </li>
 +
        <li id="menu_a_team">
 +
          <a href="https://2014.igem.org/Team:Valencia_Biocampus/Team">The Team</a>
         </li>
         </li>
         <li id="menu_a_results">
         <li id="menu_a_results">
Line 39: Line 85:
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Modeling">Modeling</a>
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Modeling">Modeling</a>
         </li>
         </li>
 +
        <li id="menu_a_biobricks">
 +
          <a href="https://2014.igem.org/Team:Valencia_Biocampus/Biobricks">Biobricks</a>
 +
        </li>
 +
      </ul>
 +
      <ul id="header-top-menu2" class="header-top-menu pull-right">
         <li id="menu_a_human-practices">
         <li id="menu_a_human-practices">
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/HumanPractices">Human Practices</a>
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/HumanPractices">Human Practices</a>
Line 50: Line 101:
         <li id="menu_a_attributions">
         <li id="menu_a_attributions">
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Attributions">Attributions</a>
           <a href="https://2014.igem.org/Team:Valencia_Biocampus/Attributions">Attributions</a>
 +
        </li>
 +
        <li id="menu_a_art">
 +
          <a href="https://2014.igem.org/Team:Valencia_Biocampus/ArtAndMore">Art&More</a>
         </li>
         </li>
       </ul>
       </ul>
Line 55: Line 109:
   </div>
   </div>
-
     <script type="text/javascrip">   
+
     <script type="text/javascript">   
         if(typeof activeSection !== "undefined" ){     
         if(typeof activeSection !== "undefined" ){     
-
             $("#header-menu li.active").removeClass("active");
+
             $(".header-top-menu li.active").removeClass("active");
             $("#menu_a_"+activeSection).addClass("active");
             $("#menu_a_"+activeSection).addClass("active");
         }
         }
     </script>
     </script>
 +
 +
<script type="text/x-mathjax-config">
 +
MathJax.Hub.Config({
 +
  tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
 +
});
 +
</script>
 +
<script type="text/javascript"
 +
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
 +
</script>
 +
 +
<a id="back-to-top" href="#" class="back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left">  </a>
 +
<script type="text/javascript">
 +
$(document).ready(function(){
 +
    $(window).scroll(function () {
 +
            if ($(this).scrollTop() > 50) {
 +
                $('#back-to-top').fadeIn();
 +
            } else {
 +
                $('#back-to-top').fadeOut();
 +
            }
 +
        });
 +
        // scroll body to 0px on click
 +
        $('#back-to-top').click(function () {
 +
            $('#back-to-top').tooltip('hide');
 +
            $('body,html').animate({
 +
                scrollTop: 0
 +
            }, 800);
 +
            return false;
 +
        });
 +
     
 +
        $('#back-to-top').tooltip('show');
 +
 +
if ($('.tocWrapper').length ) {
 +
var tocWrapperOffsetLeft = $('.tocWrapper').offset().left;
 +
 +
$('.tocWrapper').affix({
 +
    offset: {
 +
      top: $('.tab-pane.active').offset().top
 +
    , bottom: function () {
 +
        return (this.bottom = $('.footer').outerHeight(true))
 +
      }
 +
    }
 +
  })
 +
/*
 +
$('.tocWrapper').on('affixed.bs.affix', function () {
 +
//alert(tocWrapperOffsetLeft );
 +
    $('.affix').css('left', tocWrapperOffsetLeft);
 +
})
 +
$('.tocWrapper').on('affixed-top.bs.affix', function () {
 +
    $('.affix-top').css('left', 'auto');
 +
})
 +
*/
 +
}
 +
if ($('.tocWrapperiGEM').length ) {
 +
var tocWrapperOffsetLeft = $('.tocWrapper').offset().left;
 +
 +
$('.tocWrapperiGEM').affix({
 +
    offset: {
 +
      top: $('.tab-pane.active').offset().top
 +
    , bottom: function () {
 +
        return (this.bottom = $('.footer').outerHeight(true))
 +
      }
 +
    }
 +
  })
 +
/*
 +
$('.tocWrapperiGEM').on('affixed.bs.affix', function () {
 +
//alert(tocWrapperOffsetLeft );
 +
    $('.affix').css('left', tocWrapperOffsetLeft);
 +
})
 +
$('.tocWrapperiGEM').on('affixed-top.bs.affix', function () {
 +
    $('.affix-top').css('left', 'auto');
 +
})
 +
*/
 +
}
 +
});
 +
 +
</script>
</html>
</html>

Latest revision as of 01:33, 18 October 2014