doublecube-bicolor - chocos images

This commit is contained in:
Michael RICOIS 2017-08-10 17:26:25 +02:00
parent 6be540f5d1
commit f8450ea528

View File

@ -73,18 +73,14 @@ function initFaces()
if(theme == "damier")
{
$('#custom-freeface').show()
$(".container-db").html($('#temp-base .doublecube').contents().clone());
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$('.container-db .cubeface').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$('.chocos-holder .flipper .front').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$('.chocos-holder .flipper .back').html('<div class="colorface color_1"></div><div class="colorface color_2"></div>')
$(".color_1").addClass(color1)
$(".color_2").addClass(color2)
$('.switch').removeClass('switch');
$(".container-db .db-cube1 .back .color_2").addClass('face-custom-img');
$(".container-db .db-cube1 .back .color_1").addClass('face-custom-txt');
@ -111,29 +107,29 @@ function initFaces()
$('.container-db .db-cube2 .right .color_1.'+color1).css({'background-image' : 'url('+themeImg+'/box/'+color1+'/face_12.png)'});
$('.container-db').addClass(theme);
// Chocos
var color = (color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2;
$('.chocos-holder .choco1 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_13.png)'});
$('.chocos-holder .choco1 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_14.png)'});
$('.chocos-holder .choco1 .front .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_15.png)'});
$('.chocos-holder .choco2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_16.png)'});
$('.chocos-holder .choco3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_17.png)'});
$('.chocos-holder .choco3 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_18.png)'});
$('.chocos-holder .choco4 .front .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_19.png)'});
$('.chocos-holder .choco4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/face_20.png)'});
$('.chocos-holder .choco5 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_21.png)'});
$('.chocos-holder .choco5 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/face_22.png)'});
$('.chocos-holder .choco1 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/1F.png)'});
$('.chocos-holder .choco1 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/1B.png)'});
$('.chocos-holder .choco1 .front .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/2F.png)'});
$('.chocos-holder .choco2 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/2B.png)'});
$('.chocos-holder .choco3 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/3F.png)'});
$('.chocos-holder .choco3 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/3B.png)'});
$('.chocos-holder .choco4 .front .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/4F.png)'});
$('.chocos-holder .choco4 .back .color_1').css({'background-image':'url('+themeImg+'/chocos/'+color1+'/4B.png)'});
$('.chocos-holder .choco5 .front .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/5F.png)'});
$('.chocos-holder .choco5 .back .color_2').css({'background-image':'url('+themeImg+'/chocos/'+color+'/5B.png)'});
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco1 .front .color_2");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front .color_1");
$('#custom_elmts .date-holder').clone().appendTo(".chocos-holder .choco2 .front .color_1");
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .choco4 .front .color_1");
$(".chocos-holder .choco2").addClass('switch');
$(".chocos-holder .choco4").addClass('switch');
$('.damier .color_1').css({ 'background-color':colorRGB[color1]})
$('.damier .color_2').css({ 'color':colorRGB[color2]})
$('.damier .switch .color_1').css({ 'color':colorRGB[color1]})
$('.damier .switch .color_2').css({'background-color':colorRGB[color2]})
$('.chocos-holder').addClass(theme);
$('.chocos-holder .color_1').css({ 'background-color':colorRGB[color1]});
$('.chocos-holder .color_2').css({ 'color':colorRGB[color2]});
$('.chocos-holder .switch .color_1').css({ 'color':colorRGB[color1]});
$('.chocos-holder .switch .color_2').css({'background-color':colorRGB[color2]});
}
else if(theme == "ruban")
{
@ -155,14 +151,13 @@ function initFaces()
$('#custom-freeface').show()
$(".container-db").html($('#temp-base .doublecube').contents().clone());
$('.container-db .cubeface').html($('#temp-bayadere .bayaface').clone());
$(".container-db .db-cube1 .back").append('<div class="face-custom-txt face-custom-img"></div>');
$(".chocos-holder").html($('#temp-base .chocos').contents().clone());
$('.container-db .cubeface').html($('#temp-bayadere .bayaface').clone())
$('.chocos-holder .flipper .front').html($('#temp-bayadere .bayaface').clone())
$('.chocos-holder .flipper .back').html($('#temp-bayadere .bayaface').clone())
$(".container-db .db-cube1 .back").append('<div class="face-custom-txt face-custom-img"></div>')
$('.bayaface .col1').addClass('b-'+color1)
$('.bayaface .col2').addClass('b-'+color2)
$('.bayaface .col3').addClass('b-'+color1)
@ -170,12 +165,10 @@ function initFaces()
// DC
$('#custom_elmts .noms-holder').clone().appendTo(".container-db .db-cube1 .front")
$('#custom_elmts .date-holder').clone().appendTo(".container-db .db-cube2 .front")
$('#custom_elmts .date-holder').clone().appendTo(".container-db .db-cube2 .front")
$('.container-db .db-cube1 .right').css({'background-image' : 'url('+themeImg+'/box/face_6.png)'});
$('.container-db .db-cube2 .left').css({'background-image' : 'url('+themeImg+'/box/face_11.png)'});
$('.container-db .db-cube2 .back').css({'background-image' : 'url('+themeImg+'/box/face_10.png)'});
$('.container-db .db-cube2 .back').css({'background-image' : 'url('+themeImg+'/box/face_10.png)'});
$('.container-db .db-cube1 .right').append('<div class="coeur"></div>');
$('.container-db .db-cube2 .left').append('<div class="coeur"></div>');
$('.container-db .db-cube2 .back').append('<div class="oui"></div>');
@ -183,7 +176,7 @@ function initFaces()
// Chocos
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front")
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back")
$('.chocos-holder .back .colover').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/face_14.png)'})
$('.chocos-holder .back .colover').css({'background-image':'url('+themeImg+'/chocos/'+color2+'/1B.png)'})
}
else if(theme == "liseres")
{
@ -237,7 +230,7 @@ function initFaces()
$('.container-db .db-cube2 .right .imgface.'+color).css({'background-image' : 'url('+themeImg+'/box/'+file+'/face_12.png)'})
// Chocos
$('.chocos-holder.'+theme+' .back .bkgface').css({'background-image':'url('+themeImg+'/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/face_14.png)'})
$('.chocos-holder.'+theme+' .back .bkgface').css({'background-image':'url('+themeImg+'/chocos/'+(color1 == "blanc" || color1 == "ivoire") ? 'noir' : color2+'/1B.png)'})
$('#custom_elmts .noms-holder').clone().appendTo(".chocos-holder .front .txtface")
$('#custom_elmts .date-holder-line').clone().appendTo(".chocos-holder .back .txtface")
$('.chocos-holder .bkgface').addClass('b-'+color1)