1
0
mirror of https://github.com/actix/actix-website synced 2025-06-29 08:14:58 +02:00

Attempt to clean up the multilingual setup

This commit is contained in:
Armin Ronacher
2018-06-24 23:03:40 +02:00
parent 513ef13784
commit 20888bc58b
8 changed files with 221 additions and 249 deletions

View File

@ -1,37 +1,3 @@
window.onload = function(){
if (window.location.href.search("cn") != -1) {
if (document.getElementById("act-home")){
document.getElementById("act-home").style.display = "none"
}
}else{
if (document.getElementById("act-home-cn")){
document.getElementById("act-home-cn").style.display = "none"
}
}
if (window.location.href.search("cn") != -1) {
document.getElementById("ul-en").style.display = "none"
}else{
document.getElementById("ul-zh").style.display = "none"
}
}
function setTab(name,cursel){
let tlinks = document.getElementById("act-cn-tabs").getElementsByTagName('li')
for(var i=1; i<=tlinks.length; i++){
var menu = document.getElementById(name+i);
var menudiv = document.getElementById("con_"+name+"_"+i);
if(i==cursel){
menu.className="off";
menudiv.style.display="block";
}
else{
menu.className="";
menudiv.style.display="none";
}
}
}
(function() {
function activateFeature(sel) {
$('div.actix-feature').hide();
@ -70,5 +36,3 @@ function setTab(name,cursel){
initFeatureSelector();
});
})();