Team:Brown/templates/header
From 2010.igem.org
(Difference between revisions)
Line 2: | Line 2: | ||
<html> | <html> | ||
<!-- BEGIN Breadcrumbs script from TU Delft --> | <!-- BEGIN Breadcrumbs script from TU Delft --> | ||
- | + | function capitaliseFirstLetter(string) | |
- | + | { | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | function | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
return string.charAt(0).toUpperCase() + string.slice(1); | return string.charAt(0).toUpperCase() + string.slice(1); | ||
} | } | ||
- | // | + | |
- | + | function buildDepth(array,count) | |
- | + | { | |
- | } | + | var depthStr=""; |
+ | for (i=0;i<count;i++) | ||
+ | { | ||
+ | depthStr=depthStr + array[i] + "/" ; | ||
+ | } | ||
+ | return depthStr; | ||
+ | } | ||
+ | function buildBreadCrumbTrail(page) | ||
+ | { | ||
+ | var constituentFolders = new Array(); | ||
+ | var currentURL = page; | ||
+ | constituentFolders=currentURL.split("/"); | ||
+ | var outputStr="<a href='https://2010.igem.org/Team:Brown#page=Home'>Home</a>"; | ||
+ | if(page != "Home") { | ||
+ | for (count=0;count<(constituentFolders.length);count++) | ||
+ | { | ||
+ | outputStr=outputStr + " <span class='doubleright'>»</span> <a href='https://2010.igem.org/Team:TU_Delft#page=" + buildDepth(constituentFolders,count) + constituentFolders[count] + "'>" + capitaliseFirstLetter(constituentFolders[count]).replace(/-/gi," ") + "</a>"; | ||
+ | } | ||
+ | } | ||
+ | $("#breadcrumbs").html(outputStr); | ||
+ | } | ||
</script> | </script> | ||
+ | |||
+ | |||
<style> | <style> | ||
/*BEGIN HEADER/MENU REMOVAL*/ | /*BEGIN HEADER/MENU REMOVAL*/ |
Revision as of 02:34, 24 October 2010
function capitaliseFirstLetter(string)
{
return string.charAt(0).toUpperCase() + string.slice(1);
}
function buildDepth(array,count)
{
var depthStr="";
for (i=0;i