Team:Brown-Stanford/Templates/Main

From 2011.igem.org

(Difference between revisions)
Line 403: Line 403:
  *
  *
  */
  */
-
</script>
 
-
 
-
<script>
 
-
//Configure the script here
 
-
var teamname = "Brown-Stanford";
 
-
 
-
// 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://2011.igem.org/Team:'" + teamname + ">Home</a>";
 
-
 
-
// Loop through the URL
 
-
for (count=0;count<(constituentFolders.length);count++)
 
-
{
 
-
outputStr=outputStr + " > <a href='https://2011.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>
</script>
Line 738: Line 687:
<div class="igem"><a href="/"><img src="https://static.igem.org/mediawiki/2011/f/f1/Brown-Stanford_iGEM.png" height="50"></a></div>
<div class="igem"><a href="/"><img src="https://static.igem.org/mediawiki/2011/f/f1/Brown-Stanford_iGEM.png" height="50"></a></div>
-
<div id="breadcrumbs"></div>
 
<div class="content">
<div class="content">
<div class="icons"><a href="http://www.facebook.com/pages/Brown-Stanford-iGEM/166210643442328"><img src="https://static.igem.org/mediawiki/2011/c/c4/Brown-Stanford_Facebook.png" style="height:20px;width:20px"></img></a><a href="http://www.twitter.com/Brown_iGEM"><img src="https://static.igem.org/mediawiki/2011/d/df/Brown-Stanford_Twitter.png" style="height:20px;width:20px"></img></a></div>
<div class="icons"><a href="http://www.facebook.com/pages/Brown-Stanford-iGEM/166210643442328"><img src="https://static.igem.org/mediawiki/2011/c/c4/Brown-Stanford_Facebook.png" style="height:20px;width:20px"></img></a><a href="http://www.twitter.com/Brown_iGEM"><img src="https://static.igem.org/mediawiki/2011/d/df/Brown-Stanford_Twitter.png" style="height:20px;width:20px"></img></a></div>

Revision as of 22:25, 5 July 2011