summaryrefslogtreecommitdiff
path: root/inc/builder/type/header/edd-cart/assets
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
committerZach van Rijn <me@zv.io>2021-07-21 14:54:07 -0500
commit9d4123cee1867ee7199b06bdc92d40611f547ecc (patch)
tree6d864e2725242863afed1f8ba12d9c7a9bc63a69 /inc/builder/type/header/edd-cart/assets
downloadblog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.gz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.bz2
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.tar.xz
blog-ng-9d4123cee1867ee7199b06bdc92d40611f547ecc.zip
Initial unmodified import from Astra (Version: 3.6.5) @ /wp-content/themes/astra/.
Diffstat (limited to 'inc/builder/type/header/edd-cart/assets')
-rw-r--r--inc/builder/type/header/edd-cart/assets/js/minified/customizer-preview.min.js1
-rw-r--r--inc/builder/type/header/edd-cart/assets/js/unminified/customizer-preview.js161
2 files changed, 162 insertions, 0 deletions
diff --git a/inc/builder/type/header/edd-cart/assets/js/minified/customizer-preview.min.js b/inc/builder/type/header/edd-cart/assets/js/minified/customizer-preview.min.js
new file mode 100644
index 0000000..c764121
--- /dev/null
+++ b/inc/builder/type/header/edd-cart/assets/js/minified/customizer-preview.min.js
@@ -0,0 +1 @@
+!function(t){var e=".ast-edd-site-header-cart",d=".astra-cart-drawer.edd-active";astra_css("astra-settings[edd-header-cart-icon-color]","color",e+" .ast-edd-cart-menu-wrap .count, "+e+" .ast-edd-cart-menu-wrap .count:after,"+e+" .ast-edd-header-cart-info-wrap"),astra_css("astra-settings[edd-header-cart-icon-color]","border-color",e+" .ast-edd-cart-menu-wrap .count, "+e+" .ast-edd-cart-menu-wrap .count:after"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-cart-text-color]","color",e+" .widget_edd_cart_widget span, "+e+" .widget_edd_cart_widget strong, "+e+" .widget_edd_cart_widget *, "+d+" .widget_edd_cart_widget span, .astra-cart-drawer .widget_edd_cart_widget *, "+d+" .astra-cart-drawer-title"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-cart-link-color]","color",e+" .widget_edd_cart_widget a, "+e+" .widget_edd_cart_widget a.edd-remove-from-cart, "+e+" .widget_edd_cart_widget .cart-total, "+e+" .widget_edd_cart_widget a.edd-remove-from-cart:after, "+d+" .widget_edd_cart_widget a, "+d+" .widget_edd_cart_widget a.edd-remove-from-cart, "+d+" .widget_edd_cart_widget .cart-total, "+d+" .widget_edd_cart_widget a.edd-remove-from-cart:after"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-cart-link-color]","border-color",e+" .widget_edd_cart_widget a.edd-remove-from-cart:after,"+d+" .widget_edd_cart_widget a.edd-remove-from-cart:after,"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-cart-background-color]","background-color",".ast-builder-layout-element "+e+" .widget_edd_cart_widget ,"+d+", "+d+"#astra-mobile-cart-drawer"),astra_color_responsive_css("edd-cart-border-color","astra-settings[header-edd-cart-background-color]","border-color",".ast-builder-layout-element "+e+" .widget_edd_cart_widget, "+d+" .widget_edd_cart_widget"),astra_color_responsive_css("edd-cart-border-bottom-color","astra-settings[header-edd-cart-background-color]","border-bottom-color",".ast-builder-layout-element "+e+" .widget_edd_cart_widget:before, .ast-builder-layout-element "+e+" .widget_edd_cart_widget:after, "+d+" .widget_edd_cart_widget:before, "+d+" .widget_edd_cart_widget:after"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-cart-separator-color]","border-bottom-color",".ast-builder-layout-element "+e+" .widget_edd_cart_widget .edd-cart-item, .ast-builder-layout-element "+e+" .widget_edd_cart_widget .edd-cart-number-of-items, .ast-builder-layout-element "+e+" .widget_edd_cart_widget .edd-cart-meta,"+d+" .widget_edd_cart_widget .edd-cart-item, "+d+" .widget_edd_cart_widget .edd-cart-number-of-items, "+d+" .widget_edd_cart_widget .edd-cart-meta, "+d+" .astra-cart-drawer-header"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-checkout-btn-text-color]","color",e+" .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a, "+d+" .widget_edd_cart_widget .edd_checkout a"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-checkout-btn-background-color]","background-color",e+" .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a,"+d+" .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a"),astra_color_responsive_css("edd-cart-border-color","astra-settings[header-edd-checkout-btn-background-color]","border-color",e+" .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a,"+d+" .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-checkout-btn-text-hover-color]","color",e+" .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover,"+d+" .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover"),astra_color_responsive_css("edd-cart-colors","astra-settings[header-edd-checkout-btn-bg-hover-color]","background-color",e+" .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover, "+d+" .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover"),wp.customize("astra-settings[edd-header-cart-icon-style]",function(e){e.bind(function(e){var d=t(document).find(".ast-edd-site-header-cart");d.removeClass("ast-edd-menu-cart-fill ast-edd-menu-cart-outline"),d.addClass("ast-edd-menu-cart-"+e);astra_add_dynamic_css("edd-header-cart-icon-style",".ast-edd-site-header-cart a, .ast-edd-site-header-cart a *{ transition: all 0s; } "),wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[edd-header-cart-icon-color]",function(e){e.bind(function(e){wp.customize.preview.send("refresh")})}),wp.customize("astra-settings[edd-header-cart-icon-radius]",function(e){e.bind(function(e){e=".ast-edd-site-header-cart.ast-edd-menu-cart-outline .ast-addon-cart-wrap, .ast-edd-site-header-cart.ast-edd-menu-cart-fill .ast-addon-cart-wrap, .ast-edd-site-header-cart.ast-edd-menu-cart-outline .count, .ast-edd-site-header-cart.ast-edd-menu-cart-fill .count{ border-radius: "+parseInt(e)+"px } ";astra_add_dynamic_css("edd-header-cart-icon-radius",e)})}),wp.customize("astra-settings[transparent-header-edd-cart-icon-color]",function(e){e.bind(function(e){wp.customize.preview.send("refresh")})}),astra_builder_visibility_css("section-header-edd-cart",".ast-header-edd-cart")}(jQuery); \ No newline at end of file
diff --git a/inc/builder/type/header/edd-cart/assets/js/unminified/customizer-preview.js b/inc/builder/type/header/edd-cart/assets/js/unminified/customizer-preview.js
new file mode 100644
index 0000000..87f8cf0
--- /dev/null
+++ b/inc/builder/type/header/edd-cart/assets/js/unminified/customizer-preview.js
@@ -0,0 +1,161 @@
+/**
+ * This file adds some LIVE to the Customizer live preview. To leverage
+ * this, set your custom settings to 'postMessage' and then add your handling
+ * here. Your javascript should grab settings from customizer controls, and
+ * then make any necessary changes to the page using jQuery.
+ *
+ * @package Astra
+ * @since x.x.x
+ */
+
+( function( $ ) {
+
+ var selector = '.ast-edd-site-header-cart';
+ var responsive_selector = '.astra-cart-drawer.edd-active';
+
+ // Icon Color.
+ astra_css(
+ 'astra-settings[edd-header-cart-icon-color]',
+ 'color',
+ selector + ' .ast-edd-cart-menu-wrap .count, ' + selector + ' .ast-edd-cart-menu-wrap .count:after,' + selector + ' .ast-edd-header-cart-info-wrap'
+ );
+
+ // Icon Color.
+ astra_css(
+ 'astra-settings[edd-header-cart-icon-color]',
+ 'border-color',
+ selector + ' .ast-edd-cart-menu-wrap .count, ' + selector + ' .ast-edd-cart-menu-wrap .count:after'
+ );
+
+ // EDD Cart Colors.
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-cart-text-color]',
+ 'color',
+ selector + ' .widget_edd_cart_widget span, ' + selector + ' .widget_edd_cart_widget strong, ' + selector + ' .widget_edd_cart_widget *, ' + responsive_selector + ' .widget_edd_cart_widget span, .astra-cart-drawer .widget_edd_cart_widget *, ' + responsive_selector + ' .astra-cart-drawer-title'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-cart-link-color]',
+ 'color',
+ selector + ' .widget_edd_cart_widget a, ' + selector + ' .widget_edd_cart_widget a.edd-remove-from-cart, ' + selector + ' .widget_edd_cart_widget .cart-total, ' + selector + ' .widget_edd_cart_widget a.edd-remove-from-cart:after, '+ responsive_selector + ' .widget_edd_cart_widget a, ' + responsive_selector + ' .widget_edd_cart_widget a.edd-remove-from-cart, ' + responsive_selector + ' .widget_edd_cart_widget .cart-total, ' + responsive_selector + ' .widget_edd_cart_widget a.edd-remove-from-cart:after'
+ );
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-cart-link-color]',
+ 'border-color',
+ selector + ' .widget_edd_cart_widget a.edd-remove-from-cart:after,' + responsive_selector + ' .widget_edd_cart_widget a.edd-remove-from-cart:after,'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-cart-background-color]',
+ 'background-color',
+ '.ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget ,' + responsive_selector + ', ' + responsive_selector + '#astra-mobile-cart-drawer'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-border-color',
+ 'astra-settings[header-edd-cart-background-color]',
+ 'border-color',
+ '.ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget, ' + responsive_selector + ' .widget_edd_cart_widget'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-border-bottom-color',
+ 'astra-settings[header-edd-cart-background-color]',
+ 'border-bottom-color',
+ '.ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget:before, .ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget:after, ' + responsive_selector + ' .widget_edd_cart_widget:before, ' + responsive_selector + ' .widget_edd_cart_widget:after'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-cart-separator-color]',
+ 'border-bottom-color',
+ '.ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget .edd-cart-item, .ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget .edd-cart-number-of-items, .ast-builder-layout-element ' + selector + ' .widget_edd_cart_widget .edd-cart-meta,'+ responsive_selector + ' .widget_edd_cart_widget .edd-cart-item, ' + responsive_selector + ' .widget_edd_cart_widget .edd-cart-number-of-items, ' + responsive_selector + ' .widget_edd_cart_widget .edd-cart-meta, ' + responsive_selector + ' .astra-cart-drawer-header'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-checkout-btn-text-color]',
+ 'color',
+ selector + ' .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a, '+ responsive_selector + ' .widget_edd_cart_widget .edd_checkout a'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-checkout-btn-background-color]',
+ 'background-color',
+ selector + ' .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a,' + responsive_selector + ' .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-border-color',
+ 'astra-settings[header-edd-checkout-btn-background-color]',
+ 'border-color',
+ selector + ' .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a,' + responsive_selector + ' .widget_edd_cart_widget .edd_checkout a, .widget_edd_cart_widget .edd_checkout a'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-checkout-btn-text-hover-color]',
+ 'color',
+ selector +' .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover,' + responsive_selector +' .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover'
+ );
+
+ astra_color_responsive_css(
+ 'edd-cart-colors',
+ 'astra-settings[header-edd-checkout-btn-bg-hover-color]',
+ 'background-color',
+ selector +' .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover, ' + responsive_selector + ' .widget_edd_cart_widget .edd_checkout a:hover, .widget_edd_cart_widget .edd_checkout a:hover'
+ );
+
+ /**
+ * Cart icon style
+ */
+ wp.customize( 'astra-settings[edd-header-cart-icon-style]', function( setting ) {
+ setting.bind( function( icon_style ) {
+ var buttons = $(document).find('.ast-edd-site-header-cart');
+ buttons.removeClass('ast-edd-menu-cart-fill ast-edd-menu-cart-outline');
+ buttons.addClass( 'ast-edd-menu-cart-' + icon_style );
+ var dynamicStyle = '.ast-edd-site-header-cart a, .ast-edd-site-header-cart a *{ transition: all 0s; } ';
+ astra_add_dynamic_css( 'edd-header-cart-icon-style', dynamicStyle );
+ wp.customize.preview.send( 'refresh' );
+ } );
+ } );
+
+ /**
+ * EDD Cart Button Color
+ */
+ wp.customize( 'astra-settings[edd-header-cart-icon-color]', function( setting ) {
+ setting.bind( function( cart_icon_color ) {
+ wp.customize.preview.send( 'refresh' );
+ });
+ });
+
+ /**
+ * Button Border Radius
+ */
+ wp.customize( 'astra-settings[edd-header-cart-icon-radius]', function( setting ) {
+ setting.bind( function( border ) {
+
+ var dynamicStyle = '.ast-edd-site-header-cart.ast-edd-menu-cart-outline .ast-addon-cart-wrap, .ast-edd-site-header-cart.ast-edd-menu-cart-fill .ast-addon-cart-wrap, .ast-edd-site-header-cart.ast-edd-menu-cart-outline .count, .ast-edd-site-header-cart.ast-edd-menu-cart-fill .count{ border-radius: ' + ( parseInt( border ) ) + 'px } ';
+ astra_add_dynamic_css( 'edd-header-cart-icon-radius', dynamicStyle );
+
+ } );
+ } );
+
+ /**
+ * Transparent Header EDD-Cart color options - Customizer preview CSS.
+ */
+ wp.customize( 'astra-settings[transparent-header-edd-cart-icon-color]', function( setting ) {
+ setting.bind( function( cart_icon_color ) {
+ wp.customize.preview.send( 'refresh' );
+ });
+ });
+
+ // Advanced Visibility CSS Generation.
+ astra_builder_visibility_css( 'section-header-edd-cart', '.ast-header-edd-cart' );
+
+} )( jQuery );