Difference between revisions of "Template:Reading2"
(3 intermediate revisions by the same user not shown) | |||
Line 17: | Line 17: | ||
pagenames.push(["Lab Book", "Lab Notes", "Data"]); | pagenames.push(["Lab Book", "Lab Notes", "Data"]); | ||
pagenames.push(["Experiments", "Protocols", "Experiments"]); | pagenames.push(["Experiments", "Protocols", "Experiments"]); | ||
− | pagenames.push(["Human Practices", "Human Practices", "Public Engagement | + | pagenames.push(["Human Practices", "Human Practices", "Public Engagement"]); |
− | + | ||
pagenames.push(["Attributions"]); | pagenames.push(["Attributions"]); | ||
Line 29: | Line 28: | ||
address.push(["/Protocols", "/Experiments"]); | address.push(["/Protocols", "/Experiments"]); | ||
address.push(["/Practices", "/PublicEngagement", "/Collaborations"]); | address.push(["/Practices", "/PublicEngagement", "/Collaborations"]); | ||
− | |||
address.push(["/Attributions"]); | address.push(["/Attributions"]); | ||
Line 58: | Line 56: | ||
for(i1 = 0; i1 < pagenames.length; i1++){ | for(i1 = 0; i1 < pagenames.length; i1++){ | ||
if(pagenames[i1].length <= 1){ | if(pagenames[i1].length <= 1){ | ||
− | menuHTML += '<div onclick="gotopage(address['+i1+'][0])" onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width: | + | menuHTML += '<div onclick="gotopage(address['+i1+'][0])" onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:12.5%; float:left; text-align:center;"><text style = "line-height: 40px; font-size: 12px; color: #ffffff;text-decoration:none;">' + pagenames[i1][0] + '</text ></div>'; |
}else{ | }else{ | ||
− | menuHTML += '<div onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width: | + | menuHTML += '<div onmouseout="dullMenu(this)"onmouseover="lightUpMenu(this, ' + i1 + ')" style = "border-radius:1em; height:100%; width:12.5%; float:left; text-align:center;"><text style = "line-height: 40px; font-size: 12px; color: #ffffff;text-decoration:none;">' + pagenames[i1][0] + '</text ></div>'; |
} | } | ||
} | } | ||
Line 96: | Line 94: | ||
var subM = document.getElementById("SubMenu"); | var subM = document.getElementById("SubMenu"); | ||
subM.innerHTML= submenuHTML; | subM.innerHTML= submenuHTML; | ||
− | var offset = 7.5 + ( | + | var offset = 7.5 + (10.6*index); |
subM.style.left = offset + '%'; | subM.style.left = offset + '%'; | ||
} | } | ||
Line 280: | Line 278: | ||
</div> | </div> | ||
− | <div id = "SubMenu" style="border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; font-size: 15px; visibility:hidden; position:absolute; font-size:10px; width: | + | <div id = "SubMenu" style="border-bottom-left-radius: 1em; border-bottom-right-radius: 1em; font-size: 15px; visibility:hidden; position:absolute; font-size:10px; width:10.9%; background-Color:#d8131d; color:#ffffff;"> |
</div> | </div> | ||
</body> | </body> | ||
</html> | </html> |
Latest revision as of 18:06, 18 September 2015