Modularización de GKACHELE SaaS
This commit is contained in:
42
wp-content/themes/abiz/core/customizer/assets/css/admin.css
Normal file
42
wp-content/themes/abiz/core/customizer/assets/css/admin.css
Normal file
@@ -0,0 +1,42 @@
|
||||
.abiz-getting-started-notice {
|
||||
padding: 20px 10px;
|
||||
display: -webkit-flex;
|
||||
display: -moz-flex;
|
||||
display: -ms-flex;
|
||||
display: -o-flex;
|
||||
display: flex;
|
||||
-ms-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.abiz-theme-screenshot img {
|
||||
width: 100%;
|
||||
max-width: 200px;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
border: 2px solid #ddd;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.abiz-theme-notice-content {
|
||||
width: 70%;
|
||||
display: block;
|
||||
vertical-align: top;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
h2.abiz-notice-h2 {
|
||||
margin: 0 0 10px;
|
||||
font-weight: 400;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.abiz-push-down {
|
||||
padding-top: 15px;
|
||||
display: inline-block;
|
||||
padding-left: 8px;
|
||||
}
|
||||
|
||||
.abiz-button-padding.updating-message::before {
|
||||
margin-top: 12px;
|
||||
}
|
||||
209
wp-content/themes/abiz/core/customizer/assets/css/controls.css
Normal file
209
wp-content/themes/abiz/core/customizer/assets/css/controls.css
Normal file
@@ -0,0 +1,209 @@
|
||||
.customize-control-abiz-sortable ul.ui-sortable li {
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #333;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.customize-control-abiz-sortable ul.ui-sortable li .dashicons.dashicons-menu {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.customize-control-abiz-sortable ul.ui-sortable li .dashicons.visibility {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.customize-control-abiz-sortable ul.ui-sortable li.invisible {
|
||||
color: #aaa;
|
||||
border: 1px dashed #aaa;
|
||||
}
|
||||
|
||||
.customize-control-abiz-sortable ul.ui-sortable li.invisible .dashicons.visibility {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.customize-control-hidden {
|
||||
display: block;
|
||||
padding: 13px 12px;
|
||||
color:#fff;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1px;
|
||||
line-height: 1;
|
||||
margin: 0 -12px;
|
||||
margin-bottom: 12px;
|
||||
border-width: 1px 0;
|
||||
border-style: solid;
|
||||
border-color: #dddddd;
|
||||
background-color: #13a1dc;
|
||||
}
|
||||
|
||||
.customize-control-hidden label {
|
||||
margin-bottom: 0;
|
||||
line-height: 1;
|
||||
font-size: 15px;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
/* Control: Switch. */
|
||||
.customize-control-abiz-toggle {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle label {
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle label .customize-control-title {
|
||||
width: calc(100% - 55px);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle label .description {
|
||||
-webkit-box-ordinal-group: 100;
|
||||
-ms-flex-order: 99;
|
||||
order: 99;
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle .switch {
|
||||
border: 1px solid #b4b9be;
|
||||
display: inline-block;
|
||||
width: 35px;
|
||||
height: 12px;
|
||||
border-radius: 8px;
|
||||
background: #b4b9be;
|
||||
vertical-align: middle;
|
||||
position: relative;
|
||||
top: 4px;
|
||||
cursor: pointer;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-transition: background 350ms ease;
|
||||
transition: background 350ms ease;
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle .switch::after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -3px;
|
||||
-webkit-transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease;
|
||||
transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease;
|
||||
background: #999;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
-webkit-transform: translate3d(0, -50%, 0);
|
||||
transform: translate3d(0, -50%, 0);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle .switch::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: -3px;
|
||||
-webkit-transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease;
|
||||
transition: all 350ms cubic-bezier(0, 0.95, 0.38, 0.98), background 150ms ease;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
-webkit-transform: translate3d(0, -50%, 0) scale(0);
|
||||
transform: translate3d(0, -50%, 0) scale(0);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle .switch:active::before {
|
||||
-webkit-transform: translate3d(0, -50%, 0) scale(3);
|
||||
transform: translate3d(0, -50%, 0) scale(3);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle input:checked + .switch::before {
|
||||
background: rgba(0, 115, 170, 0.075);
|
||||
-webkit-transform: translate3d(100%, -50%, 0) scale(1);
|
||||
transform: translate3d(100%, -50%, 0) scale(1);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle input:checked + .switch::after {
|
||||
background: #13a1dc;
|
||||
-webkit-transform: translate3d(100%, -50%, 0);
|
||||
transform: translate3d(100%, -50%, 0);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle input:checked + .switch:active::before {
|
||||
background: rgba(0, 115, 170, 0.075);
|
||||
-webkit-transform: translate3d(100%, -50%, 0) scale(3);
|
||||
transform: translate3d(100%, -50%, 0) scale(3);
|
||||
}
|
||||
|
||||
.customize-control-abiz-toggle input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Upsale */
|
||||
.premium-info ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.premium-info ul li {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.premium-info ul li a, .up-to-pro {
|
||||
font-family: 'Noto Sans', sans-serif;
|
||||
font-weight: bold;
|
||||
padding: 12px 10px;
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
letter-spacing: 1px;
|
||||
overflow: hidden;
|
||||
-webkit-transition: .3s;
|
||||
transition: .3s;
|
||||
background: #009efa; /* fallback for old browsers */
|
||||
background: -webkit-linear-gradient(to right, #233fe7, #009efa); /* Chrome 10-25, Safari 5.1-6 */
|
||||
background: linear-gradient(to right, #233fe7, #009efa);/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
z-index: 2;
|
||||
}
|
||||
.premium-info ul li a:hover, .premium-info ul li a:focus,
|
||||
.up-to-pro:hover, .up-to-pro:focus {
|
||||
transform: translateY(-3px);
|
||||
color: #fff;
|
||||
box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.up-to-pro {
|
||||
padding: 9px 58px;
|
||||
text-transform: capitalize;
|
||||
}
|
||||
.premium-info ul li a i{
|
||||
font-size: 15px;
|
||||
margin-top: 1px;
|
||||
margin-right: 7px;
|
||||
}
|
||||
.premium-info .upgrade-to-pro, .up-to-pro{
|
||||
background: #ff5d00;
|
||||
}
|
||||
li#accordion-section-abiz_upgrade_premium .accordion-section-title:after {
|
||||
content: "\f174" !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
li#accordion-section-abiz_upgrade_premium .accordion-section-title,
|
||||
li#accordion-section-abiz_upgrade_premium .accordion-section-title:hover,
|
||||
li#accordion-section-abiz_upgrade_premium .accordion-section-title button:hover,
|
||||
li#accordion-section-abiz_upgrade_premium .accordion-section-title button:focus {
|
||||
color: #ffffff !important;
|
||||
border-left: none;
|
||||
background: #009efa; /* fallback for old browsers */
|
||||
background: -webkit-linear-gradient(to right, #233fe7, #009efa) !important; /* Chrome 10-25, Safari 5.1-6 */
|
||||
background: linear-gradient(to right, #233fe7, #009efa) !important;/* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
( function( $ ){
|
||||
$( document ).ready( function(){
|
||||
$( '.abiz-btn-get-started' ).on( 'click', function( e ) {
|
||||
e.preventDefault();
|
||||
$( this ).html( 'Processing.. Please wait' ).addClass( 'updating-message' );
|
||||
$.post( abiz_ajax_object.ajax_url, { 'action' : 'install_act_plugin' }, function( response ){
|
||||
location.href = 'customize.php';
|
||||
} );
|
||||
} );
|
||||
} );
|
||||
|
||||
$( document ).on( 'click', '.notice-get-started-class .notice-dismiss', function () {
|
||||
// Read the "data-notice" information to track which notice
|
||||
// is being dismissed and send it via AJAX
|
||||
var type = $( this ).closest( '.notice-get-started-class' ).data( 'notice' );
|
||||
// Make an AJAX call
|
||||
$.ajax( ajaxurl,
|
||||
{
|
||||
type: 'POST',
|
||||
data: {
|
||||
action: 'abiz_dismissed_notice_handler',
|
||||
type: type,
|
||||
}
|
||||
} );
|
||||
} );
|
||||
}( jQuery ) )
|
||||
86
wp-content/themes/abiz/core/customizer/assets/js/controls.js
vendored
Normal file
86
wp-content/themes/abiz/core/customizer/assets/js/controls.js
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
/**
|
||||
* sortable
|
||||
*/
|
||||
wp.customize.controlConstructor['abiz-sortable'] = wp.customize.Control.extend({
|
||||
|
||||
ready: function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var control = this;
|
||||
|
||||
// Set the sortable container.
|
||||
control.sortableContainer = control.container.find( 'ul.sortable' ).first();
|
||||
|
||||
// Init sortable.
|
||||
control.sortableContainer.sortable({
|
||||
|
||||
// Update value when we stop sorting.
|
||||
stop: function() {
|
||||
control.updateValue();
|
||||
}
|
||||
}).disableSelection().find( 'li' ).each( function() {
|
||||
|
||||
// Enable/disable options when we click on the eye of Thundera.
|
||||
jQuery( this ).find( 'i.visibility' ).click( function() {
|
||||
jQuery( this ).toggleClass( 'dashicons-visibility-faint' ).parents( 'li:eq(0)' ).toggleClass( 'invisible' );
|
||||
});
|
||||
}).click( function() {
|
||||
|
||||
// Update value on click.
|
||||
control.updateValue();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the sorting list
|
||||
*/
|
||||
updateValue: function() {
|
||||
|
||||
'use strict';
|
||||
|
||||
var control = this,
|
||||
newValue = [];
|
||||
|
||||
this.sortableContainer.find( 'li' ).each( function() {
|
||||
if ( ! jQuery( this ).is( '.invisible' ) ) {
|
||||
newValue.push( jQuery( this ).data( 'value' ) );
|
||||
}
|
||||
});
|
||||
|
||||
control.setting.set( newValue );
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Control: Toggle.
|
||||
*/
|
||||
wp.customize.controlConstructor['abiz-toggle'] = wp.customize.Control.extend( {
|
||||
// When we're finished loading continue processing
|
||||
ready: function () {
|
||||
'use strict';
|
||||
|
||||
var control = this;
|
||||
|
||||
// Init the control.
|
||||
if (
|
||||
!_.isUndefined( window.abizControlLoader ) &&
|
||||
_.isFunction( abizControlLoader )
|
||||
) {
|
||||
abizControlLoader( control );
|
||||
} else {
|
||||
control.initAbizControl();
|
||||
}
|
||||
},
|
||||
|
||||
initAbizControl: function () {
|
||||
var control = this,
|
||||
checkboxValue = control.setting._value;
|
||||
|
||||
// Save the value
|
||||
this.container.on( 'change', 'input', function () {
|
||||
checkboxValue = jQuery( this ).is( ':checked' ) ? true : false;
|
||||
control.setting.set( checkboxValue );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
@@ -0,0 +1,38 @@
|
||||
function abizshomesettingsscroll(section_id) {
|
||||
var scroll_section_id = "slider-section";
|
||||
|
||||
var $contents = jQuery('#customize-preview iframe').contents();
|
||||
|
||||
switch (section_id) {
|
||||
case 'accordion-section-info_section_set':
|
||||
scroll_section_id = "info-section";
|
||||
break;
|
||||
|
||||
case 'accordion-section-service_section_set':
|
||||
scroll_section_id = "service-section";
|
||||
break;
|
||||
|
||||
case 'accordion-section-marquee_section_set':
|
||||
scroll_section_id = "abiz-marquee-section";
|
||||
break;
|
||||
|
||||
case 'accordion-section-features2_section_set':
|
||||
scroll_section_id = "abiz-features-section-2";
|
||||
break;
|
||||
|
||||
case 'accordion-section-blog_section_set':
|
||||
scroll_section_id = "abiz-blog-section";
|
||||
break;
|
||||
}
|
||||
|
||||
if ($contents.find('#' + scroll_section_id).length > 0) {
|
||||
$contents.find("html, body").animate({
|
||||
scrollTop: $contents.find("#" + scroll_section_id).offset().top
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
jQuery('body').on('click', '#sub-accordion-panel-abiz_frontpage_sections .control-subsection .accordion-section-title', function(event) {
|
||||
var section_id = jQuery(this).parent('.control-subsection').attr('id');
|
||||
abizshomesettingsscroll(section_id);
|
||||
});
|
||||
259
wp-content/themes/abiz/core/customizer/assets/js/customizer.js
Normal file
259
wp-content/themes/abiz/core/customizer/assets/js/customizer.js
Normal file
@@ -0,0 +1,259 @@
|
||||
/**
|
||||
* Contains handlers to make Theme Customizer preview reload changes asynchronously.
|
||||
*/
|
||||
(function($) {
|
||||
// Site title and description.
|
||||
wp.customize('blogname', function(value) {
|
||||
value.bind(function(to) {
|
||||
$('.site-title').text(to);
|
||||
});
|
||||
});
|
||||
wp.customize('blogdescription', function(value) {
|
||||
value.bind(function(to) {
|
||||
$('.site-description').text(to);
|
||||
});
|
||||
});
|
||||
|
||||
// Header text color.
|
||||
wp.customize('header_textcolor', function(value) {
|
||||
value.bind(function(to) {
|
||||
if ('blank' === to) {
|
||||
$('.site-title, .site-description').css({
|
||||
'clip': 'rect(1px, 1px, 1px, 1px)',
|
||||
'position': 'absolute'
|
||||
});
|
||||
} else {
|
||||
$('.site-title, .site-description').css({
|
||||
'clip': 'auto',
|
||||
'position': 'relative'
|
||||
});
|
||||
$('.site-title, .site-description').css({
|
||||
'color': to
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).ready(function($) {
|
||||
$('input[data-input-type]').on('input change', function() {
|
||||
var val = $(this).val();
|
||||
$(this).prev('.cs-range-value').html(val);
|
||||
$(this).val(val);
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
// logo_size
|
||||
wp.customize('logo_size', function(value) {
|
||||
value.bind(function(logo_size) {
|
||||
jQuery('.logo img, .mobile-logo img').css('max-width', logo_size + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
// site_ttl_font_size
|
||||
wp.customize('site_ttl_font_size', function(value) {
|
||||
value.bind(function(site_ttl_font_size) {
|
||||
jQuery('h4.site-title').css('font-size', site_ttl_font_size + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
// site_desc_font_size
|
||||
wp.customize('site_desc_font_size', function(value) {
|
||||
value.bind(function(site_desc_font_size) {
|
||||
jQuery('.site-description').css('font-size', site_desc_font_size + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
//hdr_info1_title
|
||||
wp.customize(
|
||||
'hdr_info1_title',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.above-header .info1 h6').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//hdr_info2_title
|
||||
wp.customize(
|
||||
'hdr_info2_title',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.main-header .info2 h6').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//hdr_info3_title
|
||||
wp.customize(
|
||||
'hdr_info3_title',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.main-header .info3 h6').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//hdr_btn_label
|
||||
wp.customize(
|
||||
'hdr_btn_label',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.main-navigation .button-area a').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//service_ttl
|
||||
wp.customize(
|
||||
'service_ttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-service-main .theme-main-heading .title').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//service_subttl
|
||||
wp.customize(
|
||||
'service_subttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-service-main .theme-main-heading h2').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//service_desc
|
||||
wp.customize(
|
||||
'service_desc',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-service-main .theme-main-heading p').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//features2_ttl
|
||||
wp.customize(
|
||||
'features2_ttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-features-section-2 .theme-main-heading .title').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//features2_subttl
|
||||
wp.customize(
|
||||
'features2_subttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-features-section-2 .theme-main-heading h2').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//features2_desc
|
||||
wp.customize(
|
||||
'features2_desc',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-features-section-2 .theme-main-heading p').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//blog_ttl
|
||||
wp.customize(
|
||||
'blog_ttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-blog-main .theme-main-heading .title').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//blog_subttl
|
||||
wp.customize(
|
||||
'blog_subttl',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-blog-main .theme-main-heading h2').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
//blog_desc
|
||||
wp.customize(
|
||||
'blog_desc',
|
||||
function(value) {
|
||||
value.bind(
|
||||
function(newval) {
|
||||
$('.abiz-blog-main .theme-main-heading p').text(newval);
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// font size
|
||||
wp.customize('abiz_body_font_size', function(value) {
|
||||
value.bind(function(abiz_body_font_size) {
|
||||
jQuery('body').css('font-size', abiz_body_font_size + 'px');
|
||||
});
|
||||
});
|
||||
|
||||
// font weight
|
||||
wp.customize('abiz_body_font_weight', function(value) {
|
||||
value.bind(function(font_weight) {
|
||||
jQuery('body').css('font-weight', font_weight);
|
||||
});
|
||||
});
|
||||
|
||||
// font style
|
||||
wp.customize('abiz_body_font_style', function(value) {
|
||||
value.bind(function(font_style) {
|
||||
jQuery('body').css('font-style', font_style);
|
||||
});
|
||||
});
|
||||
|
||||
// Text Decoration
|
||||
wp.customize('abiz_body_txt_decoration', function(value) {
|
||||
value.bind(function(decoration) {
|
||||
jQuery('body, a').css('text-decoration', decoration);
|
||||
});
|
||||
});
|
||||
|
||||
// text tranform
|
||||
wp.customize('abiz_body_text_transform', function(value) {
|
||||
value.bind(function(text_tranform) {
|
||||
jQuery('body').css('text-transform', text_tranform);
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user