File Editor
Directories:
.. (Back)
ext
Files:
scripts.min.js
theme-customizer-controls.js
theme-customizer.js
Create New File
Create
Edit File: theme-customizer.js
!function(e){var t={};function a(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)a.d(o,n,function(t){return e[t]}.bind(null,n));return o},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=11)}({11:function(e,t){function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(e,t,o){var n,i,r;function c(e){return e=(e+"").replace(/[^a-f0-9]/gi,""),parseInt(e,16)}function s(e){var t;return e<0&&(e=4294967295+e+1),1===(t=parseInt(e,10).toString(16)).length&&(t="0"+t),t}var l={},d=function(e){if("no"===o.is_custom_post_type)return e;var t=e.split(","),a="";return _.forEach(t,(function(e){a+=o.css_selector_wrapper+" "+e})),a.join(",")};function u(t){e("#extra-dynamic-styles-boxed_layout_background_color").remove(),e('<style type="text/css" id="extra-dynamic-styles-boxed_layout_background_color"> #page-container { background-color: '+t+"; } </style>").appendTo(e("head"))}function p(t,a){var o=e("#"+t);o.remove(),void 0!==a&&(o=e('<style type="text/css" id="'+t+'">\n'+a+"</style>").appendTo(e("head")))}function f(e,t,a){var o;if(void 0!==t)return(o=void 0!==a?a+": "+t+";":t).length>0?e+" {\n\t"+o+"\n} \n\n":void 0}function m(){var t=e("#top-header"),a=t.find(".et-top-search"),o=e("#et-navigation .menu-item.et-top-search-primary-menu-item"),n=e("#et-navigation .menu-item.et-cart-info-primary-menu-item"),i=wp.customize.value("et_extra[show_header_search]")(),r=wp.customize.value("et_extra[show_header_social_icons]")(),c=wp.customize.value("et_extra[show_header_trending]")(),s=!!wp.customize.has("et_extra[show_header_cart_total]")&&wp.customize.value("et_extra[show_header_cart_total]")(),l=parseInt(wp.customize.value("nav_menu_locations[secondary-menu]")());s&&i||r||c||0!==l?(t.show(),n.hide(),o.hide(),i?a.show():a.hide()):(t.hide(),i?(o.show(),n.hide()):s?(n.show(),o.hide()):(n.hide(),o.hide()))}i={extra_sidebar_width_css_value:function(e,t,a){var o=a,n=100-o;return"@media only screen and (min-width: 1025px) {.with_sidebar"+d(".et_pb_extra_column_sidebar")+"{\tmin-width: "+o+"%;\tmax-width: "+o+"%;\twidth: "+o+"%;\tflex-basis: "+o+"%;}.with_sidebar"+d(".et_pb_extra_column_main")+"{\tmin-width: "+n+"%;\tmax-width: "+n+"%;\twidth: "+n+"%;\tflex-basis: "+n+"%;}}"},extra_gutter_width_css_value:function(e,t,a){var o=a;return d(".et_pb_container")+"{ \tpadding: 0 "+o+"px;}"+d(".et_pb_row")+"{\tmargin: 0 - "+o/2+"px;}"+d(".et_pb_column")+"{\tpadding: 0 "+o/2+"px;}"},extra_et_print_font_style_css_value:function(e,t,a,o){var n=void 0!==o.default&&o.default,i=void 0===o.boldness?"bold":o.boldness;return void 0===a||n===a?"":function(e,t,a){var o="";if(void 0!==e&&!1!==e){var n=e.split("|");t=void 0!==t&&t.length>0?" "+t:"",void 0===a&&(a="bold"),o=-1!==n.indexOf("bold")?o+"font-weight: "+a+t+"; ":o+"font-weight: normal"+t+"; ",o=-1!==n.indexOf("italic")?o+"font-style: italic"+t+"; ":o+"font-style: normal"+t+"; ",o=-1!==n.indexOf("uppercase")?o+"text-transform: uppercase"+t+"; ":o+"text-transform: none"+t+"; ",o=-1!==n.indexOf("underline")?o+"text-decoration: underline"+t+"; ":o+"text-decoration: none"+t+"; "}return o}(a,!1,i)},et_pb_module_tabs_padding_css_value:function(e,t,a){var o=.133333333*parseInt(a),n=o+1,i=o-1,r=.8*parseInt(a);return i<0&&(i=0),d(".et_pb_tabs_controls li")+"{ padding: "+n+"px "+a+"px "+i+"px; } "+d(".et_pb_tabs_controls li.et_pb_tab_active")+"{ padding: "+o+"px "+a+"px; } "+d(".et_pb_all_tabs")+"{ padding: "+r+"px "+a+"px ; }"},et_pb_module_slider_padding_css_value:function(e,t,a){return"padding-top: "+a+"%; padding-bottom: "+a+"%;"},et_pb_module_cta_padding_css_value:function(e,t,a){return a=parseInt(a),d(".et_pb_promo")+"{ padding: "+a+"px "+1.5*a+"px; }"+d(".et_pb_column_1_2 .et_pb_promo, .et_pb_column_1_3 .et_pb_promo, .et_pb_column_1_4 .et_pb_promo")+"{ padding: "+a+"px; }"},et_pb_social_media_follow_font_size_css_value:function(e,t,a){var o=.57*parseInt(a),n=2*parseInt(a);return d(".et_pb_social_media_follow li a.icon")+"{ margin-right: "+o+"px; width: "+n+"px; height: "+n+"px; }"+d(".et_pb_social_media_follow li a.icon::before")+"{ width: "+n+"px; height: "+n+"px; font-size: "+a+"px; line-height: "+n+"px; }"+d(".et_pb_social_media_follow li a.follow_button")+"{ font-size:"+a+"px; }"},et_extra_secondary_nav_icon_search_cart_font_size_css_value:function(e,t,a){var o=parseInt(a),n=2.5*o;return"#et-info .et-cart,#et-info .et-cart:before,#et-info .et-top-search .et-search-field,#et-info .et-top-search .et-search-submit:before {\tfont-size: "+a+"px}#et-info .et-extra-social-icons .et-extra-icon {\tfont-size: "+Math.floor(o*(16/12))+"px;\tline-height: "+n+"px;\twidth:"+n+"px;\theight: "+n+"px;}#et-info .et-cart,#et-info .et-top-search .et-search-field {\tpadding: "+Math.floor(o*(7/12))+"px "+o*(10/12)+"px;}#et-info .et-top-search .et-search-field {\twidth: "+10*o+"px;}#et-info .et-top-search .et-search-submit:before {\tmargin-top: "+(0-o/2)+"px;}"},et_extra_secondary_nav_trending_font_size_css_value:function(e,t,a){var o=parseInt(a),n=o*(20/14),i=6+(o*(6/14)-6)/2,r=0-i;return"#et-trending-label,.et-trending-post a {\tfont-size: "+o+"px;}#et-trending-button {\twidth: "+n+"px;\theight: "+n+"px;}#et-trending-button span {\twidth: "+n+"px;\theight: "+o*(2/14)+"px;}#et-trending-button.toggled span:first-child {\t-webkit-transform: translateY("+i+"px) rotate(45deg);\ttransform: translateY("+i+"px) rotate(45deg);}#et-trending-button.toggled span:last-child {\t-webkit-transform: translateY("+r+"px) rotate(-45deg);\ttransform: translateY("+r+"px) rotate(-45deg);}"}},r={extra_nav_height_value:function(){var t="",a=void 0!==wp.customize.value("et_extra[primary_nav_hide_logo_image]")()&&wp.customize.value("et_extra[primary_nav_hide_logo_image]")(),o=a?"none":"block",n="centered"===(void 0===wp.customize.value("et_extra[header_style]")()?"left-right":wp.customize.value("et_extra[header_style]")())&&a?".centered":".left-right",i=e("#main-header"),r=i.find(".logo");_.each(["primary","fixed"],(function(o,c){var s=void 0===wp.customize.value("et_extra["+o+"_nav_height]")()?124:parseInt(wp.customize.value("et_extra["+o+"_nav_height]")()),l=void 0===wp.customize.value("et_extra["+o+"_nav_logo_height]")()?51:parseInt(wp.customize.value("et_extra["+o+"_nav_logo_height]")()),_=l/100*s,d=(s-_)/2,u=s/2-(void 0===wp.customize.value("et_extra["+o+"_nav_font_size]")()?16:parseInt(wp.customize.value("et_extra["+o+"_nav_font_size]")()))/2,p="fixed"===o?".et-fixed-header ":"";(t+="@media only screen and (min-width: 768px) {"+p+"#main-header .logo { height: "+_+"px; margin: "+d+"px 0; }"+p+"#logo{ max-width: none }"+p+".header"+n+" #et-navigation > ul > li > a { padding-bottom: "+u+"px; }}","fixed"===o&&(r.attr({"data-fixed-height":l}),i.attr({"data-fixed-height":s})),e("#main-header .etad").length&&(t+="@media only screen and (min-width: 768px) {"+p+"#main-header .etad { max-height: "+_+"px; margin: "+d+"px 0; }}"),a)&&(t+="@media only screen and (min-width: 768px) {"+p+".header"+n+" #et-navigation > ul > li > a { padding-top: "+u+"px; }"+p+".header"+n+" #et-navigation > ul > li > a:before { top: "+(u+10)+"px; }}")}));var c=parseInt(r.attr("data-fixed-height")),s=parseInt(i.attr("data-fixed-height"))*(c/100),l=parseInt(r.attr("data-initial-width"))/parseInt(r.attr("data-initial-height"))*s;return r.attr({"data-fixed-width":l}),t+="#main-header .logo { display: "+o+" !important; }",a&&(t+="@media only screen and (max-width: 1025px) {#et-mobile-navigation .show-menu-button { margin: 20px 0; }}"),t}},wp.customize("background_color",(function(t){t.get();t.bind((function(t){var a;a=t,e("#extra-custom-background-css").remove(),e('<style type="text/css" id="extra-custom-background-css"> body.custom-background { background-color: '+a+"; } </style>").appendTo(e("head"))}))})),wp.customize("et_extra[boxed_layout_background_color]",(function(e){n=e.get(),e.bind((function(e){n=e}))})),wp.customize("et_extra[hide_nav_until_scroll]",(function(e){e.bind((function(e){var t=window.ET_App.FixedNav;e?t.reApplyHideNav():t.detachHideNav()}))})),wp.customize("et_extra[boxed_layout]",(function(a){var o=t("#customize-control-et_extra-boxed_layout_background_color"),i=o.find(".color-picker-hex"),r=t("#customize-control-background_color").find(".color-picker-hex");!1===a.get()&&o.hide(),a.bind((function(t){var a,l,_,d,p;e("#extra-dynamic-styles-boxed_layout_background_color").remove(),t?(e("body").addClass("boxed_layout"),o.show(),a=r.val(),l=(l=25)||-25,6===(a=(a+"").replace(/[^a-f0-9]/gi,"")).length?(_=c(a.substring(0,2)),d=c(a.substring(2,4)),p=c(a.substring(4,6))):3===a.length&&(_=a.substring(0,1),d=a.substring(1,2),p=a.substring(2,3),_=c(_+_),d=c(d+d),p=c(p+p)),_=Math.max(_+l,0),d=Math.max(d+l,0),p=Math.max(p+l,0),n="#"+s(_)+s(d)+s(p),i.wpColorPicker("color",n),i.wpColorPicker("defaultColor",n),u(n)):(e("body").removeClass("boxed_layout"),o.hide(),u("transparent"))}))})),wp.customize("et_extra[header_style]",(function(t){t.bind((function(t){e("#main-header .logo").css({width:""})}))})),wp.customize("show_on_front",(function(e){var a=t("#customize-control-show_on_front_layout");"layout"===e.get()?a.show():a.hide()})),wp.customize("et_extra[show_header_social_icons]",(function(e){e.bind((function(e){m()}))})),wp.customize("et_extra[show_header_search]",(function(e){e.bind((function(e){m()}))})),wp.customize("et_extra[show_header_trending]",(function(e){e.bind((function(e){m()}))})),wp.customize("et_extra[show_header_cart_total]",(function(e){e.bind((function(e){m()}))})),wp.customize("nav_menu_locations[secondary-menu]",(function(e){e.bind((function(e){m()}))})),wp.customize("et_extra[accent_color]",(function(t){t.bind((function(t){e(".no-term-color-module:not(.tabbed-post-module)").css({"border-top-color":t}).find(".module-head h1, .et-accent-color").css({color:t}),e(".tabbed-post-module").each((function(){var a=1,o=e(this);o.find(".tabs li").each((function(){var n=e(this);n.hasClass("no-term-color-tab")&&(n.data("term-color",t),o.find(".tab-content:nth-child("+a+") .et-accent-color").css({color:t}),n.hasClass("active")&&(n.css({color:t}),o.css({"border-top-color":t}))),a++}))}))}))})),e.each(o.social_networks,(function(t){wp.customize("et_extra["+t+"_url]",(function(a){a.bind((function(a){var o=e("#top-header ul.et-extra-social-icons"),n=e("#footer ul.et-extra-social-icons"),i=o.find(".et-extra-social-icon."+t),r=n.find(".et-extra-social-icon."+t);a?(i.length>0?i.find("a").attr("href",a):o.append('<li class="et-extra-social-icon '+t+'"><a href="'+a+'" class="et-extra-icon et-extra-icon-background-hover et-extra-icon-'+t+'"></a></li>'),r.length>0?r.find("a").attr("href",a):n.append('<li class="et-extra-social-icon '+t+'"><a href="'+a+'" class="et-extra-icon et-extra-icon-background-hover et-extra-icon-'+t+'"></a></li>')):(o.find(".et-extra-social-icon."+t).remove(),n.find(".et-extra-social-icon."+t).remove())}))}))})),e.each(o.settings,(function(t,n){wp.customize("et_extra["+t+"]",(function(c){var s=n.value_bind.style,d=n.value_bind.selector,u=e(d);"class_toggle"!==s&&"class_toggle"!==n.value_bind.perform_toggle||c.bind((function(e){var o,i=n.value_bind.class||t,r="",c="before_class_toggle_"+t;if("function"==typeof l[c]&&(0,l[c])(),"_value_bind_to_value"===i)if(void 0!==n.value_bind.format){if(i=n.value_bind.format.replace(/%value%/gi,e),"object"===a(n.choices))for(o in n.choices)r=r+" "+n.value_bind.format.replace(/%value%/gi,o);else if("range"===n.type)for(var s=n.input_attrs.min,_=n.input_attrs.max,d=n.input_attrs.step,p=s;p<=_;p+=d)r=r+" "+n.value_bind.format.replace(/%value%/gi,p)}else if(i=e,"object"===a(n.choices))for(o in n.choices)r=r+" "+o;e?(u.removeClass(u.data("class_toggle_"+t)),u.removeClass(r),u.addClass(i),u.data("clazss_toggle_"+t,i)):u.removeClass(i)})),"el_toggle"===s&&c.bind((function(e){e?u.show():u.hide()})),"el_toggle_reverse"===s&&c.bind((function(e){e?u.hide():u.show()})),"dynamic_selectors_shared_paramless_callback"===s&&c.bind((function(a){e.each(n.value_bind.property_selectors,(function(a,i){var c,l="extra-dynamic-styles-"+n.value_bind.value_format_callback,d=function(e){p(l,e)};if("function"==typeof r[n.value_bind.value_format_callback])c=(0,r[n.value_bind.value_format_callback])(),d(c);else{var u={};_.each(wp.customize._value,(function(e,t){u[t]=wp.customize.value(t)()})),e.ajax({type:"POST",url:o.ajaxurl,data:{action:"extra_customizer_value_formatted_property_selector",extra_customizer_nonce:o.extra_customizer_nonce,unformatted_value:JSON.stringify(u),setting_name:t,property:a,callback:n.value_bind.value_format_callback,style:s},success:function(e){d(e)}})}}))})),"dynamic_selectors_value_format_callback"===s&&c.bind((function(a){e.each(n.value_bind.property_selectors,(function(r,c){var l,_=a,d="extra-dynamic-styles-"+t+"-"+r,u="";void 0===n.value_bind.use_formatted_value_as_css_expression&&(c=c.join(",\n"));var m=function(e){u=void 0!==n.value_bind.use_formatted_value_as_css_expression?e:void 0!==n.value_bind.use_only_formatted_value?f(c,e):f(c,e,r),p(d,u)};"function"==typeof i[n.value_bind.value_format_callback]?(l=(0,i[n.value_bind.value_format_callback])(t,r,_,n),m(l)):e.ajax({type:"POST",url:o.ajaxurl,data:{action:"extra_customizer_value_formatted_property_selector",extra_customizer_nonce:o.extra_customizer_nonce,unformatted_value:_,setting_name:t,property:r,callback:n.value_bind.value_format_callback,style:s},success:function(e){m(e)}})}))})),"dynamic_selectors_value_format"===s&&c.bind((function(a){e.each(n.value_bind.property_selectors,(function(e,o){var i=o.selectors.join(",\n"),r=o.property,c="extra-dynamic-styles-"+t+"-"+r,s=a;void 0!==o.format&&(s=o.format.replace(/%value%/gi,a)),p(c,void 0!==n.value_bind.use_only_formatted_value?f(i,s):f(i,s,r))}))})),"dynamic_selectors"===s&&c.bind((function(a){e.each(n.value_bind.property_selectors,(function(e,o){p("extra-dynamic-styles-"+t+"-"+e,f(o=o.join(",\n"),a,e))}))}))}))}))}(jQuery,window.top.jQuery,EXTRA)}});
Save Changes
Rename File
Rename