first commit

This commit is contained in:
2023-09-12 21:41:04 +02:00
commit 3361a7f053
13284 changed files with 2116755 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<#
if( data === undefined )
data = {};
var element_attributes = [], css_classes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_accordion_wrapper' );
if( atts['class'] !== undefined && atts['class'] !== '' )
css_classes.push( atts['class'] );
if( atts['open_all'] !== undefined && atts['open_all'] == 'yes' )
element_attributes.push( 'data-allowopenall="true"' );
if( atts['close_all'] !== undefined && atts['close_all'] == 'yes' )
element_attributes.push( 'data-closeall="true"' );
element_attributes.push( 'class="'+css_classes.join(' ')+'"' );
#>
<div {{{element_attributes.join(' ')}}}><#
if( atts['title'] !== undefined && atts['title'] !== '' ){
#><h3 class="kc-accordion-title">{{atts['title']}}</h3><#
}
#>{{{data.content}}}</div>
<#
data.callback = function( wrp ){ kc_front.accordion( wrp ) };
#>

View File

@@ -0,0 +1,35 @@
<#
if( data === undefined )
data = {};
var element_attributes = [], title = 'Title', css_class = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_class = kc.front.el_class( atts );
css_class.push( 'kc_accordion_section' );
css_class.push( 'group' );
if( atts['title'] !== undefined && atts['title'] !== '' )
title = atts['title'];
if( atts['icon'] !== undefined && atts['icon'] !== '' )
title = '<i class="'+atts['icon']+'"></i> '+title;
if( atts['class'] !== undefined && atts['class'] !== '' )
css_class.push( atts['class'] );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#>
<div class="{{css_class.join(' ')}}">
<h3 class="kc_accordion_header ui-accordion-header">
<span class="ui-accordion-header-icon ui-icon"></span>
<a href="#{{kc.tools.esc_slug(title)}}" data-prevent="scroll">{{{title}}}</a>
</h3>
<div class="kc_accordion_content ui-accordion-content kc_clearfix">
<div class="kc-panel-body">{{{data.content}}}</div>
</div>
</div>

View File

@@ -0,0 +1,33 @@
<#
var output = '', element_attributes = [], el_classes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
el_classes = kc.front.el_class( atts );
el_classes.push( 'kc_box_wrap' );
if( atts['custom_class'] !== undefined && atts['custom_class'] !== '' )
el_classes.push( atts['custom_class'] );
element_attributes.push( 'class="' + el_classes.join(' ') + '"' );
#>
<div class="{{el_classes.join(' ')}}"><#
data = kc.tools.base64.decode( atts['data'] );
data = data.replace( /\%SITE\_URL\%/g, kc_site_url );
if (data = JSON.parse(data))
{
#>{{{kc.front.loop_box(data)}}}<#
}
else
{
#>KC Box: Error content structure<#
}
if( atts['css_code'] !== undefined ){
#><style type="text/css">{{{atts['css_code']}}}</style><#
}
#></div>

View File

@@ -0,0 +1,30 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
css_classes = [],
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-leaf',
show_button = ( atts['show_button'] !== undefined ) ? atts['show_button'] : '',
classes = ( atts['class'] !== undefined ) ? atts['class'] : '',
custom_style = '';
css_classes = kc.front.el_class( atts );
css_classes.push( classes );
css_classes = css_classes.join(' ');
title = kc.tools.base64.decode( title );
#>
<div class="message-boxes {{{css_classes}}}">
<div class="message-box-wrap">
<#
if ( icon !== '' ) { #><i class="{{{icon}}}"></i><# }
if ( show_button == 'show' ) {
#><button class="kc-close-but"><?php echo esc_html__( 'close', 'kingcomposer' );?></button><#
}
#>{{{title}}}
</div>
</div>

View File

@@ -0,0 +1,50 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
textbutton = kc.std( atts, 'text_title', 'Button Text'),
link = kc.std( atts, 'link', '#'),
onclick = kc.std( atts, 'onclick', ''),
wrap_class = kc.std( atts, 'wrap_class', ''),
size = kc.std( atts, 'size', 'small'),
show_icon = kc.std( atts, 'show_icon', 'no'),
icon = kc.std( atts, 'icon', 'fa-leaf'),
icon_position = kc.std( atts, 'icon_position', 'left'),
button_attributes = [],
wrapper_class = [];
wrapper_class = kc.front.el_class( atts );
wrapper_class.push( wrap_class );
link = link.split('|');
button_attributes.push( 'class="kc_button"' );
if( link[0] !== undefined )
button_attributes.push( 'href="' + link[0] + '"' );
if( link[1] !== undefined )
button_attributes.push( 'title="' + link[1] + '"' );
if( link[2] !== undefined )
button_attributes.push( 'target="' + link[2] + '"' );
if( onclick !== undefined && onclick !== '')
button_attributes.push( 'onclick="' + onclick + '"' );
if('yes' === show_icon){
if( icon_position == 'left' ){
textbutton = '<i class="' + icon + '"></i> ' + textbutton;
}else if( icon_position == 'right'){
textbutton += ' <i class="' + icon + '"></i>';
}else{
textbutton = '<i class="' + icon + '"></i>';
}
}
#>
<div class="{{{wrapper_class.join(' ')}}}">
<a {{{button_attributes.join(' ')}}}>{{{textbutton}}}</a>
</div>

View File

@@ -0,0 +1,90 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '2',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
desc = ( atts['desc'] !== undefined ) ? kc.tools.base64.decode( atts['desc']) : '',
button_show = ( atts['button_show'] !== undefined ) ? atts['button_show'] : '',
button_text = ( atts['button_text'] !== undefined ) ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '',
icon_show = ( atts['icon_show'] !== undefined ) ? atts['icon_show'] : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__' ) ? atts['icon'] : 'fa-rocket',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
link_url = '',
link_title = '',
link_target = '',
data_text = '',
data_title = '',
data_button = '',
button_attr = [],
main_class = kc.front.el_class( atts );
main_class.push( 'kc-call-to-action' );
main_class.push( 'kc-cta-' + layout );
if ( button_show === 'yes' )
main_class.push( 'kc-is-button' );
if ( custom_class !== '' )
main_class.push( custom_class );
if ( title !== '' || desc !== '' ) {
data_text += '<div class="kc-cta-desc">';
if ( title !== '' ) {
data_text += '<h2>' + title + '</h2>';
}
if ( desc !== '' ) {
data_text += '<div class="kc-cta-text">' + desc + '</div>';
}
data_text += '</div>';
}
if ( button_show === 'yes' && button_text !== '' ) {
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if ( link_arr[0] !== undefined ) {
link_url = link_arr[0];
} else {
link_url = '#';
}
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
} else {
link_url = '#';
}
if ( icon_show === 'yes' ) {
button_text += ' <span class="kc-cta-icon"><i class="' + icon + '"></i></span>';
}
button_attr.push( 'href="' + link_url + '"' );
if ( link_title !== '' )
button_attr.push( 'title="' + link_title + '"' );
if ( link_target !== '' )
button_attr.push( 'target="' + link_target + '"' );
data_button += '<div class="kc-cta-button">';
data_button += '<a ' + button_attr.join(' ') + '>' + button_text + '</a>';
data_button += '</div>';
}
#>
<div class="{{{main_class.join(' ')}}}">
{{{data_text}}}
{{{data_button}}}
</div>

View File

@@ -0,0 +1,165 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
thumb_data = '',
attachment_data = [],
attachment_data_full = [],
el_classes = [],
wrp_classes = [],
custom_links_arr = [],
element_attribute = [], el_classes = [], owl_option = [],
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
items_number = ( atts['items_number'] !== undefined ) ? atts['items_number'] : 4,
tablet = ( atts['tablet'] !== undefined ) ? atts['tablet'] : 2,
mobile = ( atts['mobile'] !== undefined ) ? atts['mobile'] : 1,
speed = ( atts['speed'] !== undefined ) ? atts['speed'] : 500,
navigation = ( atts['navigation'] !== undefined ) ? atts['navigation'] : false,
pagination = ( atts['pagination'] !== undefined ) ? atts['pagination'] : false,
auto_height = ( atts['auto_height'] !== undefined ) ? atts['auto_height'] : false,
progress_bar = ( atts['progress_bar'] !== undefined ) ? atts['progress_bar'] : false,
delay = ( atts['delay'] !== undefined && atts['delay'] !== '__empty__' && atts['delay'] !== '' ) ? atts['delay'] : 8,
autoplay = ( atts['autoplay'] !== undefined ) ? atts['autoplay'] : false,
show_thumb = ( atts['show_thumb'] !== undefined ) ? atts['show_thumb'] : '',
auto_play = ( atts['auto_play'] !== undefined ) ? atts['auto_play'] : false,
onclick = ( atts['onclick'] !== undefined ) ? atts['onclick'] : '',
custom_links = ( atts['custom_links'] !== undefined ) ? atts['custom_links'] : '',
num_thumb = ( atts['num_thumb'] !== undefined && atts['num_thumb'] !== '' ) ? atts['num_thumb'] : '5',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full';
wrp_classes = kc.front.el_class( atts );
if( images !== '' ){
images = images.split(',');
}
#>
<div class="{{{wrp_classes.join(' ')}}}">
<#
if( typeof(images) == 'object' && images !== '' ) {
for ( var i=0; i< images.length; i++ ){
image_id = images[i];
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + img_size);
attachment_data_full.push( ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image_id );
}
el_classes.push( 'kc-carousel-images' );
el_classes.push( 'owl-carousel-images' );
el_classes.push( 'owl-arrow-nav' );
el_classes.push( 'kc-sync1' );
el_classes.push( wrap_class );
if( atts['nav_style'] !== undefined && atts['nav_style'] !== '' ){
el_classes.push( 'owl-nav-' + atts['nav_style'] );
}
owl_option = {
'items' : items_number,
'tablet' : tablet,
'mobile' : mobile,
'speed' : speed,
'navigation' : navigation,
'pagination' : pagination,
'autoheight' : auto_height,
'progressbar' : progress_bar,
'delay' : delay,
'autoplay' : auto_play,
'showthumb' : show_thumb,
'num_thumb' : num_thumb,
};
owl_option = JSON.stringify( owl_option );
element_attribute.push('class="' + el_classes.join(' ') + '"');
element_attribute.push("data-owl-i-options='" + owl_option + "'");
if( 'custom_link' == onclick && custom_links !== '' ){
custom_links = custom_links.replace('/[\r\n]+/',"\n").replace('/^\n/','').replace('/\n$/','');
custom_links_arr = custom_links.split("\n");
}
for(var i=0; i < attachment_data.length; i++){
image = attachment_data[i];
output += '<div class="item">';
if( 'none' === onclick ){
output += '<img src="' + image + '" alt=""/>';
}else {
switch( onclick ){
case 'lightbox':
output += '<a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="prettyPhoto[' + atts['_id'] + ']" href="' + attachment_data_full[i] + '"><img src="' + image + '" alt="" /></a>';
break;
case 'custom_link':
if( custom_links_arr[i] !== undefined ){
output += '<a href="' + custom_links_arr[i] + '" target="' + custom_links_target + '">';
output += '<img src="' + image + '" alt="" /></a>';
}else{
output += '<img src="' + image + '" alt="" />';
}
break;
}
}
output += '</div>';
}
#>
<div class="kc-carousel_images">
<div {{{element_attribute.join(' ')}}}>
{{{output}}}
</div>
<#
if( show_thumb === 'yes' ){
#>
<div class="kc-sync2 owl-carousel">
<#
for( var k = 0; k < attachment_data.length; k++ ) {
image = attachment_data[k];
#>
<div class="item">
<img src="{{{image}}}" alt="" />
</div>
<# } #>
</div>
<#
}
data.callback = function( wrp, $ ){
kc_front.carousel_images( wrp );
}
#>
</div>
<#
}else{
#>
<h3 class="kc-carousel-no-images">Carousel Images: No images found.</h3>
<#
}
#>
</div>

View File

@@ -0,0 +1,41 @@
<#
if( data === undefined )data = {};
var width = '', output = '', attributes = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
classes = kc.front.el_class( atts );
classes.push('kc_column');
if (atts['col_class'] !== undefined)
classes.push( atts['col_class'] );
if (atts['css'] !== undefined && typeof atts['css'] == 'string')
classes.push( atts['css'].split('|')[0] );
if( atts['col_id'] !== undefined && atts['col_id'] !== '' )
attributes.push( 'id="'+ atts['col_id'] +'"' );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
var col_container_class = ( atts['col_container_class'] !== undefined ) ? ' '+atts['col_container_class'] : '';
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div {{{attributes.join(' ')}}}>
<div class="kc-col-container{{col_container_class}}">{{{data.content}}}</div>
</div>

View File

@@ -0,0 +1,35 @@
<#
var output = '', attributes = [], col_in_class_container = 'kc_wrapper',
classes = [], atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_column_inner' );
if (undefined !== atts['col_in_class'] && atts['col_in_class'] !== '')
classes.push( atts['col_in_class'] );
if (undefined !== atts['css'] && typeof atts['css'] == 'string')
classes .push( atts['css'].split('|')[0] );
if (atts['width'] !== undefined)
classes.push( kc.front.ui.column.width_class( atts['width'] ) );
if (undefined !== atts['col_in_class_container'] && atts['col_in_class_container'] !== '')
col_in_class_container += ' '+atts['col_in_class_container'];
if( atts['col_id'] !== undefined && atts['col_id'] !== '' )
attributes.push( 'id="'+ atts['col_id'] +'"' );
attributes.push( 'class="'+classes.join(' ')+'"' );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div {{{attributes.join(' ')}}}>
<div class="{{col_in_class_container}}">{{{data.content}}}</div>
</div>

View File

@@ -0,0 +1,18 @@
<#
var atts = ( data.atts !== undefined ) ? data.atts : {}, el_class = [];
el_class = kc.front.el_class( atts );
el_class.push( 'kc_text_block' );
if( atts['class'] !== undefined && atts['class'] !== '' )
el_class.push( atts['class'] );
var content = top.switchEditors.wpautop(data._content);
if (content.indexOf('<p>') === -1)
content = '<p>'+content+'</p>';
#>
<div class="{{el_class.join(' ')}}">{{{content}}}</div>

View File

@@ -0,0 +1,85 @@
<# var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
template = '',
custom_css = '',
el_classes = ['kc-countdown-timer'],
wpelm_class = [],
output = '',
element_attribute = [],
countdown_data = [],
timer_style = ( atts['timer_style'] !== undefined ) ? atts['timer_style'] : '1',
custom_template = ( atts['custom_template'] !== undefined ) ? atts['custom_template'] : '',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
today = new Date(),
datetime = ( atts['datetime'] !== undefined && atts['datetime'] !== '__empty__' ) ? atts['datetime'] : '';
if( datetime == ''){
today.setTime(today.getTime() + 7 * 86400000);
datetime = today.toDateString();
}
wpelm_class = kc.front.el_class( atts );
el_classes.push( wrap_class );
switch ( timer_style ) {
case '1':
case '2':
template += '<span class="countdown-style' + timer_style + '">';
template += ' <span class="group">';
template += ' <span class="timer days">%D</span>';
template += ' <span class="unit">days</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%H</span>';
template += ' <span class="unit">hours</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%M</span>';
template += ' <span class="unit">minutes</span>';
template += ' </span>';
template += ' <span class="group">';
template += ' <span class="timer seconds">%S</span>';
template += ' <span class="unit">seconds</span>';
template += ' </span>';
template += '</span>';
break;
case '3':
if( custom_template !== '' ){
template = kc.tools.base64.decode(custom_template);
} else {
template = '%D days %H:%M:%S';
}
break;
}
var d = new Date(datetime);
datetime = d.getFullYear() + "/" + (d.getMonth() + 1) + "/" + d.getDate();
countdown_data = {
'date' : datetime,
'template' : template.replace('/\s\s+/', ' ').trim()
};
element_attribute.push('class="' + el_classes.join(' ') + '"');
element_attribute.push("data-countdown='" + JSON.stringify( countdown_data ) + "'");
#>
<div class="{{{wpelm_class.join(' ')}}}">
<#
if( title !== '' ){
#><h3>{{{title}}}</h3><#
}
#>
<div {{{element_attribute.join(' ')}}}></div>
</div>
<#
data.callback = function( wrp, $){
kc_front.countdown_timer();
}
#>

View File

@@ -0,0 +1,50 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
_before_number = '',
_after_number = '',
icon = '',
label = '',
el_classess = [];
el_classess = kc.front.el_class( atts );;
el_classess.push( 'kc_counter_box' );
if ( atts['wrap_class'] !== undefined )
el_classess.push( atts['wrap_class'] );
label = ( atts['label'] !== undefined ) ? '<h4>'+ atts['label'] +'</h4>' : '';
if( atts['icon_show'] !== undefined && atts['icon_show'] == 'yes' ) {
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-leaf';
icon = ( icon !== '' ) ? '<i class="' + icon + ' element-icon"></i>' : '';
} else {
icon = '';
}
if( atts['label_above'] !== undefined && 'yes' === atts['label_above'] ){
_before_number = icon + label;
} else {
_before_number = icon;
_after_number = label;
}
#>
<div class="{{{el_classess.join(' ')}}}">
{{{_before_number}}}
<span class="counterup">{{{atts['number']}}}</span>
{{{_after_number}}}
</div>
<#
data.callback = function( wrp, $ ){
kc_front.counterup();
}
#>

View File

@@ -0,0 +1,65 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
style = ( atts['style'] !== undefined ) ? atts['style'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
icon_show = ( atts['icon_show'] !== undefined ) ? atts['icon_show'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
icon_txt = ( atts['icon_txt'] !== undefined ) ? atts['icon_txt'] : '',
icon_float = ( atts['icon_float'] !== undefined ) ? atts['icon_float'] : '',
link = ( atts['link'] !== undefined ) ? atts['link'] : '',
link_url = '#',
link_title = '',
link_target = '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
main_class = [],
link_arr = [];
main_class = kc.front.el_class( atts );
main_class.push( 'kc-pro-button kc-button-' + style );
if ( custom_class !=='' ) {
main_class.push( custom_class );
}
if ( link !== '' ) {
link_arr = link.split('|');
if ( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
}
if ( icon_show == 'yes' )
icon_txt = ' <i class="' + icon + '"></i> ';
#>
<div class="{{{main_class.join(' ')}}}">
<a href="{{{link_url}}}" title="{{{link_title}}}" target="{{{link_target}}}">
<#
if ( icon_show == 'yes' && icon_float == 'before' ){ #>
<span class="creative_icon creative_icon_left">{{{icon_txt}}}</span>
<# } #>
<span class="creative_title">{{{title}}}</span>
<#
if ( icon_show == 'yes' && icon_float == 'after' ){ #>
<span class="creative_icon creative_icon_right">{{{icon_txt}}}</span>
<# } #>
</a>
</div>

View File

@@ -0,0 +1,39 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
wrap_class = '',
css_classes = [],
style = ( atts['style'] !== undefined ) ? atts['style'] : '1',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
line_text = ( atts['line_text'] !== undefined && atts['line_text'] !== '__empty__' ) ? atts['line_text'] : '',
classes = ( atts['class'] !== undefined ) ? atts['class'] : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push('divider_line');
if( classes !== '')
wrap_class.push( classes );
#>
<div class="{{{wrap_class.join(' ')}}}">
<div class="divider_inner divider_line{{{style}}}">
<#
switch ( style ) {
case '2':
if ( icon !== '' ){
#>
<i class="{{{icon}}}"></i>
<# }
break;
case '3':
if ( line_text !== '' ){
#>
<span class="line_text">{{{line_text}}}</span>
<# }
break;
default:
// code...
break;
}
#>
</div>
</div>

View File

@@ -0,0 +1,19 @@
<#
var atts = ( data.atts !== undefined ) ? data.atts : {},
wrap_class = [],
desc = ( atts['desc'] !== undefined ) ? kc.tools.base64.decode( atts['desc'] ) : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push('kc-dropcaps');
if ( custom_class !== '' )
wrap_class.push( custom_class );
desc = desc.replace(/^(<[a-zA-Z\s\d=\'\"]+>)(\s*[&nbsp;]*)*([a-zA-Z\d]{1})|^(\s*[&nbsp;]*)*([a-zA-Z\d]{1})|^(<[a-zA-Z\s\d=\'\"]+>)(\s*[&nbsp;]*)*([^\x00-\x7F]{1})|^(\s*[&nbsp;]*)*([^\x00-\x7F]{1})/i, '$1<span class="dropcaps-text">$3$5$8$10</span>');
#>
<div class="{{{wrap_class.join(' ')}}}">
{{{desc}}}
</div>

View File

@@ -0,0 +1,132 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__') ? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__') ? kc.tools.base64.decode( atts['desc']) : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__') ? atts['icon'] : 'et-envelope',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
position = ( atts['position'] !== undefined && atts['position'] !== '__empty__') ? atts['position'] : '',
show_button = ( atts['show_button'] !== undefined ) ? atts['show_button'] : '',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__') ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
img_link = '',
but_link_text = '',
data_img = '',
data_icon = '',
data_title = '',
data_desc = '',
data_position = '',
data_button = '',
btn_title = '',
btn_target = '',
wrap_class = [];
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-feature-boxes kc-fb-layout-' + layout );
if ( custom_class !=='' ) {
wrap_class.push( custom_class );
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
img_link = ajaxurl + '?action=kc_get_thumbn&id=' + image + '&size=full';
data_img += '<figure class="content-image">';
data_img += '<img src="'+ img_link +'" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">'+ title +'</div>';
}
if ( desc !== '' ) {
data_desc += '<div class="content-desc">'+ desc +'</div>';
}
if ( position !== '' ) {
data_position += '<div class="content-position">'+ position +'</div>';
}
data_icon += '<div class="content-icon">';
data_icon += '<i class="'+ icon +'"></i>';
data_icon += '</div>';
if ( show_button == 'yes' ) {
if ( button_link !== '' ) {
but_link_text = button_link.split( '|' );
button_link = but_link_text[0];
}
if( but_link_text[1] !== undefined )
btn_title = but_link_text[1];
if( but_link_text[2] !== undefined )
btn_target = but_link_text[2];
data_button += '<div class="content-button">';
data_button += '<a href="'+ button_link +'" title="' + btn_title + '" target="' + btn_target + '">'+ button_text +'</a>';
data_button += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( layout ) {
case '2':
#>
{{{data_img}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
case '3':
#>
{{{data_icon}}}
<div class="box-right">
{{{data_title}}}
{{{data_desc}}}
</div>
<#
break;
case '4':
#>
{{{data_img}}}
<div class="box-right">
{{{data_position}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
</div>
<#
break;
case '5':
#>
{{{data_position}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
default:
#>
{{{data_icon}}}
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
<#
break;
} #>
</div>

View File

@@ -0,0 +1,106 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
text_align = 'center',
image_size = 'full',
back_data = '',
front_data = '',
show_icon = ( atts['show_icon'] !== undefined )? atts['show_icon'] : '',
icon = ( atts['icon'] !== undefined )? atts['icon'] : 'sl-rocket',
title = ( atts['title'] !== undefined )? atts['title'] : '',
description = ( atts['description'] !== undefined )? kc.tools.base64.decode( atts['description'] ) : '',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '',
text_on_button = ( atts['text_on_button'] !== undefined )? atts['text_on_button'] : '',
direction = ( atts['direction'] !== undefined )? atts['direction'] : '',
wrap_class = ( atts['wrap_class'] !== undefined )? atts['wrap_class'] : '',
b_show_icon = ( atts['b_show_icon'] !== undefined )? atts['b_show_icon'] : '',
b_icon = ( atts['b_icon'] !== undefined )? atts['b_icon'] : '',
b_title = ( atts['b_title'] !== undefined )? atts['b_title'] : '',
b_description = ( atts['b_description'] !== undefined )? kc.tools.base64.decode( atts['b_description'] ) : '',
b_show_button = ( atts['b_show_button'] !== undefined )? atts['b_show_button'] : '',
b_text_on_button = ( atts['b_text_on_button'] !== undefined )? atts['b_text_on_button'] : '',
b_link = ( atts['b_link'] !== undefined )? atts['b_link'] : '',
btn_title = '',
btn_target = '',
but_link_text = '',
button_link = '',
image_data = kc_url + '/assets/images/get_start.jpg',
element_atttribute = [],
el_classess = [];
el_classess = kc.front.el_class( atts );
el_classess.push( 'kc-flipbox' );
el_classess.push( 'kc-flip-container' );
if ( wrap_class !== '' )
el_classess.push( wrap_class );
if( direction !== '' && direction === 'vertical' )
el_classess.push( 'flip-' + direction );
element_atttribute.push( 'class="' + el_classess.join(' ') + '"' );
element_atttribute.push( 'ontouchstart="this.classList.toggle(\'hover\');"' );
// Front Side Data
if( show_icon === 'yes' && icon !=='' )
front_data += '<div class="wrap-icon"><i class="' + icon + '"></i></div>';
if( title !== '' )
front_data += '<h3>' + title + '</h3>';
if( description !== '' )
front_data += '<p>' + kc.front.do_shortcode( description ) + '</p>';
// Back Side Data
if( b_show_icon == 'yes' && b_icon !== '' )
back_data += '<div class="wrap-icon"><i class="' + b_icon + '"></i></div>';
if( b_title !== '')
back_data += '<h3>' + b_title + '</h3>';
if( b_description !== '' )
back_data += '<p>' + kc.front.do_shortcode( b_description ) + '</p>';
if( b_show_button == 'yes' ){
if ( b_text_on_button == '' )
b_text_on_button = "<?php echo __( 'Read more', 'kingcomposer' );?>";
if ( b_link !== '' ) {
but_link_text = b_link.split( '|' );
button_link = but_link_text[0];
}
if( but_link_text[1] !== undefined )
btn_title = but_link_text[1];
if( but_link_text[2] !== undefined )
btn_target = but_link_text[2];
back_data += '<a class="button" href="' + button_link + ' title="' + btn_title + '" target="' + btn_target + '">' + b_text_on_button + '</a>';
}
#>
<div {{{element_atttribute.join(' ')}}}>
<div class="flipper">
<div class="front">
<div class="front-content">
{{{front_data}}}
</div>
</div>
<div class="back">
<div class="des">
{{{back_data}}}
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,70 @@
<#
if( data === undefined )
data = {};
var output = '',
contact_form = '',
map_location = '',
map_height = '250px',
contact_position = 'left',
element_attributes = [], map_attributes = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
var css_classes = [];
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_google_maps' );
css_classes.push( 'kc_shortcode' );
if( atts['contact_position'] !== undefined && atts['contact_area_position'] != '' )
contact_position = atts['contact_area_position'];
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
css_classes.push( atts['wrap_class'] );
element_attributes.push( 'class="'+ css_classes.join(' ') +'"' );
if( atts['title'] !== undefined && atts['title'] !== '' ){
output += '<h3 class="map_title">'+ atts['title'] +'</h3>';
}
//Contact form on maps
if( atts['show_ocf'] !== undefined && 'yes' == atts['show_ocf'] ){
if( atts['contact_form_sc'] !== undefined && atts['contact_form_sc'] != '' ){
contact_form += '<div class="map_popup_contact_form '+ contact_position +'">';
contact_form += '<a class="close" href="javascript:;"><i class="sl-close"></i></a>';
contact_form += kc.tools.base64.decode(atts['contact_form_sc']);
contact_form += '</div>';
contact_form += '<a class="show_contact_form" href="javascript:;"><i class="fa fa-bars"></i></a>';
}
}
map_attributes.push( 'class="kc-google-maps"' );
map_attributes.push( 'style="height: '+ parseInt(atts['map_height']) +'px"' );
if( atts['disable_wheel_mouse'] !== undefined && atts['disable_wheel_mouse'] != '' ){
map_attributes.push( 'data-wheel="disable"' );
}
map_location = '<div style="width: 100%;height:'+atts['map_height']+';" class="disable-view-element"><h3>For best perfomance, the map has been disabled in this editing mode.</h3></div>';
output += '<div '+ element_attributes.join(' ') +'>'+ contact_form +'<div '+ map_attributes.join(' ') +'>'+ map_location +'</div></div>';
#>
<div {{{element_attributes.join(' ')}}}>
{{{contact_form}}}
<div {{{map_attributes.join(' ')}}}>{{{map_location}}}</div>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.google_maps( wrp.parent() );
}
#>

View File

@@ -0,0 +1,55 @@
<#
if( typeof( data ) == 'undefined' )
data = {};
var output = '',
icon_wrap_class = '',
class_icon = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
icon = ( atts['icon'] !== undefined )? atts['icon'] : '',
link = ( atts['link'] !== undefined )? atts['link'] : '||',
use_link = ( atts['use_link'] !== undefined )? atts['use_link'] : '',
has_link = false,
icon_link_attr = [];
css_class = kc.front.el_class( atts );
css_class.push( 'kc-icon-wrapper' );
if ( atts['icon_wrap_class'] !== undefined && atts['icon_wrap_class'] !== '' )
css_class.push( atts['icon_wrap_class'] );
if( icon === '' )
icon = 'fa-leaf';
class_icon.push( icon );
if ( atts['class'] !== undefined )
class_icon.push( atts['class'] );
if( use_link == 'yes' ){
link = link.split('|');
if( link[0] !== undefined ){
icon_link_attr.push( 'href="' + link[0] + '"' );
has_link = true;
}
if( link[1] !== undefined )
icon_link_attr.push( 'title="' + link[1] + '"' );
if( link[2] !== undefined )
icon_link_attr.push( 'target="' + link[2] + '"' );
}
#>
<div class="{{{css_class.join(' ')}}}">
<# if( has_link === true ){ #>
<a {{{icon_link_attr.join(' ')}}}>
<# } #>
<i class="{{{class_icon.join(' ')}}}"></i>
<# if( has_link === true ){ #>
</a>
<# } #>
</div>

View File

@@ -0,0 +1,103 @@
<#
var output = '',
classes = ['image_fadein'],
css_class = [],
attributes = [],
_images = [],
atts = ( data.atts !== undefined ) ? data.atts : {},
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
transition = ( atts['images'] !== undefined ) ? atts['transition'] : '',
delay = ( atts['delay'] !== undefined ) ? atts['delay'] : '',
force_size = ( atts['force_size'] !== undefined ) ? atts['force_size'] : '',
width = ( atts['width'] !== undefined ) ? atts['width'] : '',
height = ( atts['height'] !== undefined ) ? atts['height'] : '',
position = ( atts['position'] !== undefined ) ? atts['position'] : '',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '';
css_class = kc.front.el_class( atts );
wrap_class = wrap_class + ' ' + css_class.join( ' ' );
if( images === '' )
images = [];
else
images = images.split(',');
for( var i =0; i < images.length; i++) {
image_id = images[i];
image = ajaxurl + "?action=kc_get_thumbn&size=full&id=" + image_id;
if( image !== undefined && image !== '' ){
if( force_size !== undefined && force_size == 'yes' ){
var att = ['250', '250', 'c'], image_size = '';
if( width !== '' )
att[0] = width;
if( height !== '' )
att[1] = height;
if( position !== '' )
att[2] = position;
image_size = att.join('x');
_images.push( ajaxurl + "?action=kc_get_thumbn_size&id="+image_id+'&size='+image_size);
}
else _images.push( image );
}
}
if( transition !== '' )
classes.push( transition );
if( delay !== '' )
attributes.push( 'data-delay="' + delay + '"');
attributes.push( 'class="' + classes.join(' ') + '"');
attributes.push( 'data-images="' + images + '"');
#>
<div class="image_fadein_slider {{{wrap_class}}}">
<#
if( title !== '' ){
#>
<h3>{{{title}}}</h3>
<#
}
#>
<div {{{attributes.join(' ')}}}>
<#
if( _images.length == 0 ){
#>
<h3><?php echo __('Images Fadein Gallery: No images found', 'kingcomposer' );?></h3>
<#
}else{
for( var i =0; i < _images.length; i++ ){
image = _images[i];
#>
<img src="{{{image}}}" />
<#
}
}
#>
</div>
</div>
<#
data.callback = function( wrp, $){
kc_front.image_fade();
}
#>

View File

@@ -0,0 +1,131 @@
<#
var output = '', atts = ( data.atts !== undefined ) ? data.atts : {},
custom_links = ( atts['custom_links'] !== undefined ) ? atts['custom_links'] : '',
click_action = ( atts['click_action'] !== undefined ) ? atts['click_action'] : 'none',
wrap_class = ( atts['wrap_class'] !== undefined ) ? atts['wrap_class'] : '',
type = ( atts['type'] !== undefined ) ? atts['type'] : '',
image_size = ( atts['image_size'] !== undefined ) ? atts['image_size'] : '',
images = ( atts['images'] !== undefined ) ? atts['images'] : '',
title = ( atts['title'] !== undefined ) ? atts['title'] : '',
columns = ( atts['columns'] !== undefined && atts['columns'] !== '__empty__' ) ? atts['columns'] : '4',
type_class = '',
slider_item_start = '',
slider_item_end = '',
attachment_data = [],
wrp_class = [],
attachment_data_full = [],
custom_links_arr = [],
element_attribute = [], el_classess = [ ],
sizes = ['full', 'thumbnail', 'medium', 'large'];
type_class = 'kc-grid';
if( custom_links !== '' && 'custom_link' === click_action ) {
custom_links = custom_links.replace('/[\r\n]+/',"\n").replace('/^\n/','').replace('/\n$/','');
custom_links_arr = custom_links.split('\n');
}
wrp_class = kc.front.el_class( atts );
wrp_class = wrp_class.join( ' ' );
el_classess = ['kc_image_gallery',
type_class,
wrap_class];
if( images === '' )
images = [];
else
images = images.split(',');
element_attribute.push( 'class="' + el_classess.join(' ') + '"');
element_attribute.push( 'data-type="' + type + '"');
if( type == 'image_masonry' )
element_attribute.push('data-image_masonry="yes"');
else
element_attribute.push('data-image_masonry=""');
for ( var i=0; i < images.length; i++ ){
image_id = images[i];
if ( sizes.indexOf( image_size ) > -1 ) {
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + image_size );
}else if( image_size.indexOf('x') > 0 ){
attachment_data.push( ajaxurl + '?action=kc_get_thumbn_size&id=' + image_id + '&size=' + image_size );
}else{
attachment_data.push( ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=full');
}
attachment_data_full.push( ajaxurl + "?action=kc_get_thumbn&size=full&id="+image_id );
}
if( attachment_data[0] === undefined || attachment_data[0] ==='' ){
output += '<h3 class="kc-image-gallery-title">Images Gallery: No images found</h3>';
}else{
var pretty_id = parseInt(Math.random()*100000);
for( var i=0; i< attachment_data.length; i++){
var image = attachment_data[i];
switch( click_action ){
case 'none':
output += '<div class="item-grid grid-' + columns + '"><img src="' + image + '" /></div>';
break;
case 'large_image':
output += '<div class="item-grid grid-' + columns + '"><a href="' + attachment_data_full[i] + '" target="_blank">';
output += '<img src="' + image + '" /></a></div>';
break;
case 'lightbox':
output += '<div class="item-grid grid-' + columns + '"><a class="kc-image-link kc-pretty-photo" data-lightbox="kc-lightbox" rel="kc-pretty-photo['+pretty_id+']" href="' + attachment_data_full[i] + '">';
output += '<img src="' + image + '" /></a></div>';
break;
case 'custom_link':
if( custom_links_arr[i] !== undefined ){
output += '<div class="item-grid grid-' + columns + '"><a href="' + custom_links_arr[i] + '" target="_blank">';
output += '<img src="'+ image + '" /></a></div>';
}else{
output += '<div class="item-grid grid-' + columns + '"><img src="' + image + '" /></div>';
}
break;
}
}
}
#>
<div class="kc-image-gallery {{{wrp_class}}}">
<# if( title !== '' ){#>
<h3 class="kc-title image-gallery-title">{{{title}}}</h3>
<# } #>
<div {{{element_attribute.join(' ')}}}>
{{{output}}}
</div>
</div>
<#
data.callback = function( wrp, $){
if( wrp.find(".kc_image_gallery").data("type") == 'image_masonry' )
kc_front.image_gallery.masonry( wrp );
}
#>

View File

@@ -0,0 +1,191 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__')? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__') ? kc.tools.base64.decode( atts['desc']) : '',
image = ( atts['image'] !== undefined )? atts['image'] : '',
event_click = ( atts['event_click'] !== undefined )? atts['event_click'] : '',
custom_link = ( atts['custom_link'] !== undefined )? atts['custom_link'] : '||',
button_text = ( atts['button_text'] !== undefined )? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
icon = ( atts['icon'] !== undefined )? atts['icon'] : 'fa-star',
custom_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
img_size = ( atts['img_size'] !== undefined )? atts['img_size'] : '1170x700xct',
img_url = '',
link_url = '',
link_title = '',
link_target = '',
before_url = '',
after_url = '',
data_img = '',
data_title = '',
data_desc = '',
data_button = '',
button_attr = [],
img_arr = [],
link_arr = [],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-image-hover-effects kc-img-effects-' + layout );
if ( custom_class !== '' )
wrap_class.push( custom_class );
if ( image != '' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
img_full = ajaxurl + '?action=kc_get_thumbn&id=' + image + '&size=full' ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image;
img_full = img_link;
}
} else {
img_link = kc_url + "/assets/images/get_start.jpg";
img_full = kc_url + "/assets/images/get_start.jpg";
}
if ( custom_link !== '' ) {
img_arr = custom_link.split('|');
if ( img_arr[0] !== '' ) {
img_url = img_arr[0];
} else {
img_url = '#';
}
} else {
img_url = '#';
}
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
if ( link_arr[1] !== undefined )
link_title = link_arr[1];
if ( link_arr[2] !== undefined )
link_target = link_arr[2];
} else {
link_url = '#';
}
button_attr.push( 'href="' + link_url + '"' );
if ( link_title !== '' )
button_attr.push( 'title="' + link_title + '"' );
if ( link_target !== '' )
button_attr.push( 'target="' + link_target + '"' );
switch ( event_click ) {
case 'none':
data_img = '<figure><img src="' + img_link + '" alt=""/></figure>';
break;
case 'custom_link':
data_img = '<a href="' + img_url + '"><img src="' + img_link + '" alt=""/></a>';
before_url = '<a href="' + img_url + '">';
after_url = '</a>';
break;
default:
data_img = '<a href="' + img_full + '" rel="prettyPhoto" class="kc-pretty-photo"><img src="' + img_link + '" alt=""/></a>';
before_url = '<a href="' + img_full + '" rel="prettyPhoto" class="kc-pretty-photo">';
after_url = '</a>';
break;
}
if ( title !== '' ) {
data_title = '<div class="content-title">' + title + '</div>';
}
if ( desc !== '' ) {
data_desc = '<div class="content-desc">' + desc + '</div>';
}
if ( button_text !== '' ) {
data_button = '<div class="content-button"><a ' + button_attr.join(' ') + '>' + button_text + '</a></div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<# switch ( layout ) {
case '2':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
{{{data_title}}}
{{{data_desc}}}
</div>
{{{after_url}}}
<#
break;
case '3':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
<div class="overlay-content">
{{{data_title}}}
{{{data_desc}}}
</div>
</div>
{{{after_url}}}
<#
break;
case '4':
#>
{{{data_img}}}
<div class="overlay-effects">
{{{data_title}}}
{{{data_desc}}}
{{{data_button}}}
</div>
<#
break;
case '5':
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
<i class="{{{icon}}}"></i>
</div>
{{{after_url}}}
<#
break;
default:
#>
{{{data_img}}}
{{{before_url}}}
<div class="overlay-effects">
{{{data_title}}}
</div>
{{{after_url}}}
<#
break;
} #>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.single_img.refresh( wrp );
}
#>

View File

@@ -0,0 +1,78 @@
<#
if( typeof( data ) == 'undefined' )
data = {};
var output = '',
icon_wrap_class = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
custom_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
has_link = false,
icon = label = link = link_title = link_target = link_url = color = bg_color = style = '',
css_class = kc.front.el_class( atts ),
link_attr = [];
try{
var icons = JSON.parse( kc.tools.base64.decode( atts['icons'] ).toString().replace( /\%SITE\_URL\%/g, kc_site_url ) );
}catch(ex){
var icons = atts['icons'];
}
css_class.push( 'kc-multi-icons-wrapper' );
if( custom_class !== '')
css_class.push( custom_class );
#>
<div class="{{{css_class.join(' ')}}}">
<#
for( var i in icons ){
item = icons[i];
link_att = [];
icon_att = [];
icon = item['icon'];
label = item['label'];
color = item['color'];
bg_color = item['bg_color'];
link = ( item['link'] !== undefined )? item['link'] : '||';
if( icon == '' )
icon = 'fa-leaf';
link = link.split('|');
link_target = '_blank';
link_url = '#';
link_title = label;
if( link[0] !== undefined && link[0] !== '' ){
link_url = link[0];
}
if( link[1] !== undefined && link[1] !== '' )
link_title = link[1];
if( link[2] !== undefined && link[2] !== '' )
link_target = link[2];
link_att.push( 'href="' + link_url + '"' );
link_att.push( 'target="' + link_target + '"' );
link_att.push( 'title="' + link_title + '"' );
link_att.push( 'class="multi-icons-link multi-icons' + icon + '"' );
style = '';
icon_att.push('class="' + icon + '"');
if( color !== '' )
icon_att.push('style="color:' + color + ';"');
if( bg_color !== '' )
link_att.push( 'style="background-color:' + bg_color + ';"' );
#>
<a {{{link_att.join(' ')}}}>
<i {{{icon_att.join(' ')}}}></i>
</a>
<# } #>
</div>

View File

@@ -0,0 +1,107 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
custom_class = 'piechart_'+parseInt( Math.random()*1000000 ),
custom_size = 120,
barcolor = '#39c14f',
trackcolor = '#e4e4e4',
percent = 85,
rounded_corners_bar = '',
icon_option = '',
title = '',
description = '',
wrap_class = '',
tmp_class = '',
element_attributes = [],
size = 120,
auto_width = 'no',
linewidth = 10,
css_classes = [ 'kc_shortcode', 'kc_piechart', custom_class ],
icon = '';
tmp_class = kc.front.el_class( atts );
tmp_class.push( wrap_class );
wrap_class = tmp_class.join( ' ' );
if( atts['title'] !== undefined && atts['title'] !== '' )
title = '<h3>' + atts['title'] + '</h3>';
if( atts['icon'] !== undefined && atts['icon'] !== '' )
icon = atts['icon'];
if( atts['icon_option'] !== undefined && atts['icon_option'] !== '' )
icon_option = atts['icon_option'];
if( atts['description'] !== undefined && atts['description'] !== '' )
description = '<p>' + kc.tools.base64.decode( atts['description'] ) + '</p>';
if( atts['percent'] !== undefined && atts['percent'] !== '' )
percent = atts['percent'];
if( atts['linewidth'] !== undefined && atts['linewidth'] !== '' )
linewidth = atts['linewidth'];
if( atts['rounded_corners_bar'] !== undefined && atts['rounded_corners_bar'] !== '' )
rounded_corners_bar = atts['rounded_corners_bar'];
if( atts['custom_size'] !== undefined && atts['custom_size'] !== '' )
custom_size = atts['custom_size'];
if( atts['barcolor'] !== undefined && atts['barcolor'] !== '' )
barcolor = atts['barcolor'];
if( atts['trackcolor'] !== undefined && atts['trackcolor'] !== '' )
trackcolor = atts['trackcolor'];
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
wrap_class = atts['wrap_class'];
if( atts['size'] !== undefined && atts['size'] !== '' && atts['size'] !== 'custom' )
size = atts['size'];
else
size = custom_size;
if( size > 1000 )
size = 1000;
if( atts['auto_width'] !== undefined && atts['auto_width'] == 'yes' )
{
auto_width = 'yes';
css_classes.push( 'auto_width' );
}
element_attributes.push( 'data-size="' + size + '"' );
element_attributes.push( 'data-percent="' + percent + '"' );
element_attributes.push( 'data-linecap="' + rounded_corners_bar + '"' );
element_attributes.push( 'data-barcolor="' + barcolor + '"' );
element_attributes.push( 'data-trackcolor="' + trackcolor + '"' );
element_attributes.push( 'data-autowidth="' + auto_width + '"' );
element_attributes.push( 'data-linewidth="' + linewidth + '"' );
element_attributes.push( 'class="' + css_classes.join(' ') + '"' );
var lineHeight = parseInt(size) + (parseInt( linewidth )*2 );
#>
<div class="kc-pie-chart-wrapper {{wrap_class}}">
<div class="kc-pie-chart-holder">
<span {{{element_attributes.join(' ')}}}>
<span class="pie_chart_percent">
<# if( icon_option == 'yes' ){ #>
<i class="{{{icon}}} pie_chart_icon"></i>
<# } #>
<span class="percent"></span>
</span>
</span>
</div>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.piechar.update( wrp );
}
#>

View File

@@ -0,0 +1,218 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
desc = ( atts['desc'] !== undefined )? kc.tools.base64.decode( atts['desc'] ) : '',
show_icon_header = ( atts['show_icon_header'] !== undefined )? atts['show_icon_header'] : '',
icon_header = ( atts['icon_header'] !== undefined && atts['icon_header'] !== '__empty__' )? atts['icon_header'] : 'fa-rocket',
price = ( atts['price'] !== undefined )? atts['price'] : '',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' )? atts['title'] : '',
subtitle = ( atts['subtitle'] !== undefined && atts['subtitle'] !== '__empty__' )? atts['subtitle'] : '',
el_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
currency = ( atts['currency'] !== undefined )? atts['currency'] : '',
show_on_top = ( atts['show_on_top'] !== undefined )? atts['show_on_top'] : '',
duration = ( atts['duration'] !== undefined )? atts['duration'] : '',
show_icon = ( atts['show_icon'] !== undefined )? atts['show_icon'] : '',
icon = ( atts['icon'] !== undefined && atts['icon'] !== '__empty__')? atts['icon'] : 'fa-check',
button_text = ( atts['button_text'] !== undefined )? atts['button_text'] : '||',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '||',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
link_url = '#',
data_icon_header = '',
data_title = '',
data_price = '',
data_currency = '',
data_duration = '',
data_desc = '',
data_button = '',
link_arr = [],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-pricing-tables');
wrap_class.push( 'kc-pricing-layout-' + layout );
if ( el_class !== '' )
wrap_class.push( el_class );
if ( show_on_top === 'yes' )
wrap_class.push( 'kc-price-before-currency' );
if ( show_icon_header === 'yes' ) {
data_icon_header += '<div class="content-icon-header">';
data_icon_header += '<i class="' + icon_header + '"></i>';
data_icon_header += '</div>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
if ( subtitle !== '' ) {
data_title += '<div>' + title + '</div>';
data_title += '<div class="content-sub-title">' + subtitle + '</div>';
} else {
data_title += title;
}
data_title += '</div>';
}
if ( price !== '' ) {
data_price += '<span class="content-price">' + price + '</span>';
}
if ( currency !=='' ) {
data_currency += '<span class="content-currency">' + currency + '</span>';
}
if ( duration !== '' ) {
data_duration += '<span class="content-duration">' + duration + '</span>';
}
if ( desc !== '' ) {
var pros = desc.split("\n");
if( pros.length > 0 ) {
data_desc += '<ul class="content-desc">';
for( var i=0; i < pros.length ; i++) {
if ( show_icon === 'yes' ) {
data_desc += '<li><i class="' + icon + '"></i> ' + pros[i] + ' </li>';
} else {
data_desc += '<li>' + pros[i] + ' </li>';
}
}
data_desc += '</ul>';
}
}
if ( show_button === 'yes' ) {
if ( button_link !== '' ) {
link_arr = button_link.split('|');
if ( link_arr[0] !== undefined )
link_url = link_arr[0];
else
link_url = '#';
}
data_button += '<div class="content-button">';
data_button += '<a href="' + link_url + '">' + button_text + '</a>';
data_button += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( parseInt( layout ) ) {
case 2:
#>
<div class="header-pricing">
{{{data_title}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
break;
case 3:
#>
{{{data_title}}}
{{{data_desc}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
{{{data_button}}}
<#
break;
case 4:
#>
<div class="header-pricing">
{{{data_icon_header}}}
{{{data_title}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
break;
default:
#>
<div class="header-pricing">
{{{data_title}}}
{{{data_icon_header}}}
<div class="kc-pricing-price">
<# if ( show_on_top === 'yes' ) { #>
{{{data_price}}}
{{{data_currency}}}
{{{data_duration}}}
<# } else { #>
{{{data_currency}}}
{{{data_price}}}
{{{data_duration}}}
<# } #>
</div>
</div>
{{{data_desc}}}
{{{data_button}}}
<#
}
#>
</div>

View File

@@ -0,0 +1,112 @@
<#
var output = '',
element_attributes = [], el_classes = [ ],
atts = ( data.atts !== undefined ) ? data.atts : {},
radius = '',
speed = 2000,
margin = 20,
progress_bar_color_default = '#999999',
value_color_style = '',
label_color_style = '';
el_classes = kc.front.el_class( atts );
el_classes.push( 'kc_shortcode' );
el_classes.push( 'kc_progress_bars' );
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
el_classes.push( atts['wrap_class'] );
if( atts['radius'] !== undefined && atts['radius'] !== '' )
radius = atts['radius'];
if( atts['speed'] !== undefined && atts['speed'] !== '' )
speed = atts['speed'];
var style = ( atts['style'] !== undefined ) ? atts['style'] : 1;
try{
var options = JSON.parse( kc.tools.base64.decode( atts['options'] ).toString().replace( /\%SITE\_URL\%/g, kc_site_url ) );
}catch(ex){
var options = atts['options'];
}
element_attributes.push( 'class="'+el_classes.join(' ')+'"' );
element_attributes.push( 'data-style="'+style+'"' );
output += '<div ' + element_attributes.join(' ') + '>';
if( atts['title'] !== undefined && atts['title'] !== '' )
output += '<h3>'+atts['title']+'</h3>';
if( options !== null ){
for( var n in options ){
var value = ( options[n]['value'] !== undefined && options[n]['value'] !== '' ) ? options[n]['value'] : 50,
label = ( options[n]['label'] !== undefined && options[n]['label'] !== '' ) ? options[n]['label'] : 'Label default',
prob_color = ( options[n]['prob_color'] !== undefined && options[n]['prob_color'] !== '' ) ? options[n]['prob_color'] : '',
prob_style = '',
value_color_style = '';
if( prob_color != '')
{
prob_style += 'background-color: '+prob_color+';';
}
prob_style += 'width: '+atts['progress_animate']+'%';
if( options[n]['value_color'] !== undefined && options[n]['value_color'] !== '' ){
value_color_style = ' style="color: '+options[n]['value_color']+'"';
}
prob_track_attributes = [];
prob_attributes = [];
//Progress bars track attributes
prob_track_css_classes = [
'kc-ui-progress-bar',
'kc-ui-progress-bar'+style,
'kc-progress-bar',
'kc-ui-container',
];
if( radius == 'yes' )
prob_track_css_classes.push( 'kc-progress-radius' );
prob_track_attributes.push( 'class="'+prob_track_css_classes.join(' ')+'"' );
//Progress bars attributes
prob_css_classes = [ 'kc-ui-progress', 'kc-ui-progress'+style ];
var prob_css_class = prob_css_classes.join(' ');
prob_attributes.push( 'class="'+prob_css_class+'"' );
prob_attributes.push( 'style="'+prob_style+'"' );
output +='<div class="progress-item">';
output += '<span class="label">'+label+'</span>';
output += '<div '+prob_track_attributes.join(' ')+'>';
output += '<div '+prob_attributes.join(' ')+' data-value="'+value+'" data-speed="'+speed+'">';
output += '<div class="ui-label"><span class="value" '+value_color_style+'>'+value+'%</span></div>';
output += '</div>';
output += '</div>';
output += '</div>';
}
}
output += '</div>';
data.callback = function( wrp, $ ){
kc_front.refresh( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,108 @@
<#
if( data === undefined )
data = {};
var attributes = [], classes = [],
cont_class = ['kc-row-container'],
css_data = '', output = '',
atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_row' );
if( atts['row_class'] !== undefined && atts['row_class'] !== '' )
classes.push( atts['row_class'] );
if( atts['full_height'] !== undefined && atts['full_height'] !== '' ){
if( atts['content_placement'] !== undefined && atts['content_placement'] == 'middle' )
attributes.push( 'data-kc-fullheight="middle-content"' );
else attributes.push( 'data-kc-fullheight="true"' );
}
if( atts['column_align'] === undefined || atts['column_align'] === '' )
atts['column_align'] = 'center';
if( atts['equal_height'] !== undefined && atts['equal_height'] !== '' ){
attributes.push( 'data-kc-equalheight="true"' );
attributes.push( 'data-kc-equalheight-align="' + atts['column_align'] + '"' );
}
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
cont_class.push( 'kc-container' );
if( atts['container_class'] !== undefined && atts['container_class'] !== '' )
cont_class.push( atts['container_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
classes .push( atts['css'].split('|')[0] );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
css_data += 'position: relative;';
if( atts['video_options'] !== undefined ){
attributes.push('data-kc-video-options="'+atts['video_options']+'"');
}
}
}
if( atts['row_id'] !== undefined && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['force'] !== undefined && atts['force'] == 'yes' ){
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
attributes.push( 'data-kc-fullwidth="row"' );
else
attributes.push( 'data-kc-fullwidth="content"' );
}
if( atts['video_bg_url'] === undefined || atts['video_bg'] !== 'yes' )
{
if( atts['parallax'] !== undefined )
{
attributes.push( 'data-kc-parallax="true"' );
if( atts['parallax'] == 'yes-new' )
{
var bg_image = '<?php echo admin_url('/admin-ajax.php?action=kc_get_thumbn&size=full&id='); ?>'+atts['parallax_image'];
css_data += "background-image:url('"+bg_image+"');";
}
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
if( css_data !== '' )
attributes.push( 'style="'+css_data+'"' );
output += '<section '+attributes.join(' ')+'>';
output += '<div class="'+cont_class.join(' ')+'">';
output += '<div class="kc-wrap-columns">'+data.content+'</div>';
output += '</div>';
output += '</section>';
data.callback = function( wrp, $ ){
kc_front.init( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,62 @@
<#
var output = '', atts = ( data.atts !== undefined ) ? data.atts : {},
css_classes = [], attributes = [];
css_classes = kc.front.el_class( atts );
css_classes.push( 'kc_row' );
css_classes.push( 'kc_row_inner' );
if( undefined !== atts['row_class'] && atts['row_class'] !== '' )
css_classes.push( atts['row_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
css_classes.push( atts['css'].split('|')[0] );
if( undefined !== atts['row_id'] && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
css_classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
if( atts['video_options'] !== undefined ){
attributes.push('data-kc-video-options="'+atts['video_options']+'"');
}
}
}
attributes.push( 'class="'+css_classes.join(' ')+'"' );
if( atts['column_align'] === undefined || atts['column_align'] === '' )
atts['column_align'] = 'center';
if( undefined !== atts['equal_height'] && atts['equal_height'] !== '' )
{
attributes.push( 'data-kc-equalheight="true"' );
attributes.push( 'data-kc-row-action="true"' );
attributes.push( 'data-kc-equalheight-align="' + atts['column_align'] + '"' );
}
output += '<div '+attributes.join(' ')+'>';
if( undefined !== atts['row_class_container'] && atts['row_class_container'] !== '' )
output += '<div class="'+atts['row_class_container']+'">';
output += data.content;
if( undefined !== atts['row_class_container'] && atts['row_class_container'] !== '' )
output += '</div>';
output += '</div>';
#>
{{{output}}}

View File

@@ -0,0 +1,91 @@
<#
if( data === undefined )
data = {};
var attributes = [], classes = [],
cont_class = ['kc-row-container'],
css_data = '', output = '',
atts = ( data.atts !== undefined ) ? data.atts : {};
classes = kc.front.el_class( atts );
classes.push( 'kc_row' );
if( atts['row_class'] !== undefined && atts['row_class'] !== '' )
classes.push( atts['row_class'] );
if( atts['full_height'] !== undefined && atts['full_height'] !== '' ){
if( atts['content_placement'] !== undefined && atts['content_placement'] == 'middle' )
attributes.push( 'data-kc-fullheight="middle-content"' );
else attributes.push( 'data-kc-fullheight="true"' );
}
if( atts['equal_height'] !== undefined && atts['equal_height'] !== '' ){
attributes.push( 'data-kc-equalheight="true"' );
}
if( atts['use_container'] !== undefined && atts['use_container'] == 'yes' )
cont_class.push( 'kc-container' );
if( atts['container_class'] !== undefined && atts['container_class'] !== '' )
cont_class.push( atts['container_class'] );
if( atts['css'] !== undefined && atts['css'] !== '' )
classes .push( atts['css'].split('|')[0] );
if( atts['video_bg'] !== undefined && atts['video_bg'] === 'yes' ){
var video_bg_url = atts['video_bg_url'];
if( atts['video_bg_url'] !== undefined ){
classes.push('kc-video-bg');
attributes.push('data-kc-video-bg="'+atts['video_bg_url']+'"');
css_data += 'position: relative;';
}
}
if( atts['row_id'] !== undefined && atts['row_id'] !== '' )
attributes.push( 'id="'+atts['row_id']+'"' );
if( atts['video_bg_url'] === undefined || atts['video_bg'] !== 'yes' )
{
if( atts['parallax'] !== undefined )
{
attributes.push( 'data-kc-parallax="true"' );
if( atts['parallax'] == 'yes-new' )
{
var bg_image = '<?php echo admin_url('/admin-ajax.php?action=kc_get_thumbn&size=full&id='); ?>'+atts['parallax_image'];
css_data += "background-image:url('"+bg_image+"');";
}
}
}
attributes.push( 'class="'+classes.join(' ')+'"' );
if( css_data !== '' )
attributes.push( 'style="'+css_data+'"' );
output += '<div '+attributes.join(' ')+'>';
output += '<div class="'+cont_class.join(' ')+'">';
output += '<div class="kc-wrap-columns">'+data.content+'</div>';
output += '</div>';
output += '</div>';
data.callback = function( wrp, $ ){
kc_front.init( wrp );
}
#>
{{{output}}}

View File

@@ -0,0 +1,147 @@
<#
var output = '',
atts = ( data.atts !== undefined ) ? data.atts : {},
default_src = kc_url + "/assets/images/get_start.jpg",
element_attributes = [],
image_attributes = [],
css_classes = kc.front.el_class( atts ),
image_classes = [],
image_url = '';
image_full = '';
link = '',
target = '',
title_link = '',
overlay_html = '',
image_id = ( atts['image'] !== undefined ) ? atts['image'] : '',
overlay = ( atts['overlay'] !== undefined ) ? atts['overlay'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : 'fa-plus',
image_size = ( atts['image_size'] !== undefined ) ? atts['image_size'] : '',
on_click_action = ( atts['on_click_action'] !== undefined ) ? atts['on_click_action'] : '',
image_source = ( atts['image_source'] !== undefined ) ? atts['image_source'] : '',
caption = ( atts['caption'] !== undefined && atts['caption'] !== '__empty__' ) ? atts['caption'] : '',
alt = ( atts['alt'] !== undefined && atts['alt'] !== '__empty__' ) ? atts['alt'] : '',
image_wrap = 'yes',
data_lightbox = '',
sizes = ['full', 'thumbnail', 'medium', 'large'];
css_classes.push( 'kc_shortcode' );
css_classes.push( 'kc_single_image' );
if ( atts['class'] !== undefined && atts['class'] !== '' )
css_classes.push( atts['class'] );
if ( atts['ieclass'] !== undefined )
image_classes.push( atts['ieclass'] );
if( image_source == 'external_link' ) {
var image_full = ( atts['image_external_link'] !== undefined ) ? atts['image_external_link'] : '',
image_url = image_full,
size = ( atts['image_size_el'] !== undefined ) ? atts['image_size_el'] : 'full';
if( image_url !== '' )
image_attributes.push( 'src="' + image_url + '"' );
else
image_attributes.push( 'src="' + default_src + '"' );
if( image_full == '' )
image_full = default_src;
var regx = /(\d+)x(\d+)/;
if ( result = regx.exec( size ) ) {
var width = result[1],
height = result[2];
image_attributes.push( 'width="' + width + '"' );
image_attributes.push( 'height="' + height + '"' );
}
} else {
if( image_source == 'media_library' )
{
//image_id = image_id.replace( /[^\d]/, '' );
}
else
{
image_id = kc_post_thumnail_ID;
}
image_full = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image_id;
if ( sizes.indexOf( image_size ) > -1 ) {
image_url = ajaxurl + '?action=kc_get_thumbn&id=' + image_id + '&size=' + image_size ;
}else if( image_size.indexOf('x') > 0 ){
image_url = ajaxurl + '?action=kc_get_thumbn_size&id=' + image_id + '&size=' + image_size ;
}
if( image_url !== '' ) {
image_attributes.push('src="' + image_url + '"');
} else {
image_attributes.push('src="' + default_src + '"');
image_classes.push('kc_image_empty');
}
if( image_full === '' )
image_full = default_src;
}
image_attributes.push( 'class="' + image_classes.join(' ') + '"' );
if( alt !== '' )
image_attributes.push( 'alt="' + alt + '"');
else
image_attributes.push( 'alt=""' );
title_link = alt;
target = '_self';
if( on_click_action == 'lightbox' )
{
data_lightbox = 'rel="prettyPhoto" class="kc-pretty-photo"';
}
else if( on_click_action == 'open_custom_link' )
{
link = atts['custom_link'];
link = link.split('|');
if( link[0] !== undefined )
image_full = link[0];
if( link[1] !== undefined )
title_link = link[1];
if( link[2] !== undefined )
target= link[2];
}
element_attributes.push('class="' + css_classes.join(' ') + '"');
//overlay layer
if( overlay === 'yes' )
overlay_html = '<div class="kc-image-overlay"><i class="' + icon + '"></i></div>';
if( on_click_action !== '' ) {
output += '<a ' + data_lightbox + ' href="' + image_full + '" title="' + title_link + '"><img ' + image_attributes.join(' ') + ' target="' + target + '" />' + overlay_html +'</a>';
} else {
output += '<img ' + image_attributes.join(' ') + '/>' + overlay_html;
}
if( caption !== '' ){
output += '<p class="scapt">' + caption + '</p>';
}
#>
<div {{{element_attributes.join(' ')}}}>
{{{output}}}</div>
<#
data.callback = function( wrp, $ ){
kc_front.single_img.refresh( wrp );
}
#>

View File

@@ -0,0 +1,16 @@
<#
if( data === undefined )
data = {};
var el_class = kc.front.el_class( atts ), height = 0,
atts = ( data.atts !== undefined ) ? data.atts : {};
if( atts['class'] !== undefined )
el_class.push(atts['class']);
if( atts['height'] !== undefined )
height = parseInt( atts['height'] );
#>
<div class="{{{el_class.join(' ')}}}" style="height: {{{height}}}px; clear: both; width:100%;"></div>

View File

@@ -0,0 +1,27 @@
<#
var output = '', css_class = [],
atts = ( data.atts !== undefined ) ? data.atts : {};
css_class = kc.front.el_class( atts );
css_class.push( 'kc_tab' );
css_class.push( 'ui-tabs-panel' );
css_class.push( 'kc_ui-tabs-hide' );
css_class.push( 'kc_clearfix' );
if ( atts['tab_id'] !== undefined && atts['tab_id'] !== '' ){
tab_id = kc.tools.esc_slug( atts['title'] );
}else{
tab_id = atts['tab_id'];
}
if ( atts['class'] !== undefined && atts['class'] !== '' )
css_class.push( atts['class'] );
if( data.content === undefined )
data.content = '';
data.content += '<div class="kc-element drag-helper" data-model="-1" droppable="true" draggable="true"><a href="javascript:void(0)" class="kc-add-elements-inner"><i class="sl-plus kc-add-elements-inner"></i></a></div>';
#><div id="{{tab_id}}" class="{{{css_class.join(' ')}}}"><div class="kc_tab_content">{{{data.content}}}</div></div>

View File

@@ -0,0 +1,85 @@
<#
var output = '', tabs_option = {}, tabs_option_data = [], tab_nav_class = '', atts = ( data.atts !== undefined ) ? data.atts : {}, css_class = [];
tabs_option['open-on-mouseover'] = (atts['open_mouseover'] !== undefined) ? atts['open_mouseover'] : '';
tabs_option['tab-active'] = (atts['active_section'] !== undefined) ? atts['active_section'] : '';
tabs_option['effect-option'] = (atts['effect_option'] !== undefined) ? atts['effect_option'] : '';
for( var n in tabs_option ){
tabs_option_data.push( 'data-'+n+'="'+tabs_option[n]+'"' );
}
css_class = kc.front.el_class( atts );
css_class.push( 'kc_tabs' );
css_class.push( 'group' );
if( undefined !== atts['css'] && atts['css'] !== '' )
css_class.push( atts['css'].split('|')[0] );
if( undefined !== atts['class'] && atts['class'] !== '' )
css_class.push( atts['class'] );
if( undefined !== atts['type'] && atts['type'] == 'vertical_tabs' )
{
css_class.push( 'kc_vertical_tabs' );
if( undefined !== atts['vertical_tabs_position'] && atts['vertical_tabs_position'] == 'right' )
css_class.push( 'tabs_right' );
}
else if( atts['type'] == 'slider_tabs' ){
css_class.push( 'kc-tabs-slider' );
var owl_option = jQuery().extend({
'items' : 1,
'tablet' : 1,
'mobile' : 1,
'speed' : 450,
'navigation' : false,
'pagination' : true,
'autoheight' : false,
'autoplay' : false
}, atts );
owl_option = JSON.stringify( owl_option );
}
else{
tab_nav_class = 'kc_tabs_nav';
}
data.callback = function( wrp ){ kc_front.tabs( wrp ) };
if( undefined !== atts['type'] && atts['type'] == 'slider_tabs' ){
#><div class="{{css_class.join(' ')}}"><#
if( atts['title_slider'] !== undefined && atts['title_slider'] == 'yes' ){
#><ul class="kc-tabs-slider-nav kc_clearfix">{{{kc.front.ui.process_tab_titles(data)}}}</ul><#
}
#><div class="owl-carousel" data-owl-options="{{owl_option}}">{{{data.content}}}</div></div><#
}else{
#><div class="{{css_class.join(' ')}}" {{{tabs_option_data.join(' ')}}}>
<div class="kc_wrapper ui-tabs kc_clearfix">
<ul class="{{tab_nav_class}} ui-tabs-nav kc_clearfix">
{{{kc.front.ui.process_tab_titles(data)}}}
</ul>
<#
#>{{{data.content}}}</div></div><#
}
#>

View File

@@ -0,0 +1,145 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
desc = ( atts['desc'] !== undefined )? kc.tools.base64.decode( atts['desc'] ) : '',
subtitle = ( atts['subtitle'] !== undefined && atts['subtitle'] !== '__empty__' )? atts['subtitle'] : '',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' )? atts['title'] : '',
image = ( atts['image'] !== undefined )? atts['image'] : '',
el_class = ( atts['custom_class'] !== undefined )? atts['custom_class'] : '',
img_size = ( atts['img_size'] !== undefined )? atts['img_size'] : 'full',
show_button = ( atts['show_button'] !== undefined )? atts['show_button'] : '',
button_link = ( atts['button_link'] !== undefined )? atts['button_link'] : '||',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__')? atts['button_text'] : '',
layout = ( atts['layout'] !== undefined )? atts['layout'] : '1',
data_img = '',
img_link = '',
button_link_text = '',
data_title = '',
data_desc = '',
data_subtitle = '',
data_socials = '',
socials = '',
data_button = '',
icon = '',
social_list = ['facebook', 'twitter', 'google_plus', 'linkedin', 'pinterest', 'flickr', 'instagram', 'dribbble', 'reddit', 'email'],
sizes = ['full', 'thumbnail', 'medium', 'large'],
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-team' );
wrap_class.push( 'kc-team-' + layout ) ;
if ( el_class !== '' )
wrap_class.push( el_class );
if ( image != '' ) {
//image = image.replace( /[^\d]/, '' );
if ( sizes.indexOf( img_size ) < 0 ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=' + img_size + '&id=' + image;
}
data_img += '<figure class="content-image">';
data_img += '<img src="' + img_link + '" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
data_title += title;
data_title += '</div>';
}
if ( desc !=='' ) {
data_desc += '<div class="content-desc">';
data_desc += desc;
data_desc += '</div>';
}
if ( subtitle !== '' ) {
data_subtitle += '<div class="content-subtitle">';
data_subtitle += subtitle;
data_subtitle += '</div>';
}
if ( show_button === 'yes' ) {
if ( button_link !== '' ) {
button_link_text = button_link.split('|');
button_link = button_link_text[0];
}
if( button_text === '' )
button_text = "<?php echo __( 'Readmore', 'kingcomposer' );?>";
data_button += '<div class="content-button">';
data_button += '<a href="' + button_link + '">' + button_text + '</a>';
data_button += '</div>';
}
for (var i = 0; i < social_list.length; i++) {
if( atts[social_list[i]] !== undefined && atts[social_list[i]] !== '__empty__' ){
icon = social_list[i];
icon = icon.replace('_', '-');
icon = icon.replace('email', 'envelope-o');
data_socials += '<a href="' + atts[social_list[i]] + '" target="_blank"><i class="fa-' + icon + '"></i></a>';
}
}
if( data_socials !== '' )
data_socials = '<div class="content-socials">' + data_socials + '</div>';
#>
<div class="{{{wrap_class.join(' ')}}}">
<#
switch ( parseInt( layout ) ) {
case 2:
#>
{{{data_img}}}
<div class="box-right">
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_socials}}}
</div>
<#
break;
case 3:
#>
{{{data_img}}}
<div class="overlay">
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_button}}}
{{{data_socials}}}
</div>
<#
break;
default:
#>
{{{data_img}}}
{{{data_title}}}
{{{data_subtitle}}}
{{{data_desc}}}
{{{data_socials}}}
{{{data_button}}}
<#
}
#>
</div>

View File

@@ -0,0 +1,117 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
title = ( atts['title'] !== undefined && atts['title'] !== '__empty__' ) ? atts['title'] : '',
desc = ( atts['desc'] !== undefined && atts['desc'] !== '__empty__' ) ? kc.tools.base64.decode( atts['desc']) : '',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full',
position = ( atts['position'] !== undefined && atts['position'] !== '__empty__' ) ? atts['position'] : '',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
data_title = '',
data_desc = '',
data_img = '',
data_position = '',
wrap_class = [];
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-testimo kc-testi-layout-' + layout );
if ( custom_class !=='' ) {
wrap_class.push( custom_class );
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=' + img_size + '&id=' + image;
}
data_img += '<figure class="content-image">';
data_img += '<img src="' + img_link + '" alt="">';
data_img += '</figure>';
}
if ( title !== '' ) {
data_title += '<div class="content-title">';
data_title += title;
data_title += '</div>';
}
if ( desc !=='' ) {
data_desc += '<div class="content-desc">';
data_desc += desc;
data_desc += '</div>';
}
if ( position !== '' ) {
data_position += '<div class="content-position">';
data_position += position;
data_position += '</div>';
}
#>
<div class="{{{wrap_class.join(' ')}}}">
<# switch ( layout ) {
case '2':
#>
{{{data_title}}}
{{{data_position}}}
{{{data_desc}}}
<#
break;
case '3':
#>
{{{data_img}}}
{{{data_title}}}
{{{data_position}}}
{{{data_desc}}}
<#
break;
case '4':
#>
{{{data_img}}}
<div class="box-right">
{{{data_desc}}}
{{{data_position}}}
{{{data_title}}}
</div>
<#
break;
case '5':
#>
{{{data_desc}}}
{{{data_img}}}
<div class="box-right">
{{{data_title}}}
{{{data_position}}}
</div>
<#
break;
default:
#>
{{{data_img}}}
{{{data_desc}}}
{{{data_title}}}
{{{data_position}}}
<#
break;
} #>
</div>

View File

@@ -0,0 +1,44 @@
<#
var output = '',
wrap_class = [],
classes = ['kc_title'],
wrp_class = [],
type = 'h1',
atts = ( data.atts !== undefined ) ? data.atts : {},
text = ( atts['text'] !== undefined )? kc.tools.base64.decode( atts['text'] ) : '',
post_title = ( atts['post_title'] !== undefined )? atts['post_title'] : 'no',
after = ( atts['after'] !== undefined )? kc.tools.base64.decode( atts['after'] ) : '',
before = ( atts['before'] !== undefined )? kc.tools.base64.decode( atts['before'] ) : '';
wrap_class = kc.front.el_class( atts );
wrap_class.push( 'kc-title-wrap' );
if( atts['class'] !== undefined && atts['class'] !== '' )
classes.push( atts['class'] );
if( atts['type'] !== undefined && atts['type'] !== '' )
type = atts['type'];
if ( atts['title_wrap'] == 'yes' && atts['title_wrap_class'] !== undefined )
wrap_class.push(atts['title_wrap_class']);
if ( post_title === 'yes')
text = kc_post_title;
#>
<div class="{{{wrap_class.join(' ')}}}">
<# if ( atts['title_wrap'] == 'yes' ){ #>
<# if ( atts['before'] !== undefined ){ #>{{{before}}}<# } #>
<{{{type}}} class="{{{classes.join(' ')}}}">{{{text}}}</{{{type}}}>
<# if ( atts['after'] !== undefined ){#>{{{after}}}<#}#>
<# } else{ #>
<{{{type}}} class="{{{classes.join(' ')}}}">{{{text}}}</{{{type}}}>
<# } #>
</div>

View File

@@ -0,0 +1,125 @@
<#
if( data === undefined )
var data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
layout = ( atts['layout'] !== undefined ) ? atts['layout'] : '1',
position = ( atts['position'] !== undefined ) ? atts['position'] : '',
icon = ( atts['icon'] !== undefined ) ? atts['icon'] : '',
text_tooltip = ( atts['text_tooltip'] !== undefined && atts['text_tooltip'] !== '__empty__' ) ? kc.tools.base64.decode( atts['text_tooltip']) : '',
image = ( atts['image'] !== undefined ) ? atts['image'] : '',
img_size = ( atts['img_size'] !== undefined ) ? atts['img_size'] : 'full',
button_text = ( atts['button_text'] !== undefined && atts['button_text'] !== '__empty__' ) ? atts['button_text'] : '',
button_link = ( atts['button_link'] !== undefined ) ? atts['button_link'] : '||',
custom_class = ( atts['custom_class'] !== undefined ) ? atts['custom_class'] : '',
data_icon = '',
data_button = '',
data_img = '',
data_position = '',
img_link = '',
button_title = '',
button_target = '',
button_link_text = '',
button_attr = [],
main_class = ['kc_tooltip'],
wrapper_class = kc.front.el_class( atts );
wrapper_class.push( 'kc-popover-tooltip' );
if ( custom_class !== '' )
wrapper_class.push( custom_class );
main_class.push( 'style' + layout );
if ( icon !== '' ) {
data_icon += '<i class="' + icon + ' fati17"></i>';
}
if ( image !='' ) {
//image = image.replace( /[^\d]/, '' );
if ( img_size !== 'full' ) {
img_link = ajaxurl + '?action=kc_get_thumbn_size&id=' + image + '&size=' + img_size ;
} else {
img_link = ajaxurl + '?action=kc_get_thumbn&size=full&id=' + image;
}
}else{
img_link = kc_url + "/assets/images/get_start_s.jpg";
}
data_img += '<img src="' + img_link + '" alt="">';
button_attr.push( 'class="kc_tooltip style3"' );
button_attr.push( 'data-tooltip="true"' );
button_attr.push( 'data-position="' + position + '"' );
if ( button_link !== '' ) {
button_link_text = button_link.split('|');
button_link = button_link_text[0];
if ( button_link_text[1] !== undefined )
button_title = button_link_text[1];
if ( button_link_text[2] !== undefined )
button_target = button_link_text[2];
} else {
button_link = '#';
}
button_attr.push( 'href="' + button_link + '"' );
if ( button_title !== '' )
button_attr.push( 'title="' + button_title + '"' );
if ( button_target !== '' )
button_attr.push( 'target="' + button_target + '"' );
if( button_text === '' )
button_text = "<?php echo __( 'Read More', 'kingcomposer' );?>";
data_button += '<a ' + button_attr.join(' ') + '>' + button_text + '<span>' + text_tooltip + '</span></a>';
#>
<div class="{{{wrapper_class.join(' ')}}}">
<#
switch ( layout ) {
case '2':
#>
<div class="{{{main_class.join(' ')}}}" data-tooltip="true" data-position="{{{position}}}">
{{{data_img}}}
<span>{{{text_tooltip}}}</span>
</div>
<#
break;
case '3':
#>
<div class="content-button">
{{{data_button}}}
</div>
<#
break;
default:
#>
<div class="{{{main_class.join(' ')}}}" data-tooltip="true" data-position="{{{position}}}">
{{{data_icon}}}
<span>{{{text_tooltip}}}</span>
</div>
<#
}
#>
</div>
<#
data.callback = function( wrp, $ ){
kc_front.tooltips( wrp );
}
#>

View File

@@ -0,0 +1,39 @@
<#
if( data === undefined )
data = {};
var atts = ( data.atts !== undefined ) ? data.atts : {},
video_height = 250,
video_width = '100%',
video_info = '',
el_classess = [];
el_classess = kc.front.el_class( atts );
el_classess.push( 'kc_shortcode' );
el_classess.push( 'kc_video_play' );
el_classess.push( 'kc_video_wrapper' );
if( atts['wrap_class'] !== undefined && atts['wrap_class'] !== '' )
el_classess.push( atts['wrap_class'] );
if( atts['video_height'] !== undefined && atts['video_height'] !== '' )
video_height = parseInt( atts['video_height'] );
if( atts['video_width'] !== undefined && atts['video_width'] !== '' )
video_width = parseInt( atts['video_width'] )+'px';
if( atts['title'] !== undefined && atts['title'] !== '' )
video_info += '<h3>'+atts['title']+'</h3>';
if( atts['description'] !== undefined && atts['description'] !== '' )
video_info += '<p>'+kc.tools.base64.decode( atts['description'] )+'</p>';
#>
<div class="{{{el_classess.join(' ')}}}">
<div style="height:{{video_height}}px;width:{{video_width}};" class="disable-view-element">
<h3>For best perfomance, the video player has been disabled in this editing mode.</h3>
</div>
<div class="video-info">{{{video_info}}}</div>
</div>