summaryrefslogtreecommitdiff
path: root/inc/builder/type/footer/copyright/assets/js
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/footer/copyright/assets/js
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/footer/copyright/assets/js')
-rw-r--r--inc/builder/type/footer/copyright/assets/js/minified/customizer-preview.min.js1
-rw-r--r--inc/builder/type/footer/copyright/assets/js/unminified/customizer-preview.js98
2 files changed, 99 insertions, 0 deletions
diff --git a/inc/builder/type/footer/copyright/assets/js/minified/customizer-preview.min.js b/inc/builder/type/footer/copyright/assets/js/minified/customizer-preview.min.js
new file mode 100644
index 0000000..8d1e5a6
--- /dev/null
+++ b/inc/builder/type/footer/copyright/assets/js/minified/customizer-preview.min.js
@@ -0,0 +1 @@
+!function(){var i=".ast-footer-copyright",e=astraBuilderPreview.tablet_break_point||768,a=astraBuilderPreview.mobile_break_point||544;astra_css("astra-settings[footer-copyright-color]","color",i),astra_responsive_font_size("astra-settings[font-size-section-footer-copyright]",i),wp.customize("astra-settings[footer-copyright-alignment]",function(t){t.bind(function(t){var o;""==t.desktop&&""==t.tablet&&""==t.mobile||(o="",o+=".ast-footer-copyright {",o+="text-align: "+t.desktop+";",o+="} ",o+="@media (max-width: "+e+"px) {",o+=".ast-footer-copyright {",o+="text-align: "+t.tablet+";",o+="} ",o+="} ",o+="@media (max-width: "+a+"px) {",o+=".ast-footer-copyright {",o+="text-align: "+t.mobile+";",o+="} ",o+="} ",astra_add_dynamic_css("footer-copyright-alignment",o))})}),wp.customize("astra-settings[section-footer-copyright-margin]",function(t){t.bind(function(t){var o;""==t.desktop.bottom&&""==t.desktop.top&&""==t.desktop.left&&""==t.desktop.right&&""==t.tablet.bottom&&""==t.tablet.top&&""==t.tablet.left&&""==t.tablet.right&&""==t.mobile.bottom&&""==t.mobile.top&&""==t.mobile.left&&""==t.mobile.right||(o="",o+=i+" {",o+="margin-left: "+t.desktop.left+t["desktop-unit"]+";",o+="margin-right: "+t.desktop.right+t["desktop-unit"]+";",o+="margin-top: "+t.desktop.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.desktop.bottom+t["desktop-unit"]+";",o+="} ",o+="@media (max-width: "+e+"px) {",o+=i+" {",o+="margin-left: "+t.tablet.left+t["tablet-unit"]+";",o+="margin-right: "+t.tablet.right+t["tablet-unit"]+";",o+="margin-top: "+t.tablet.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.tablet.bottom+t["desktop-unit"]+";",o+="} ",o+="} ",o+="@media (max-width: "+a+"px) {",o+=i+" {",o+="margin-left: "+t.mobile.left+t["mobile-unit"]+";",o+="margin-right: "+t.mobile.right+t["mobile-unit"]+";",o+="margin-top: "+t.mobile.top+t["desktop-unit"]+";",o+="margin-bottom: "+t.mobile.bottom+t["desktop-unit"]+";",o+="} ",o+="} ",astra_add_dynamic_css("footer-copyright-margin",o))})}),astra_builder_visibility_css("section-footer-copyright",".ast-footer-copyright.ast-builder-layout-element")}(jQuery); \ No newline at end of file
diff --git a/inc/builder/type/footer/copyright/assets/js/unminified/customizer-preview.js b/inc/builder/type/footer/copyright/assets/js/unminified/customizer-preview.js
new file mode 100644
index 0000000..4a70418
--- /dev/null
+++ b/inc/builder/type/footer/copyright/assets/js/unminified/customizer-preview.js
@@ -0,0 +1,98 @@
+/**
+ * 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 Builder
+ * @since 3.0.0
+ */
+
+( function( $ ) {
+
+ var selector = '.ast-footer-copyright';
+ var visibility_selector = '.ast-footer-copyright.ast-builder-layout-element';
+
+ var tablet_break_point = astraBuilderPreview.tablet_break_point || 768,
+ mobile_break_point = astraBuilderPreview.mobile_break_point || 544;
+
+ // HTML color.
+ astra_css(
+ 'astra-settings[footer-copyright-color]',
+ 'color',
+ selector
+ );
+
+ // Typography CSS Generation.
+ astra_responsive_font_size(
+ 'astra-settings[font-size-section-footer-copyright]',
+ selector
+ );
+
+ wp.customize( 'astra-settings[footer-copyright-alignment]', function( value ) {
+ value.bind( function( alignment ) {
+ if( alignment.desktop != '' || alignment.tablet != '' || alignment.mobile != '' ) {
+ var dynamicStyle = '';
+ dynamicStyle += '.ast-footer-copyright {';
+ dynamicStyle += 'text-align: ' + alignment['desktop'] + ';';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {';
+ dynamicStyle += '.ast-footer-copyright {';
+ dynamicStyle += 'text-align: ' + alignment['tablet'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {';
+ dynamicStyle += '.ast-footer-copyright {';
+ dynamicStyle += 'text-align: ' + alignment['mobile'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+
+ astra_add_dynamic_css( 'footer-copyright-alignment', dynamicStyle );
+ }
+ } );
+ } );
+
+ // Margin.
+ wp.customize( 'astra-settings[section-footer-copyright-margin]', function( value ) {
+ value.bind( function( margin ) {
+ if(
+ margin.desktop.bottom != '' || margin.desktop.top != '' || margin.desktop.left != '' || margin.desktop.right != '' ||
+ margin.tablet.bottom != '' || margin.tablet.top != '' || margin.tablet.left != '' || margin.tablet.right != '' ||
+ margin.mobile.bottom != '' || margin.mobile.top != '' || margin.mobile.left != '' || margin.mobile.right != ''
+ ) {
+ var dynamicStyle = '';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['desktop']['left'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['desktop']['right'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['desktop']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['desktop']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + tablet_break_point + 'px) {';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['tablet']['left'] + margin['tablet-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['tablet']['right'] + margin['tablet-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['tablet']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['tablet']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+
+ dynamicStyle += '@media (max-width: ' + mobile_break_point + 'px) {';
+ dynamicStyle += selector + ' {';
+ dynamicStyle += 'margin-left: ' + margin['mobile']['left'] + margin['mobile-unit'] + ';';
+ dynamicStyle += 'margin-right: ' + margin['mobile']['right'] + margin['mobile-unit'] + ';';
+ dynamicStyle += 'margin-top: ' + margin['mobile']['top'] + margin['desktop-unit'] + ';';
+ dynamicStyle += 'margin-bottom: ' + margin['mobile']['bottom'] + margin['desktop-unit'] + ';';
+ dynamicStyle += '} ';
+ dynamicStyle += '} ';
+ astra_add_dynamic_css( 'footer-copyright-margin', dynamicStyle );
+ }
+ } );
+ } );
+
+ // Advanced Visibility CSS Generation.
+ astra_builder_visibility_css( 'section-footer-copyright', visibility_selector );
+
+} )( jQuery );