Team:TU Delft/header

From 2010.igem.org

(Difference between revisions)
Line 17: Line 17:
/-->
/-->
 +
<!-- Reset CSS - START /-->
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.1/build/base/base-min.css">
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.1/build/base/base-min.css">
 +
<!-- Reset CSS - END /-->
 +
 +
<!-- Internet Explorer PNG fix - START /-->
<!--[if lt IE 8]>
<!--[if lt IE 8]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js">IE7_PNG_SUFFIX=".png";</script>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js">IE7_PNG_SUFFIX=".png";</script>
<![endif]-->
<![endif]-->
-
<script type="text/javascript" src="http://dl.dropbox.com/u/602630/jquery_address.js"></script>
+
<!-- Internet Explorer PNG fix - END /-->
-
<script type="text/javascript" src="https://2010.igem.org/Team:TU_Delft/files/jquery_scrollto?action=raw"></script>
+
-
<style type="text/css">
+
-
html, body {
+
-
margin: 0;
+
-
padding: 0;
+
-
}
+
-
body {
+
<!-- Scripting - START /-->
-
background-color: #001e25;
+
<script type="text/javascript" src="http://github.com/cowboy/jquery-hashchange/raw/v1.3/jquery.ba-hashchange.js"></script>
-
background-image: url(http://www.igemtudelft.nl/wp-content/themes/minicard/images/bg/burst.jpg);
+
-
background-repeat: no-repeat;
+
-
background-position: top center;
+
-
}
+
-
/* Wiki Hacks - START */
+
<script type="text/javascript">
-
/* Author: Pieter van Boheemen */
+
//Global Vars
-
/* Team: TU Delft */
+
-
#globalWrapper {
+
// Set document ready callback
-
background-color: transparent;
+
$(function() {
-
border: none;
+
// Initialize history plugin.
-
margin: 0;
+
$(window).hashchange(historyCallback);
-
padding: 0;
+
rewriteLinks($("#navlist"));
-
}
+
-
#content {
+
historyCallback();
-
background-color: transparent;
+
-
border: none;
+
-
padding: 0;
+
-
margin: 0;
+
-
width: 100%;
+
-
}
+
-
#bodyContent {
+
// setup hovering
-
border: none;
+
$(".menu_button").hover(
-
padding:0;
+
function () { $(this).addClass("hover"); },
-
margin:0;
+
function () { $(this).removeClass("hover"); }
-
width:100%;
+
);
-
}
+
-
#top-section {
+
if (console === undefined) {
-
height: 20px;
+
console = {log:function(a){}};
-
margin-top: -5px;
+
}
-
margin-left: auto;
+
});
-
margin-right: auto;
+
-
margin-bottom: 0 !important;
+
-
margin-bottom: 10px;
+
-
padding:0;
+
-
border: none;
+
-
}
+
-
#p-logo {
 
-
height:1px;
 
-
overflow:hidden;
 
-
display: none;
 
-
}
 
-
#search-controls {
 
-
overflow:hidden;
 
-
display:block;
 
-
background: none;
 
-
position: absolute;
 
-
top: 100px;
 
-
right: 40px;
 
-
}
 
-
.left-menu {
+
function splitHash(hash) {
-
width: 400px;
+
var kvpairs = hash.split('&');
-
display:block;
+
var i;
-
float:left;
+
var kvmap = {};
-
margin-top:-80px;
+
for(i=0;i<kvpairs.length;i++) {
-
border: none;
+
var s = kvpairs[i].split('=');
 +
kvmap[s[0]] = s[1];
 +
}
 +
return kvmap;
}
}
-
.left-menu ul {
+
function loadPage(page)
-
border: none;
+
{
 +
var url = wgServer + "/Team:TU_Delft/" + page + "?action=render";
 +
$("#load").fadeOut(200);
 +
$.get(url, function(data) {
 +
$("#load").html(data).fadeIn(200);
 +
rewriteLinks($("#load"));
 +
});
}
}
-
#menubar.right-menu {
+
function historyCallback() {
-
width:300px;
+
var hash = location.hash;
-
display:block;
+
//console.log('historyCallback: ' + hash);
-
float:left;
+
if(hash) {
-
margin-top:-80px;
+
hash = hash.substring(1);
-
border: none;
+
if(hash.split('=').length == 1) {
 +
//console.log('load hash as page: ' + hash);
 +
// loadPage(hash);
 +
} else {
 +
    var kvmap = splitHash(hash);
 +
if (kvmap.page) {
 +
//console.log('load hashmap.page: ' + kvmap.page);
 +
loadPage(kvmap.page);
 +
}
 +
}
 +
} else {
 +
loadPage('pages/home');
 +
}
}
}
-
.right-menu ul {
 
-
border: none;
 
-
}
 
-
#footer-box {
+
function rewriteLinks(elem) {
-
background-color: transparent;
+
$("a",elem).each(function() {
-
border: none;
+
var txt = $(this).text();
-
width: 965px;
+
-
margin: 0 auto;
+
-
padding: 0;
+
-
}
+
-
#footer {
+
if(this.hash)
-
border: none;
+
this.href = this.hash;
-
width: 965px;
+
else if(txt != "edit")
-
margin: 0;
+
this.href = this.href.replace("https://2010.igem.org/Team:TU_Delft/", "#page=");
-
padding: 0;
+
});
}
}
-
.firstHeading {
+
</script>
-
display: none;
+
-
}
+
-
#f-list a {
+
<!-- Scripting - END /-->
-
color: #333;
+
-
font-size: 10px;
+
-
}
+
-
#f-list a:hover {
+
<!-- Main CSS - START /-->
-
color: #666;
+
<style type="text/css">
-
}
+
html, body {
-
 
+
-
#footer ul {
+
margin: 0;
margin: 0;
padding: 0;
padding: 0;
}
}
-
#footer ul li {
+
body {
-
margin-top: 0;
+
background-color: #001e25;
-
margin-bottom: 0;
+
background-image: url(http://www.igemtudelft.nl/wp-content/themes/minicard/images/bg/burst.jpg);
-
margin-left: 10px;
+
background-repeat: no-repeat;
-
margin-right: 10px;
+
background-position: top center;
-
padding: 0;
+
}
}
 +
/* Wiki Hacks - START */
 +
/* Author: Pieter van Boheemen */
 +
/* Team: TU Delft */
 +
#globalWrapper { background-color: transparent; border: none; margin: 0; padding: 0;}
 +
#content { background-color: transparent; border: none; padding: 0; margin: 0; width: 100%;}
 +
#bodyContent { border: none; padding:0; margin:0; width:100%;}
 +
#top-section { height: 20px; margin-top: -5px; margin-left: auto; margin-right: auto; margin-bottom: 0 !important; margin-bottom: 10px; padding:0; border: none;}
 +
#p-logo { height:1px; overflow:hidden; display: none;}
 +
#search-controls { overflow:hidden; display:block; background: none; position: absolute; top: 100px; right: 40px;}
 +
.left-menu { width: 400px; display:block; float:left; margin-top:-80px; border: none;}
 +
.left-menu ul { border: none; }
 +
#menubar.right-menu { width:300px; display:block; float:left; margin-top:-80px; border: none;}
 +
.right-menu ul { border: none;}
 +
#footer-box { background-color: transparent; border: none; width: 965px; margin: 0 auto; padding: 0;}
 +
#footer { border: none; width: 965px; margin: 0; padding: 0;}
 +
.firstHeading { display: none;}
 +
#f-list a { color: #333; font-size: 10px;}
 +
#f-list a:hover { color: #666;}
 +
#footer ul { margin: 0; padding: 0;}
 +
#footer ul li { margin-top: 0; margin-bottom: 0; margin-left: 10px; margin-right: 10px; padding: 0;}
/* Wiki Hacks - END */
/* Wiki Hacks - END */
Line 304: Line 296:
#search-controls {
#search-controls {
 +
 +
display:none;
 +
background-image: url(https://static.igem.org/mediawiki/2010/9/95/Search.png);
background-image: url(https://static.igem.org/mediawiki/2010/9/95/Search.png);
background-repeat: no-repeat;
background-repeat: no-repeat;

Revision as of 18:13, 22 July 2010