Réorganisation des themes pour plus de souplesse

This commit is contained in:
Michael RICOIS 2017-10-05 11:16:32 +02:00
parent 825ecb2b83
commit 5560cecc8a

View File

@ -33,51 +33,103 @@ function initFaces()
$(".container-db .db-cube1 .back").addClass('face-custom-img');
$(".container-db .db-cube1 .back").addClass('face-custom-txt');
$('.chocos-holder .choco1 .front').css({'background-image':'url('+themeImg+'/chocos/1F.png)'})
$('.chocos-holder .choco1 .back').css({'background-image':'url('+themeImg+'/chocos/1B.png)'})
$('.chocos-holder .choco2 .front').css({'background-image':'url('+themeImg+'/chocos/2F.png)'})
$('.chocos-holder .choco2 .back').css({'background-image':'url('+themeImg+'/chocos/2B.png)'})
$('.chocos-holder .choco3 .front').css({'background-image':'url('+themeImg+'/chocos/3F.png)'})
$('.chocos-holder .choco3 .back').css({'background-image':'url('+themeImg+'/chocos/3B.png)'})
$('.chocos-holder .choco4 .front').css({'background-image':'url('+themeImg+'/chocos/4F.png)'})
$('.chocos-holder .choco4 .back').css({'background-image':'url('+themeImg+'/chocos/4B.png)'})
$('.chocos-holder .choco5 .front').css({'background-image':'url('+themeImg+'/chocos/5F.png)'})
$('.chocos-holder .choco5 .back').css({'background-image':'url('+themeImg+'/chocos/5B.png)'})
$('.chocos-holder .choco1 .front').css({'background-image':'url('+themeImg+'/chocos/1F.png)'});
$('.chocos-holder .choco1 .back').css({'background-image':'url('+themeImg+'/chocos/1B.png)'});
$('.chocos-holder .choco2 .front').css({'background-image':'url('+themeImg+'/chocos/2F.png)'});
$('.chocos-holder .choco2 .back').css({'background-image':'url('+themeImg+'/chocos/2B.png)'});
$('.chocos-holder .choco3 .front').css({'background-image':'url('+themeImg+'/chocos/3F.png)'});
$('.chocos-holder .choco3 .back').css({'background-image':'url('+themeImg+'/chocos/3B.png)'});
$('.chocos-holder .choco4 .front').css({'background-image':'url('+themeImg+'/chocos/4F.png)'});
$('.chocos-holder .choco4 .back').css({'background-image':'url('+themeImg+'/chocos/4B.png)'});
$('.chocos-holder .choco5 .front').css({'background-image':'url('+themeImg+'/chocos/5F.png)'});
$('.chocos-holder .choco5 .back').css({'background-image':'url('+themeImg+'/chocos/5B.png)'});
$('.container-pochette .pochette1 .front').css({'background-image':'url('+themeImg+'/box/1F.png)'})
$('.container-pochette .pochette1 .back').css({'background-image':'url('+themeImg+'/box/1B.png)'})
$('.container-pochette .pochette2 .front').css({'background-image':'url('+themeImg+'/box/2F.png)'})
$('.container-pochette .pochette2 .back').css({'background-image':'url('+themeImg+'/box/2B.png)'})
$('.container-pochette .pochette3 .front').css({'background-image':'url('+themeImg+'/box/3F.png)'})
$('.container-pochette .pochette3 .back').css({'background-image':'url('+themeImg+'/box/3B.png)'})
$('.container-pochette .pochette4 .front').css({'background-image':'url('+themeImg+'/box/4F.png)'})
$('.container-pochette .pochette4 .back').css({'background-image':'url('+themeImg+'/box/4B.png)'})
$('.container-pochette .pochette1 .front').css({'background-image':'url('+themeImg+'/box/1F.png)'});
$('.container-pochette .pochette1 .back').css({'background-image':'url('+themeImg+'/box/1B.png)'});
$('.container-pochette .pochette2 .front').css({'background-image':'url('+themeImg+'/box/2F.png)'});
$('.container-pochette .pochette2 .back').css({'background-image':'url('+themeImg+'/box/2B.png)'});
$('.container-pochette .pochette3 .front').css({'background-image':'url('+themeImg+'/box/3F.png)'});
$('.container-pochette .pochette3 .back').css({'background-image':'url('+themeImg+'/box/3B.png)'});
$('.container-pochette .pochette4 .front').css({'background-image':'url('+themeImg+'/box/4F.png)'});
$('.container-pochette .pochette4 .back').css({'background-image':'url('+themeImg+'/box/4B.png)'});
// Faces chocos identiques
if(theme == "chocolate" || theme == "cinema" || theme == "oriental" || theme == "champetre") {
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front");
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back");
}
// Faces chocos différentes
else {
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
}
// Specific theme
if(theme == "fleurs" || theme == "tendance" || theme == "uv" || theme == "voyage" || theme == "vintage"
|| theme == "gourmandise" || theme == "dentellechic" || theme == "enfantin" || theme == "liberty") {
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco5 .front");
}
switch(theme) {
case "ivoire":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "fleurs":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "dentellechic":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "enfantin":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "liberty":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "oriental":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "uv":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "vintage":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "voyage":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "tendance":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
case "champetre":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front");
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back");
break;
case "cinema":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front");
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back");
break;
case "chocolate":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front");
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back");
break;
case "gourmandise":
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front");
break;
}
$(".chocos-holder .choco2").addClass('switch');
$(".chocos-holder .choco4").addClass('switch');
//pochette
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .pochette1 .front")
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .pochette4 .front")
$('#custom_elmts .date-holder').clone().appendTo(".container-pochette .pochette2 .front")
// Pochette
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .pochette1 .front");
$('#custom_elmts .noms-holder').clone().appendTo(".container-pochette .pochette4 .front");
$('#custom_elmts .date-holder').clone().appendTo(".container-pochette .pochette2 .front");
$(".container-pochette .pochette2").addClass('switch')
$(".container-pochette .pochette4").addClass('switch')