Team:Brown/templates/header

From 2010.igem.org

(Difference between revisions)
Line 3: Line 3:
<script type="text/javascript" src="http://dl.getdropbox.com/u/136370/jquery.gradient.js"></script>
<script type="text/javascript" src="http://dl.getdropbox.com/u/136370/jquery.gradient.js"></script>
<script type="text/javascript" src="http://dl.getdropbox.com/u/136370/jquery.corner.js"></script>
<script type="text/javascript" src="http://dl.getdropbox.com/u/136370/jquery.corner.js"></script>
-
<!--
+
 
-
<script type="text/javascript">
+
<!-- BEGIN Breadcrumbs script from TU Delft -->
 +
<script language="javascript" type="text/javascript">
 +
//Configure the script here
 +
var teamname = "Brown";
 +
// Do not edit below
 +
// Loop through the URL
 +
function buildDepth(array,count) {
 +
var depthStr="";
 +
for (i=0;i<count;i++)
 +
{
 +
depthStr=depthStr + array[i] + "/" ;
 +
}
 +
return depthStr;
 +
}
 +
// The function
 +
function buildBreadCrumbTrail(page) {
 +
// Declare vars
 +
var constituentFolders = new Array();
 +
var currentURL = page;
 +
// Split the URL
 +
constituentFolders=currentURL.split("/");
 +
// Start with a link to the team home page
 +
var outputStr="<a href='https://2010.igem.org/Team:'" + teamname + ">Home</a>";
 +
// Loop through the URL
 +
for (count=0;count<(constituentFolders.length);count++)
 +
{
 +
outputStr=outputStr + " > <a href='https://2010.igem.org/Team:" + teamname + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 +
}
 +
// Write to the div
 +
$("#breadcrumbs").html(outputStr);
 +
}
 +
// Capitalize the first letter
 +
function capitaliseFirstLetter(string) {
 +
    return string.charAt(0).toUpperCase() + string.slice(1);
 +
}
 +
// Start the script upon page load
$(function() {
$(function() {
 +
buildBreadCrumbTrail(window.location.pathname);
 +
}
 +
</script>
-
$('body').gradient({
 
-
    from: '003366',
 
-
    to: '333333',
 
-
    direction: 'horizontal'
 
-
  });
 
-
 
-
$("img.rounded").wrap('<div></div>').parent().corner("5px");
 
-
 
-
});
 
-
 
-
$('ul#nav a + ul').prev().append(' &#187;');
 
-
</script>
 
-
-->
 
<style>
<style>
/*BEGIN HEADER/MENU REMOVAL*/
/*BEGIN HEADER/MENU REMOVAL*/
Line 116: Line 141:
{{:Team:Brown/templates/menu}}
{{:Team:Brown/templates/menu}}
<html>
<html>
-
 
-
<!-- BEGIN Breadcrumbs script from TU Delft -->
 
-
<script language="javascript" type="text/javascript">
 
-
//Configure the script here
 
-
var teamname = "Brown";
 
-
// Do not edit below
 
-
// Loop through the URL
 
-
function buildDepth(array,count) {
 
-
var depthStr="";
 
-
for (i=0;i<count;i++)
 
-
{
 
-
depthStr=depthStr + array[i] + "/" ;
 
-
}
 
-
return depthStr;
 
-
}
 
-
// The function
 
-
function buildBreadCrumbTrail(page) {
 
-
// Declare vars
 
-
var constituentFolders = new Array();
 
-
var currentURL = page;
 
-
// Split the URL
 
-
constituentFolders=currentURL.split("/");
 
-
// Start with a link to the team home page
 
-
var outputStr="<a href='https://2010.igem.org/Team:'" + teamname + ">Home</a>";
 
-
// Loop through the URL
 
-
for (count=0;count<(constituentFolders.length);count++)
 
-
{
 
-
outputStr=outputStr + " > <a href='https://2010.igem.org/Team:" + teamname + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>";
 
-
}
 
-
// Write to the div
 
-
$("#breadcrumbs").html(outputStr);
 
-
}
 
-
// Capitalize the first letter
 
-
function capitaliseFirstLetter(string) {
 
-
    return string.charAt(0).toUpperCase() + string.slice(1);
 
-
}
 
-
// Start the script upon page load
 
-
$(function() {
 
-
buildBreadCrumbTrail(window.location.pathname);
 
-
}
 
-
</script>
 
<div id="breadcrumbs">The breadcrumbs will show up in this div</div>
<div id="breadcrumbs">The breadcrumbs will show up in this div</div>
</html>
</html>

Revision as of 01:50, 24 October 2010