From a2d2592c34cad5554863b3f347a60a4c0cdcfebb Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 24 Nov 2021 17:38:20 +0000 Subject: [PATCH] wip #4899 @1.5 --- .../html5/master/class.ws.html5.compiler.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index e093785d5..3beebec1f 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -618,6 +618,25 @@ class wsHTML5Compiler public function writeJoueClub2021Cart() { $this->lessVariables['import-cart-styles'] = 'joueclub2021'; + $extra = wsHTML5Link::parseExtras($this->book->parametres->cartExtraSettings, true); + + /** + * buttonColor=#d7b646 + * buttonTextColor=#ffffff + * headerBackgroundColor=#0e1a3c + * headerTextColor=#ffffff + */ + $this->lessVariables['cart-button-color'] = $extra['buttoncolor'] ?? '#e30613'; + $this->lessVariables['cart-button-text-color'] = $extra['buttontextcolor'] ?? '#ffffff'; + $this->lessVariables['cart-button-radius'] = $extra['buttonradius'] ?? '50%'; + $this->lessVariables['cart-header-background-color'] = $extra['headerbackgroundcolor'] ?? '#26348b'; + $this->lessVariables['cart-header-text-color'] = $extra['headertextcolor'] ?? '#ffffff'; + $this->lessVariables['cart-close-color'] = $extra['closecolor'] ?? '#ffffff'; + $this->lessVariables['cart-close-background-color'] = $extra['closebackgroundcolor'] ?? '#e30613'; + $this->lessVariables['cart-close-radius'] = $extra['closeradius'] ?? '50%'; + $this->lessVariables['cart-actions-radius'] = $extra['actionsradius'] ?? '8px'; + $this->lessVariables['cart-actions-background-color'] = $extra['actionsbackgroundcolor'] ?? '#26348b'; + $this->lessVariables['cart-actions-text-color'] = $extra['actionstextcolor'] ?? '#ffffff'; $this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js'); $this->addJsLib('joueclub2021', 'js/libs/fluidbook/cart/fluidbook.cart.joueclub2021.js'); @@ -635,6 +654,14 @@ class wsHTML5Compiler } $this->vdir->copy($dest, 'data/commerce/' . $ref . '.jpg'); } + $addFiles = [$this->config->cartHeaderImage, $this->config->cartHeaderMobileImage]; + foreach ($addFiles as $f) { + if (!$f) { + return; + } + + $this->vdir->copy($cdir . $f, 'data/commerce/' . $f); + } wsLinks::getLinksAndRulersFromFile($this->book_id, $links, $rulers); } -- 2.39.5