Difference between revisions of "Template:HSNU-TAIPEI/members js"
Line 32: | Line 32: | ||
}; | }; | ||
− | var generatePersonImg = function(personName) { | + | var generatePersonImg = function(personName, personSrc) { |
var justifiedName = justifyPersonName(personName); | var justifiedName = justifyPersonName(personName); | ||
console.log(justifiedName); | console.log(justifiedName); | ||
− | var source = "https://static.igem.org/mediawiki/2015/ | + | var source = "https://static.igem.org/mediawiki/2015/" + personSrc + "/HSNU-TAIPEI_" + justifiedName + ".jpg"; |
return '<img src="' + source + '">'; | return '<img src="' + source + '">'; | ||
}; | }; | ||
Line 49: | Line 49: | ||
var generateProfile = function(person) { | var generateProfile = function(person) { | ||
var personName = person["Name"], | var personName = person["Name"], | ||
− | personRole = person["Role"]; | + | personRole = person["Role"], |
+ | personSrc = person["Source"]; | ||
var profile = document.createElement('div'); | var profile = document.createElement('div'); | ||
− | var content = generatePersonImg(personName); | + | var content = generatePersonImg(personName, personSrc); |
content += generatePersonFigure(personName, personRole); | content += generatePersonFigure(personName, personRole); | ||
profile.setAttribute('class', 'profile'); | profile.setAttribute('class', 'profile'); | ||
Line 117: | Line 118: | ||
sectionName: "Wiki", | sectionName: "Wiki", | ||
persons: [ | persons: [ | ||
− | { Name:"Hung Chi-Heng", Role:"Student" }, | + | { Name:"Hung Chi-Heng", Role:"Student", Source:"f/f7" }, |
{ Name:"Wang Yen-Jen", Role:"Student" }, | { Name:"Wang Yen-Jen", Role:"Student" }, | ||
{ Name:"Shi Cheng-Yu", Role:"Student" }, | { Name:"Shi Cheng-Yu", Role:"Student" }, |
Revision as of 13:19, 16 June 2015