Team:DTU-Denmark/jorjo
From 2014.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
+ | <html> | ||
<head> | <head> | ||
- | < | + | <!-- STYLESHEET --> |
- | < | + | <!-- *********** --> |
- | < | + | |
- | + | ||
- | + | <link rel="stylesheet" href="https://2014.igem.org/Team:DTU-Denmark/joro?action=raw&ctype=text/css" type="text/css" /> | |
- | + | <link rel="icon" type="image/png" size="16x16" href="https://static.igem.org/mediawiki/2013/1/16/DTU-n2o-favicon.png"/> | |
- | + | ||
- | + | ||
- | + | <!-- JAVASCRIPTS --> | |
- | } | + | <!-- *********** --> |
- | + | ||
- | + | <!-- ie9.js (fixes all Internet Explorer browsers older than ie9) --> | |
- | + | <!--[if lt IE 9]> | |
- | + | <script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script> | |
- | + | <![endif]--> | |
- | + | ||
- | + | ||
- | + | ||
- | + | <!-- Navigation scroll follow --> | |
- | + | <script type="text/javascript"> | |
- | + | var prevScrollPos = -1000; | |
- | + | $(window).scroll(function () { | |
- | + | ||
- | + | <!-- here is added table of content fixing to screen : was all 35 with Title OutsideWhitebox--> | |
- | + | var scrollPos = Math.floor($(window).scrollTop()); | |
- | + | ||
- | + | if(Math.abs(prevScrollPos - scrollPos) <= 1){ | |
- | + | return "nuthin"; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | var toc_margin_from_top = $(".navigation").height() + 35; | |
- | + | var scroll_pos_above_start_of_article = scrollPos < $(".whitebox.article").offset().top - 68; | |
- | + | var toc_end_reached_bottom_of_article = scrollPos + toc_margin_from_top + $(".toc").height() > $(".whitebox.article").offset().top + $(".whitebox.article").height() - 35; | |
- | + | var toc_margin_from_title = scrollPos < ($(".whitebox.article").offset().top ); | |
- | + | ||
- | + | ||
- | + | ||
- | + | if(scroll_pos_above_start_of_article){ | |
- | + | $(".toc").offset({top: $(".whitebox.article").offset().top + 68}); | |
- | + | } else if(toc_end_reached_bottom_of_article){ | |
- | + | $(".toc").offset({top: $(".whitebox.article").offset().top + $(".whitebox.article").height() - $(".toc").height() - 35}); | |
- | + | } else if(toc_margin_from_title){ | |
- | + | $(".toc").offset({top: $(".whitebox.article").offset().top + 68}); | |
- | + | } else { | |
- | + | $(".toc").offset({top: scrollPos + toc_margin_from_top}); | |
- | + | } | |
- | + | <!-- new attempt to fix menubar (jakob) --> | |
- | + | ||
- | + | var scroll_pos_above_menubar = scrollPos < 250; | |
- | + | ||
- | + | if(scroll_pos_above_menubar){ | |
- | + | $(".navigation").offset({top: 250 }); | |
- | + | } else { | |
- | + | $(".navigation").offset({top: scrollPos}); | |
- | + | } | |
- | + | ||
- | + | //if (scroll_pos_below_start_of_article){ //&& (scrollPos < $(document).height() - $(".navigation")[0].height() - 70)) { | |
- | + | // $(".toc").addClass("stickBelowNavigation"); | |
- | + | //} else { | |
- | + | // $(".toc").removeClass("stickBelowNavigation"); | |
- | + | //} | |
- | + | }); | |
- | + | </script> | |
- | } | + | |
- | + | <!-- MathJax (LaTeX for the web) --> | |
- | + | <script type="text/x-mathjax-config"> | |
- | + | MathJax.Hub.Config({tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}}); | |
- | + | MathJax.Hub.Config({ | |
- | + | TeX: { | |
- | + | equationNumbers: { autoNumber: "AMS" } | |
- | + | } | |
- | + | }); | |
- | + | </script> | |
- | + | <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> | |
- | + | ||
- | } | + | <!-- Drop Down navigation --> |
- | </ | + | <script type="text/javascript"> |
- | < | + | $(document).ready( |
- | < | + | function(){ |
- | + | $("ul.subnav").parent().find("> a").append("<span> ▼</span>"); | |
- | + | $("ul.topnav li").hover( | |
- | + | function() { | |
- | + | // Hover over | |
- | + | $(this).parent().find("ul.subnav").hide(); | |
- | + | $(this).find("ul.subnav").show(); | |
- | + | // Hover out | |
- | } | + | $(this).hover( |
- | + | function() { | |
- | + | }, | |
+ | function(){ | ||
+ | $(this).find("ul.subnav").hide(); | ||
+ | } | ||
+ | ); | ||
+ | }, | ||
+ | function(){ | ||
+ | $(this).find("ul.subnav").hide(); | ||
+ | } | ||
+ | |||
+ | ); | ||
+ | } | ||
+ | ); | ||
+ | </script> | ||
+ | |||
+ | <!-- iGem wiki hacks --> | ||
+ | <!-- Remove all empty <p> tags --> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $("p").filter( function() { | ||
+ | return $.trim($(this).html()) == ''; | ||
+ | }).remove(); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!-- Remove "team" from the menubar --> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | $("menubar > ul > li:last-child").remove(); | ||
+ | }); | ||
+ | </script> | ||
+ | |||
+ | <!-- If Empty heading -> Then remove it --> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function() { | ||
+ | if ("" == "</html>{{{1}}}<html>") { | ||
+ | $("#heading").remove(); | ||
+ | } | ||
+ | }); | ||
+ | </script> | ||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | $("div.thumbinner > a img").slimbox({/* Put custom options here */}, function(el) { | ||
+ | url = el.src; | ||
+ | if (url.indexOf('thumb') != -1) { | ||
+ | url = url.substring(0, url.lastIndexOf('/')); | ||
+ | url = url.replace('/thumb/', '/'); | ||
+ | } | ||
+ | description = $(el).parents("div.thumbinner").children("div.thumbcaption").text(); | ||
+ | return [url, description]; | ||
+ | }, function(el) { | ||
+ | return (this == el); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</head> | </head> | ||
<body> | <body> | ||
- | + | ||
- | < | + | <!-- HTML CONTENT --> |
- | + | <!-- ************ --> | |
- | < | + | |
- | + | <!-- Header image --> | |
- | + | ||
- | < | + | <div id="header"> |
- | + | <div class="centering"> | |
- | + | </div> | |
- | < | + | </div> |
- | + | ||
- | + | <!-- Navigation bar --> | |
- | + | </html>{{:Team:DTU-Denmark/templates/navigationbar}}<html> | |
- | + | ||
- | + | ||
- | + | <!-- Prepare for content --> | |
- | + | <div id="innercontent"> | |
- | + | <div class="centering"> | |
- | < | + | <div class="whitebox article"> |
- | + | ||
- | + | <div class="overviewPage"> | |
- | + | <h1> | |
- | + | </html> | |
- | + | <html> | |
- | + | </h1> | |
- | + | ||
- | + | ||
</div> | </div> | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
</body> | </body> | ||
- | </html | + | |
+ | </html> |
Latest revision as of 14:38, 23 July 2014