Team:SKLBC-China

From 2014hs.igem.org

(Difference between revisions)
Line 1: Line 1:
-
{:Team:SKLBC-China\defaultcss]]
+
<html>
 +
<head>
 +
<script>
 +
window.onload = function(){
 +
$.ajax({
 +
  url: "/Team:SYSU-Software/header",
 +
  cache: false,
 +
  success: function(html){
 +
$("#navigation").append($(html).find(".row").html());
 +
var url = window.location.href;
-
<!DOCTYPE HTML>
+
if(url == "https://2013.igem.org/Team:SYSU-Software")
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
+
{
-
<head>
+
$(".nav-li:first").addClass("active");
-
<style type="text/css"!important>
+
}
-
body {background-repeat:no-repeat;background-attachment:fixed;}
+
else if((url == "https://2013.igem.org/Team:SYSU-Software/overview") || (url == "https://2013.igem.org/Team:SYSU-Software/demo") ||
-
*{margin:0px;padding:0px}
+
(url == "https://2013.igem.org/Team:SYSU-Software/download") || (url == "https://2013.igem.org/Team:SYSU-Software/part1") ||
-
div.header {background-color:rgb(46,178,170);width:100%!important;height:30px;z-index:2;top:0px;position:fixed}
+
(url == "https://2013.igem.org/Team:SYSU-Software/part2") || (url == "https://2013.igem.org/Team:SYSU-Software/part3"))
-
div.container {margin:0;padding:0;background-color:rgb(130,200,170);width:60%!important;left:20%;margin-top:30px;z-index:0;opacity:0.8;position:fixed}
+
$(".nav-li:eq(1)").addClass("active");
-
div.content {width:60%!important;left:20%;margin-top:30px;z-index:1;position:relative}
+
else if((url == "https://2013.igem.org/Team:SYSU-Software/model") || (url == "https://2013.igem.org/Team:SYSU-Software/notebook")|| (url == "https://2013.igem.org/Team:SYSU-Software/tutorial"))
-
p {color:rgb(255,255,255)}
+
$(".nav-li:eq(2)").addClass("active");
-
ul {float:left;
+
else if((url == "https://2013.igem.org/Team:SYSU-Software/require")|| (url == "https://2013.igem.org/Team:SYSU-Software/saft")|| (url == "https://2013.igem.org/Team:SYSU-Software/colla"))
-
width:100%;
+
$(".nav-li:eq(3)").addClass("active");
-
padding:0;
+
else if((url == "https://2013.igem.org/Team:SYSU-Software/humanpra"))
-
margin:0;
+
$(".nav-li:eq(4)").addClass("active");
-
list-style-type:none;}
+
else if((url == "https://2013.igem.org/Team:SYSU-Software/team"))
-
a {float:left;
+
$(".nav-li:eq(5)").addClass("active");
-
width:7em;
+
  }
-
text-decoration:none;
+
});
-
color:white;
+
$.ajax({
-
background-color:rgb(46,178,170);
+
  url: "/Team:SYSU-Software/footer",
-
padding:0.2em 0.6em;
+
  cache: false,
-
border-right:1px solid white;}
+
  success: function(html){
-
a:hover {background-color:#ff3300}
+
$("footer").append($(html).find("footer").html());
-
li {display:inline}}
+
  }
-
li {display:inline}
+
});
-
</style>
+
}
-
</head>
+
 
-
<body background="https://static.igem.org/mediawiki/2014hs/0/02/Team-SKLBC-China-default_background.jpg">
+
 
-
<div class="header" style="text-align:center">
+
$(document).ready(function() {
-
<ul>
+
$("#navigation").after("<div id=\"totop\"><span></span></div>");
-
<li><a href="#">Home</a></li>
+
var topbtn = $("#totop");
-
<li><a href="#">Project</a></li>
+
var lastScroll = 0;
-
<li><a href="#">Documents</a></li>
+
topbtn.css("display", "none");
-
<li><a href="#">Requirement</a></li>
+
window.onscroll = function(){
-
<li><a href="#">Team</a></li>
+
var top = $(window).scrollTop();
-
<li><a href='#'>Our Logo</a></li>
+
if(top > 0){
-
</ul>
+
topbtn.css("display", "");
-
</div>
+
}
-
<div class="container" style="height:100%;top:0px;"></div>
+
if(top == 0){
-
<div class="content" style="height:2200px">
+
topbtn.css("display", "none");
-
<p>text line</p>
+
}
-
<p>text line</p>
+
};
-
<p>text line</p>
+
/* topbtn.focus(function(){ */
-
<p>text line</p>
+
/* }); */
-
<p>text line</p>
+
topbtn.click(function(){
-
<p>text line</p>
+
var scrollTop = 0;
-
<p>text line</p>
+
var curPos = $(window).scrollTop();
-
<p>text line</p>
+
topbtn.addClass("movingtotop");
-
<p>text line</p>
+
topbtn.addClass("focustop");
-
<p>text line</p>
+
var step = Math.abs(scrollTop - curPos) / 200 ;
-
<p>text line</p>
+
var tid = setInterval(function() {
-
<p>text line</p>
+
topbtn.toggleClass("movingtotop");
-
<p>text line</p>
+
if (curPos > scrollTop + 14) {
-
<p>text line</p>
+
curPos -= step;
-
<p>text line</p>
+
step = step * 1.05;
-
<p>text line</p>
+
window.scrollTo(0, curPos);
-
<p>text line</p>
+
} else if (curPos <= scrollTop + 14){
-
<p>text line</p>
+
window.scrollTo(0, scrollTop);
-
<p>text line</p>
+
topbtn.removeClass("movingtotop").removeClass("focustop");
-
<p>text line</p>
+
clearInterval(tid);
-
<p>text line</p>
+
}
-
<p>text line</p>
+
}, 0.01);
-
<p>text line</p>
+
});
-
<p>text line</p>
+
 
-
<p>text line</p>
+
});
-
<p>text line</p>
+
</script>
-
<p>text line</p>
+
<style type="text/css">
-
<p>text line</p>
+
#p-logo,#search-controls,.firstHeading,#top,#footer-box,#catlinks
-
<p>text line</p>
+
{ display:none; }
-
<p>text line</p>
+
 
-
<p>text line</p>
+
#globalWrapper {
-
<p>text line</p>
+
padding-bottom:0; top:0px;}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
#top-section{
-
<p>text line</p>
+
height:0px;
-
<p>text line</p>
+
border:none;
-
<p>text line</p>
+
width:100%; }
-
<p>text line</p>
+
 
-
<p>text line</p>
+
#content{
-
<p>text line</p>
+
width:100%;
-
<p>text line</p>
+
border-left:none; border-right: none;
-
<p>text line</p>
+
padding:1px 0px 0px 0px!important;
-
<p>text line</p>
+
 
-
<p>text line</p>
+
}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
#menubar{
-
<p>text line</p>
+
width:510px;
-
<p>text line</p>
+
top:-1px;
-
<p>text line</p>
+
}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
.right-menu li a{
-
<p>text line</p>
+
background-color:white;
-
<p>text line</p>
+
color:black;
-
<p>text line</p>
+
text-decoration:none;
-
<p>text line</p>
+
}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
.right-menu li a:hover{
-
<p>text line</p>
+
text-decoration:none;
-
<p>text line</p>
+
}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
.left-menu li a{
-
<p>text line</p>
+
text-decoration:none;
-
<p>text line</p>
+
}
-
<p>text line</p>
+
.left-menu li a:hover{
-
<p>text line</p>
+
text-decoration:none;
-
<p>text line</p>
+
}
-
<p>text line</p>
+
 
-
<p>text line</p>
+
ul,li{ list-style:none; }
-
<p>text line</p>
+
</style>
-
<p>text line</p>
+
</head>
-
<p>text line</p>
+
<body>
-
<p>text line</p>
+
</body>
-
<p>text line</p>
+
-
<p>text line</p>
+
-
</div>
+
-
</body>
+
</html>
</html>

Revision as of 15:36, 28 May 2014