Difference between revisions of "Team:Reading/Team"

Line 36: Line 36:
 
var menuactive = 0;
 
var menuactive = 0;
 
var menucount = 0;
 
var menucount = 0;
 +
 +
function changeBioContent(index){
 +
//add a </br> to break the line, also do not include " without a \ before, eg: \"
 +
 +
var bennyBio = "<p style=\"font-size:160%\">Benny \"Cereal\" Bostock. </br> Claims to be a stand-up comedic genius. Has yet to prove this. </br> Life Aim: to become a regular in all pubs, everywhere.</p>";
 +
var chrisBio = "<p style=\"font-size:160%\">Chris \"Shisha King\" Tucker. </br> Chris is an avid computer gamer. He also has a shisha pipe. Nuff said.</p>";
 +
var emilyBio = "<p style=\"font-size:160%\">Emily \"Awesomest person ever\" Capes. </br> Emily is very helpful and always offers people lifts in her car. </br> Do not accept this, she has no sense of direction or time. </br> Consequently, you will not make it to your destination.</p>";
 +
var izzahBio = "<p style=\"font-size:160%\">Izzah \"Coolest person ever\" Elahi. </br> Most Commonly found: In vicinity of street corners, red light district, or Nandos. Or all three at once.</p>";
 +
var mattBio = "<p style=\"font-size:160%\">Matt \"Gets things done\" Shepherd.</p>";
 +
var nasserBio = "<p style=\"font-size:160%\">Nasser Al-Farhan. Not sure if he has hair.</p>";
 +
var peteRBio = "<p style=\"font-size:160%\">Pete \"Com-Peter Science\" Roe. </br> Best coder in the universe. Most commonly found: Near/around computer or in the gym. </br> Life Aim: To be in both places at once</p>";
 +
var PeteWHBio = "<p style=\"font-size:160%\">Pete \"Boeing 747\" Whitehead. </br> Can't hold alcohol. When drunk he will imitate an aeroplane, sounds effects included. </br> Life Aim: To become a plane.</p>";
 +
var tomBBio = "<p style=\"font-size:160%\">Tom \"Mr Punctual\" Biggs. </br> Knows everything there is to know about genetics, he is an invaluable member of the team. </br> Unfortunately, he turns up a day late.</p>";
 +
var tomWLBio = "<p style=\"font-size:160%\">Tom \"Hannah\" Ward-Leggat. </br> From the ghetto. Stripper by night, pimp by day.</p>";
 +
var jennyPasang = "<p style=\"font-size:160%\">Jenny Pasang</p>";
 +
var bios = [bennyBio, chrisBio, emilyBio, izzahBio, mattBio, nasserBio, peteRBio, PeteWHBio, tomBBio, tomWLBio, jennyPasang];
 +
document.getElementById("bioframe").innerHTML= bios[index];
 +
}
 +
 +
function buildPage(){
 +
buildMenu();
 +
buildTeamGrid();
 +
setInterval(function(){
 +
if(menuactive <= 0){
 +
menucount = menucount - 1;
 +
if(menucount <= 0){
 +
document.getElementById("SubMenu").style.visibility = "hidden";
 +
}
 +
}
 +
},10);
 +
}
 +
 +
function buildTeamGrid(){
 +
var index = 0;
 +
var names = ["Benny Bostock", "Chris Tucker", "Emily Capes", "Izzah Elahi", "Matt Shepherd", "Nasser Al-Farhan", "Pete Roe", "Pete Whitehead", "Tom Biggs", "Thomas Ward-Leggat", "Jenny Pasang"];
 +
var pictureName = ["/c/c2/BennyBostock.jpg", "/e/ea/ChrisTucker.jpg", "/0/02/EmilyMichelleCapes.jpg", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png"];
 +
var teamHTML = '<table style="width:100%; color:#05a4ff; background-color:#e3e3e3; border-spacing: 25px;">';
 +
var newline = true;
 +
while(newline){
 +
teamHTML += '<tr>';
 +
for(i2 = 0; i2 < 3; i2++){
 +
if(index < names.length){teamHTML += '<td align="center"><b>' + names[index] + '</b><div style="border-style:solid; border-color:#ffffff; border-width:5px; border-radius:50px; height: 100px; width: 150px; background-size:cover; background-image:url(https://static.igem.org/mediawiki/2015' + pictureName[index] + ');" onmouseover="changeBioContent(' + index + ')"></div></td>';
 +
index += 1;}
 +
else{
 +
newline = false;
 +
}
 +
}
 +
teamHTML += '</tr>';
 +
}
 +
teamHTML += '</table>';
 +
document.getElementById("teamtable").innerHTML= teamHTML;
 +
}
  
 
function buildMenu(){
 
function buildMenu(){
Line 82: Line 134:
 
Button.style.Color = '#ffffff';
 
Button.style.Color = '#ffffff';
 
menuactive = 0;
 
menuactive = 0;
}
 
 
function buildPage(){
 
buildMenu();
 
buildTeamGrid();
 
setInterval(function(){
 
if(menuactive <= 0){
 
menucount = menucount - 1;
 
if(menucount <= 0){
 
document.getElementById("SubMenu").style.visibility = "hidden";
 
}
 
}
 
},10);
 
}
 
 
function buildTeamGrid(){
 
var index = 0;
 
var names = ["Benny Bostock", "Chris Tucker", "Emily Capes", "Izzah Elahi", "Matt Shepherd", "Nasser Al-Farhan", "Pete Roe", "Pete Whitehead", "Tom Biggs", "Thomas Ward-Leggat", "Jenny Pasang"];
 
var pictureName = ["/c/c2/BennyBostock.jpg", "/e/ea/ChrisTucker.jpg", "/0/02/EmilyMichelleCapes.jpg", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png", "/4/41/Blankprofile.png"];
 
var teamHTML = '<table style="width:100%; color:#05a4ff; background-color:#e3e3e3; border-spacing: 25px;">';
 
var newline = true;
 
while(newline){
 
teamHTML += '<tr>';
 
for(i2 = 0; i2 < 3; i2++){
 
if(index < names.length){teamHTML += '<td align="center"><b>' + names[index] + '</b><div style="border-style:solid; border-color:#ffffff; border-width:5px; border-radius:50px; height: 100px; width: 150px; background-size:cover; background-image:url(https://static.igem.org/mediawiki/2015' + pictureName[index] + ');" onmouseover="changeBioContent(' + index + ')"></div></td>';
 
index += 1;}
 
else{
 
newline = false;
 
}
 
}
 
teamHTML += '</tr>';
 
}
 
teamHTML += '</table>';
 
document.getElementById("teamtable").innerHTML= teamHTML;
 
 
}
 
}
  

Revision as of 22:43, 24 July 2015

Roll over the images to see the team member bio and extra photos in here.