Version Description
Download this release
Release Info
Developer | niteo |
Plugin | CMP – Coming Soon & Maintenance Plugin by NiteoThemes |
Version | 2.4.2 |
Comparing to | |
See all releases |
Code changes from version 2.4.1 to 2.4.2
- css/cmp-admin-head.css +1 -1
- inc/class-cmp-render_html.php +199 -168
- inc/{preview-iframe.php → preview-selector.php} +0 -0
- inc/settings/settings-slider.php +13 -4
- js/external/anime.min.js +33 -0
- js/external/imagesloaded.pkgd.min.js +7 -0
- js/external/uncover.js +107 -0
- niteo-cmp.php +4 -4
- readme.txt +8 -1
css/cmp-admin-head.css
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
#wpadminbar ul li#wp-admin-bar-cmp-admin-notice{background:#2c3e50;}
|
2 |
|
3 |
#toplevel_page_cmp-settings img {
|
4 |
-
max-width: 20px;
|
5 |
padding-top: 6px!important;
|
6 |
}
|
7 |
|
1 |
#wpadminbar ul li#wp-admin-bar-cmp-admin-notice{background:#2c3e50;}
|
2 |
|
3 |
#toplevel_page_cmp-settings img {
|
4 |
+
max-width: 20px!important;
|
5 |
padding-top: 6px!important;
|
6 |
}
|
7 |
|
inc/class-cmp-render_html.php
CHANGED
@@ -183,6 +183,189 @@ class cmp_render_html extends niteo_cmp {
|
|
183 |
return $html;
|
184 |
}
|
185 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
// render slider
|
187 |
public function cmp_slider( $themeslug, $overlay = false ) {
|
188 |
|
@@ -196,12 +379,14 @@ class cmp_render_html extends niteo_cmp {
|
|
196 |
|
197 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
198 |
$slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
|
199 |
-
$
|
200 |
-
$
|
|
|
201 |
?>
|
202 |
|
203 |
<div id="slider-wrapper">
|
204 |
-
|
|
|
205 |
<?php
|
206 |
switch ( $niteoCS_banner ) {
|
207 |
|
@@ -265,17 +450,17 @@ class cmp_render_html extends niteo_cmp {
|
|
265 |
|
266 |
// get raw url from response
|
267 |
if ( isset( $unsplash['response'] ) && $unsplash['response'] == '200' ) {
|
268 |
-
$
|
269 |
|
270 |
$imgs = array();
|
271 |
|
272 |
-
if ( isset( $
|
273 |
-
foreach ( $
|
274 |
array_push( $imgs, $item['urls']['raw']);
|
275 |
}
|
276 |
|
277 |
} else {
|
278 |
-
$imgs[0] = $
|
279 |
}
|
280 |
|
281 |
$imgs = json_encode( $imgs ); ?>
|
@@ -311,39 +496,18 @@ class cmp_render_html extends niteo_cmp {
|
|
311 |
break;
|
312 |
} ?>
|
313 |
</div>
|
|
|
314 |
</div>
|
315 |
-
|
316 |
-
<?php
|
317 |
-
if ( $overlay === true ) {
|
318 |
-
echo '<div class="background-overlay"></div>';
|
319 |
-
} ?>
|
320 |
|
321 |
<div class="prev"></div>
|
322 |
<div class="next"></div>
|
323 |
-
|
324 |
-
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
|
325 |
-
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.js'></script>
|
326 |
-
<script>
|
327 |
-
$('#slider').slick({
|
328 |
-
slide: '.slide',
|
329 |
-
slidesToShow: 1,
|
330 |
-
arrows: false,
|
331 |
-
fade: <?php echo esc_attr($slider_fade);?>,
|
332 |
-
speed: 1000,
|
333 |
-
autoplay: <?php echo esc_attr($slider_auto);?>,
|
334 |
-
autoplaySpeed: 10000,
|
335 |
-
});
|
336 |
-
|
337 |
-
$('.prev').click(function() {
|
338 |
-
$('#slider').slick('slickPrev');
|
339 |
-
});
|
340 |
-
|
341 |
-
$('.next').click(function() {
|
342 |
-
$('#slider').slick('slickNext');
|
343 |
-
});
|
344 |
-
</script>
|
345 |
-
|
346 |
<?php
|
|
|
|
|
|
|
|
|
|
|
347 |
return;
|
348 |
}
|
349 |
|
@@ -436,139 +600,6 @@ class cmp_render_html extends niteo_cmp {
|
|
436 |
return $html;
|
437 |
}
|
438 |
|
439 |
-
// Render Javascripts
|
440 |
-
public function cmp_javascripts( $background, $themeslug ) {
|
441 |
-
if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
|
442 |
-
$background = esc_attr($_GET['background']);
|
443 |
-
}
|
444 |
-
// if video background ini vidim background player
|
445 |
-
if ( $background == 5 ) { ?>
|
446 |
-
|
447 |
-
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
448 |
-
<script>
|
449 |
-
<?php
|
450 |
-
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
451 |
-
|
452 |
-
if ( !empty( $video_poster ) ) {
|
453 |
-
$video_poster = $video_poster[0];
|
454 |
-
}
|
455 |
-
// video
|
456 |
-
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
457 |
-
|
458 |
-
switch ( $source ) {
|
459 |
-
case 'YouTube':
|
460 |
-
$banner_url = get_option('niteoCS_youtube_url['.$themeslug.']'); ?>
|
461 |
-
|
462 |
-
var myBackground = new vidim( '#player', {
|
463 |
-
src: '<?php echo esc_url( $banner_url ); ?>',
|
464 |
-
type: 'YouTube',
|
465 |
-
poster: '<?php echo esc_url( $video_poster ); ?>',
|
466 |
-
quality: 'hd1080'
|
467 |
-
}
|
468 |
-
);
|
469 |
-
|
470 |
-
<?php
|
471 |
-
break;
|
472 |
-
|
473 |
-
case 'vimeo':
|
474 |
-
$banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']'); ?>
|
475 |
-
var myBackground = new vidim( '#player', {
|
476 |
-
src: '<?php echo esc_url( $banner_url ); ?>',
|
477 |
-
type: 'vimeo',
|
478 |
-
poster: '<?php echo esc_url( $video_poster ); ?>',
|
479 |
-
}
|
480 |
-
);
|
481 |
-
<?php
|
482 |
-
break;
|
483 |
-
|
484 |
-
case 'video/mp4':
|
485 |
-
$banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
|
486 |
-
$banner_url = wp_get_attachment_url( $banner_url ); ?>
|
487 |
-
var myBackground = new vidim( '#player', {
|
488 |
-
src: [
|
489 |
-
{
|
490 |
-
type: 'video/mp4',
|
491 |
-
src: '<?php echo esc_url( $banner_url ); ?>',
|
492 |
-
},
|
493 |
-
],
|
494 |
-
poster: '<?php echo esc_url( $video_poster ); ?>',
|
495 |
-
});
|
496 |
-
<?php
|
497 |
-
break;
|
498 |
-
default:
|
499 |
-
break;
|
500 |
-
} ?>
|
501 |
-
</script>
|
502 |
-
<?php
|
503 |
-
|
504 |
-
} ?>
|
505 |
-
|
506 |
-
<script>
|
507 |
-
window.addEventListener("load",function(event) {
|
508 |
-
init();
|
509 |
-
});
|
510 |
-
|
511 |
-
function init(){
|
512 |
-
var image = document.getElementById('background-image');
|
513 |
-
|
514 |
-
if ( image === null ) {
|
515 |
-
image = document.getElementById('body');
|
516 |
-
}
|
517 |
-
|
518 |
-
if ( image != null ) {
|
519 |
-
image.className += " loaded";
|
520 |
-
}
|
521 |
-
|
522 |
-
// theme specific function after init
|
523 |
-
<?php
|
524 |
-
switch ( $themeslug ) {
|
525 |
-
case 'fifty': ?>
|
526 |
-
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
527 |
-
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
528 |
-
|
529 |
-
<?php
|
530 |
-
break;
|
531 |
-
|
532 |
-
case 'hardwork_premium': ?>
|
533 |
-
var contentWrapper = document.getElementsByClassName('section-body')[0];
|
534 |
-
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
535 |
-
<?php
|
536 |
-
break;
|
537 |
-
|
538 |
-
case 'construct' :
|
539 |
-
if ( $background != 5 && $background != 4 ) { ?>
|
540 |
-
// run paraxify
|
541 |
-
myParaxify = paraxify('.image', {
|
542 |
-
speed: 1,
|
543 |
-
boost: 0.5
|
544 |
-
});
|
545 |
-
<?php
|
546 |
-
}
|
547 |
-
break;
|
548 |
-
|
549 |
-
default:
|
550 |
-
break;
|
551 |
-
} ?>
|
552 |
-
|
553 |
-
}
|
554 |
-
</script>
|
555 |
-
|
556 |
-
<?php
|
557 |
-
|
558 |
-
// render redirect script if CMP is in redirect mode
|
559 |
-
if ( $this->cmp_status() == 3 ) {
|
560 |
-
$url = get_option('niteoCS_URL_redirect');
|
561 |
-
$time = get_option('niteoCS_redirect_time'); ?>
|
562 |
-
<script>
|
563 |
-
setTimeout(function() {
|
564 |
-
window.location.href = "<?php echo esc_url($url);?>";
|
565 |
-
}, <?php echo esc_attr($time * 1000);?>);
|
566 |
-
</script>';
|
567 |
-
<?php
|
568 |
-
}
|
569 |
-
|
570 |
-
return;
|
571 |
-
}
|
572 |
|
573 |
// render subscribe form
|
574 |
public function cmp_subscribe_form() {
|
183 |
return $html;
|
184 |
}
|
185 |
|
186 |
+
|
187 |
+
// Render Javascripts
|
188 |
+
public function cmp_javascripts( $background, $themeslug ) {
|
189 |
+
if ( isset($_GET['background']) && is_numeric($_GET['background']) ) {
|
190 |
+
$background = esc_attr($_GET['background']);
|
191 |
+
} ?>
|
192 |
+
|
193 |
+
<script>
|
194 |
+
window.addEventListener("load",function(event) {
|
195 |
+
init();
|
196 |
+
});
|
197 |
+
|
198 |
+
function init(){
|
199 |
+
var image = document.getElementById('background-image');
|
200 |
+
|
201 |
+
if ( image === null ) {
|
202 |
+
image = document.getElementById('body');
|
203 |
+
}
|
204 |
+
|
205 |
+
if ( image != null ) {
|
206 |
+
image.className += " loaded";
|
207 |
+
}
|
208 |
+
|
209 |
+
// theme specific function after init
|
210 |
+
<?php
|
211 |
+
switch ( $themeslug ) {
|
212 |
+
case 'fifty': ?>
|
213 |
+
var contentWrapper = document.getElementsByClassName('content-wrapper')[0];
|
214 |
+
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
215 |
+
|
216 |
+
<?php
|
217 |
+
break;
|
218 |
+
|
219 |
+
case 'hardwork_premium': ?>
|
220 |
+
var contentWrapper = document.getElementsByClassName('section-body')[0];
|
221 |
+
setTimeout(function(){ contentWrapper.className += " overflow"; }, 1500);
|
222 |
+
<?php
|
223 |
+
break;
|
224 |
+
|
225 |
+
case 'construct' :
|
226 |
+
if ( $background != 5 && $background != 4 ) { ?>
|
227 |
+
// run paraxify
|
228 |
+
myParaxify = paraxify('.image', {
|
229 |
+
speed: 1,
|
230 |
+
boost: 0.5
|
231 |
+
});
|
232 |
+
<?php
|
233 |
+
}
|
234 |
+
break;
|
235 |
+
|
236 |
+
default:
|
237 |
+
break;
|
238 |
+
} ?>
|
239 |
+
|
240 |
+
}
|
241 |
+
</script>
|
242 |
+
|
243 |
+
<?php
|
244 |
+
// if video background ini vidim background player
|
245 |
+
switch ( $background ) {
|
246 |
+
// video
|
247 |
+
case '5': ?>
|
248 |
+
<script type='text/javascript' src='<?php echo plugins_url('cmp-coming-soon-maintenance/js/vidim.min.js');?>'></script>
|
249 |
+
<script>
|
250 |
+
<?php
|
251 |
+
$video_poster = wp_get_attachment_image_src( get_option('niteoCS_video_thumb['.$themeslug.']'), 'large' );
|
252 |
+
|
253 |
+
if ( !empty( $video_poster ) ) {
|
254 |
+
$video_poster = $video_poster[0];
|
255 |
+
}
|
256 |
+
// video
|
257 |
+
$source = get_option('niteoCS_banner_video['.$themeslug.']');
|
258 |
+
|
259 |
+
switch ( $source ) {
|
260 |
+
case 'YouTube':
|
261 |
+
$banner_url = get_option('niteoCS_youtube_url['.$themeslug.']'); ?>
|
262 |
+
|
263 |
+
var myBackground = new vidim( '#player', {
|
264 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
265 |
+
type: 'YouTube',
|
266 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
267 |
+
quality: 'hd1080'
|
268 |
+
}
|
269 |
+
);
|
270 |
+
|
271 |
+
<?php
|
272 |
+
break;
|
273 |
+
|
274 |
+
case 'vimeo':
|
275 |
+
$banner_url = get_option('niteoCS_vimeo_url['.$themeslug.']'); ?>
|
276 |
+
var myBackground = new vidim( '#player', {
|
277 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
278 |
+
type: 'vimeo',
|
279 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
280 |
+
}
|
281 |
+
);
|
282 |
+
<?php
|
283 |
+
break;
|
284 |
+
|
285 |
+
case 'video/mp4':
|
286 |
+
$banner_url = get_option('niteoCS_video_file_url['.$themeslug.']');
|
287 |
+
$banner_url = wp_get_attachment_url( $banner_url ); ?>
|
288 |
+
var myBackground = new vidim( '#player', {
|
289 |
+
src: [
|
290 |
+
{
|
291 |
+
type: 'video/mp4',
|
292 |
+
src: '<?php echo esc_url( $banner_url ); ?>',
|
293 |
+
},
|
294 |
+
],
|
295 |
+
poster: '<?php echo esc_url( $video_poster ); ?>',
|
296 |
+
});
|
297 |
+
<?php
|
298 |
+
break;
|
299 |
+
default:
|
300 |
+
break;
|
301 |
+
} ?>
|
302 |
+
</script>
|
303 |
+
<?php
|
304 |
+
break;
|
305 |
+
// custom images or unplash
|
306 |
+
case '0':
|
307 |
+
case '1':
|
308 |
+
|
309 |
+
if ( get_option('niteoCS_slider['.$themeslug.']', '1') == 1 ) {
|
310 |
+
$slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
|
311 |
+
$slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
312 |
+
// render slice effect scripts
|
313 |
+
if ( $slider_effect == 'slice' ) { ?>
|
314 |
+
|
315 |
+
<script type='text/javascript' src='<?php echo plugins_url('js/external/imagesloaded.pkgd.min.js', __DIR__);?>'></script>
|
316 |
+
<script type='text/javascript' src='<?php echo plugins_url('js/external/anime.min.js', __DIR__);?>'></script>
|
317 |
+
<script type='text/javascript' src='<?php echo plugins_url('js/external/uncover.js', __DIR__);?>'></script>
|
318 |
+
<script type='text/javascript' src='<?php echo $this->cmp_themeURL($themeslug).$themeslug.'/js/slice.js';?>'></script>
|
319 |
+
<?php
|
320 |
+
|
321 |
+
// render slick carousel DOM and scripts
|
322 |
+
} else { ?>
|
323 |
+
|
324 |
+
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.slim.min.js'></script>
|
325 |
+
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js'></script>
|
326 |
+
<script>
|
327 |
+
$('#slider').slick({
|
328 |
+
slide: '.slide',
|
329 |
+
slidesToShow: 1,
|
330 |
+
arrows: false,
|
331 |
+
fade: <?php echo esc_attr($slider_effect);?>,
|
332 |
+
speed: 1000,
|
333 |
+
autoplay: <?php echo esc_attr($slider_autoplay);?>,
|
334 |
+
autoplaySpeed: 10000,
|
335 |
+
});
|
336 |
+
|
337 |
+
$('.prev').click(function() {
|
338 |
+
$('#slider').slick('slickPrev');
|
339 |
+
});
|
340 |
+
|
341 |
+
$('.next').click(function() {
|
342 |
+
$('#slider').slick('slickNext');
|
343 |
+
});
|
344 |
+
</script>
|
345 |
+
<?php
|
346 |
+
}
|
347 |
+
}
|
348 |
+
break;
|
349 |
+
|
350 |
+
default:
|
351 |
+
break;
|
352 |
+
}
|
353 |
+
|
354 |
+
// render redirect script if CMP is in redirect mode
|
355 |
+
if ( $this->cmp_status() == 3 ) {
|
356 |
+
$url = get_option('niteoCS_URL_redirect');
|
357 |
+
$time = get_option('niteoCS_redirect_time'); ?>
|
358 |
+
<script>
|
359 |
+
setTimeout(function() {
|
360 |
+
window.location.href = "<?php echo esc_url($url);?>";
|
361 |
+
}, <?php echo esc_attr($time * 1000);?>);
|
362 |
+
</script>
|
363 |
+
<?php
|
364 |
+
}
|
365 |
+
|
366 |
+
return;
|
367 |
+
}
|
368 |
+
|
369 |
// render slider
|
370 |
public function cmp_slider( $themeslug, $overlay = false ) {
|
371 |
|
379 |
|
380 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '1');
|
381 |
$slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
|
382 |
+
$slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
|
383 |
+
$slider_autoplay = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
384 |
+
|
385 |
?>
|
386 |
|
387 |
<div id="slider-wrapper">
|
388 |
+
|
389 |
+
<div id="slider" class="slides effect-<?php echo esc_attr( $slider_effect );?>" data-autoplay="<?php echo esc_attr( $slider_autoplay );?>">
|
390 |
<?php
|
391 |
switch ( $niteoCS_banner ) {
|
392 |
|
450 |
|
451 |
// get raw url from response
|
452 |
if ( isset( $unsplash['response'] ) && $unsplash['response'] == '200' ) {
|
453 |
+
$unsplash_body = json_decode($unsplash['body'], true);
|
454 |
|
455 |
$imgs = array();
|
456 |
|
457 |
+
if ( isset( $unsplash_body[0] ) ) {
|
458 |
+
foreach ( $unsplash_body as $item ) {
|
459 |
array_push( $imgs, $item['urls']['raw']);
|
460 |
}
|
461 |
|
462 |
} else {
|
463 |
+
$imgs[0] = $unsplash_body['urls']['raw'];
|
464 |
}
|
465 |
|
466 |
$imgs = json_encode( $imgs ); ?>
|
496 |
break;
|
497 |
} ?>
|
498 |
</div>
|
499 |
+
|
500 |
</div>
|
|
|
|
|
|
|
|
|
|
|
501 |
|
502 |
<div class="prev"></div>
|
503 |
<div class="next"></div>
|
504 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
<?php
|
506 |
+
// render overlay image if required
|
507 |
+
if ( $overlay === true ) {
|
508 |
+
echo '<div class="background-overlay"></div>';
|
509 |
+
}
|
510 |
+
|
511 |
return;
|
512 |
}
|
513 |
|
600 |
return $html;
|
601 |
}
|
602 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
|
604 |
// render subscribe form
|
605 |
public function cmp_subscribe_form() {
|
inc/{preview-iframe.php → preview-selector.php}
RENAMED
File without changes
|
inc/settings/settings-slider.php
CHANGED
@@ -35,6 +35,7 @@ $niteoCS_slider_count = get_option('niteoCS_slider_count['.$themeslug.']', '3');
|
|
35 |
$niteoCS_slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
|
36 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '0');
|
37 |
$niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
|
38 |
?>
|
39 |
|
40 |
<div class="table-wrapper theme-setup slider">
|
@@ -49,13 +50,13 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
49 |
|
50 |
<p>
|
51 |
<label title="Enabled">
|
52 |
-
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_slider == 1) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
53 |
</label>
|
54 |
</p>
|
55 |
|
56 |
<p>
|
57 |
<label title="Disabled">
|
58 |
-
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_slider == 0) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
59 |
</label>
|
60 |
</p>
|
61 |
|
@@ -82,6 +83,15 @@ $niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
|
82 |
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="true"<?php if ( $niteoCS_slider_effect == 'true') { echo ' checked="checked"'; } ?>> <?php _e('Fade', 'cmp-coming-soon-maintenance');?>
|
83 |
</label>
|
84 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
</p>
|
86 |
|
87 |
<p>
|
@@ -118,8 +128,7 @@ jQuery(document).ready(function($){
|
|
118 |
jQuery('#slider-disabled').css('display','none');
|
119 |
jQuery('#slider-enabled').css('display','block');
|
120 |
}
|
121 |
-
});
|
122 |
-
jQuery('#csoptions input[name="niteoCS_slider_<?php echo esc_attr($themeslug);?>"]');
|
123 |
|
124 |
|
125 |
jQuery('#csoptions input[name="niteoCS_banner_<?php echo esc_attr($themeslug);?>"]').bind('change', function () {
|
35 |
$niteoCS_slider_effect = get_option('niteoCS_slider_effect['.$themeslug.']', 'true');
|
36 |
$niteoCS_banner = get_option('niteoCS_banner['.$themeslug.']', '0');
|
37 |
$niteoCS_slider_auto = get_option('niteoCS_slider_auto['.$themeslug.']', '1');
|
38 |
+
|
39 |
?>
|
40 |
|
41 |
<div class="table-wrapper theme-setup slider">
|
50 |
|
51 |
<p>
|
52 |
<label title="Enabled">
|
53 |
+
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="1"<?php if ( $niteoCS_slider == 1 ) { echo ' checked="checked"'; } ?>> <?php _e('Enabled', 'cmp-coming-soon-maintenance');?>
|
54 |
</label>
|
55 |
</p>
|
56 |
|
57 |
<p>
|
58 |
<label title="Disabled">
|
59 |
+
<input type="radio" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> name="niteoCS_slider_<?php echo esc_attr($themeslug);?>" value="0"<?php if ( $niteoCS_slider == 0 ) { echo ' checked="checked"'; } ?>> <?php _e('Disabled', 'cmp-coming-soon-maintenance');?>
|
60 |
</label>
|
61 |
</p>
|
62 |
|
83 |
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="true"<?php if ( $niteoCS_slider_effect == 'true') { echo ' checked="checked"'; } ?>> <?php _e('Fade', 'cmp-coming-soon-maintenance');?>
|
84 |
</label>
|
85 |
|
86 |
+
<?php
|
87 |
+
// include Slice option for slider
|
88 |
+
if ( $this->cmp_selectedTheme() == 'fifty' ) { ?>
|
89 |
+
<br><label title="Slice Effect">
|
90 |
+
<input type="radio" name="niteoCS_slider_effect_<?php echo esc_attr($themeslug);?>" <?php echo ( $niteoCS_banner == '1' || $niteoCS_banner == '0' ) ? '' : 'disabled';?> value="slice"<?php if ( $niteoCS_slider_effect == 'slice') { echo ' checked="checked"'; } ?>> <?php _e('Slice', 'cmp-coming-soon-maintenance');?>
|
91 |
+
</label>
|
92 |
+
<?php
|
93 |
+
} ?>
|
94 |
+
|
95 |
</p>
|
96 |
|
97 |
<p>
|
128 |
jQuery('#slider-disabled').css('display','none');
|
129 |
jQuery('#slider-enabled').css('display','block');
|
130 |
}
|
131 |
+
}).trigger('change');
|
|
|
132 |
|
133 |
|
134 |
jQuery('#csoptions input[name="niteoCS_banner_<?php echo esc_attr($themeslug);?>"]').bind('change', function () {
|
js/external/anime.min.js
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
2017 Julian Garnier
|
3 |
+
Released under the MIT license
|
4 |
+
*/
|
5 |
+
var $jscomp={scope:{}};$jscomp.defineProperty="function"==typeof Object.defineProperties?Object.defineProperty:function(e,r,p){if(p.get||p.set)throw new TypeError("ES3 does not support getters and setters.");e!=Array.prototype&&e!=Object.prototype&&(e[r]=p.value)};$jscomp.getGlobal=function(e){return"undefined"!=typeof window&&window===e?e:"undefined"!=typeof global&&null!=global?global:e};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
|
6 |
+
$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.symbolCounter_=0;$jscomp.Symbol=function(e){return $jscomp.SYMBOL_PREFIX+(e||"")+$jscomp.symbolCounter_++};
|
7 |
+
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var e=$jscomp.global.Symbol.iterator;e||(e=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[e]&&$jscomp.defineProperty(Array.prototype,e,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(e){var r=0;return $jscomp.iteratorPrototype(function(){return r<e.length?{done:!1,value:e[r++]}:{done:!0}})};
|
8 |
+
$jscomp.iteratorPrototype=function(e){$jscomp.initSymbolIterator();e={next:e};e[$jscomp.global.Symbol.iterator]=function(){return this};return e};$jscomp.array=$jscomp.array||{};$jscomp.iteratorFromArray=function(e,r){$jscomp.initSymbolIterator();e instanceof String&&(e+="");var p=0,m={next:function(){if(p<e.length){var u=p++;return{value:r(u,e[u]),done:!1}}m.next=function(){return{done:!0,value:void 0}};return m.next()}};m[Symbol.iterator]=function(){return m};return m};
|
9 |
+
$jscomp.polyfill=function(e,r,p,m){if(r){p=$jscomp.global;e=e.split(".");for(m=0;m<e.length-1;m++){var u=e[m];u in p||(p[u]={});p=p[u]}e=e[e.length-1];m=p[e];r=r(m);r!=m&&null!=r&&$jscomp.defineProperty(p,e,{configurable:!0,writable:!0,value:r})}};$jscomp.polyfill("Array.prototype.keys",function(e){return e?e:function(){return $jscomp.iteratorFromArray(this,function(e){return e})}},"es6-impl","es3");var $jscomp$this=this;
|
10 |
+
(function(e,r){"function"===typeof define&&define.amd?define([],r):"object"===typeof module&&module.exports?module.exports=r():e.anime=r()})(this,function(){function e(a){if(!h.col(a))try{return document.querySelectorAll(a)}catch(c){}}function r(a,c){for(var d=a.length,b=2<=arguments.length?arguments[1]:void 0,f=[],n=0;n<d;n++)if(n in a){var k=a[n];c.call(b,k,n,a)&&f.push(k)}return f}function p(a){return a.reduce(function(a,d){return a.concat(h.arr(d)?p(d):d)},[])}function m(a){if(h.arr(a))return a;
|
11 |
+
h.str(a)&&(a=e(a)||a);return a instanceof NodeList||a instanceof HTMLCollection?[].slice.call(a):[a]}function u(a,c){return a.some(function(a){return a===c})}function C(a){var c={},d;for(d in a)c[d]=a[d];return c}function D(a,c){var d=C(a),b;for(b in a)d[b]=c.hasOwnProperty(b)?c[b]:a[b];return d}function z(a,c){var d=C(a),b;for(b in c)d[b]=h.und(a[b])?c[b]:a[b];return d}function T(a){a=a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(a,c,d,k){return c+c+d+d+k+k});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);
|
12 |
+
a=parseInt(c[1],16);var d=parseInt(c[2],16),c=parseInt(c[3],16);return"rgba("+a+","+d+","+c+",1)"}function U(a){function c(a,c,b){0>b&&(b+=1);1<b&&--b;return b<1/6?a+6*(c-a)*b:.5>b?c:b<2/3?a+(c-a)*(2/3-b)*6:a}var d=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(a)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(a);a=parseInt(d[1])/360;var b=parseInt(d[2])/100,f=parseInt(d[3])/100,d=d[4]||1;if(0==b)f=b=a=f;else{var n=.5>f?f*(1+b):f+b-f*b,k=2*f-n,f=c(k,n,a+1/3),b=c(k,n,a);a=c(k,n,a-1/3)}return"rgba("+
|
13 |
+
255*f+","+255*b+","+255*a+","+d+")"}function y(a){if(a=/([\+\-]?[0-9#\.]+)(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(a))return a[2]}function V(a){if(-1<a.indexOf("translate")||"perspective"===a)return"px";if(-1<a.indexOf("rotate")||-1<a.indexOf("skew"))return"deg"}function I(a,c){return h.fnc(a)?a(c.target,c.id,c.total):a}function E(a,c){if(c in a.style)return getComputedStyle(a).getPropertyValue(c.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase())||"0"}function J(a,c){if(h.dom(a)&&
|
14 |
+
u(W,c))return"transform";if(h.dom(a)&&(a.getAttribute(c)||h.svg(a)&&a[c]))return"attribute";if(h.dom(a)&&"transform"!==c&&E(a,c))return"css";if(null!=a[c])return"object"}function X(a,c){var d=V(c),d=-1<c.indexOf("scale")?1:0+d;a=a.style.transform;if(!a)return d;for(var b=[],f=[],n=[],k=/(\w+)\((.+?)\)/g;b=k.exec(a);)f.push(b[1]),n.push(b[2]);a=r(n,function(a,b){return f[b]===c});return a.length?a[0]:d}function K(a,c){switch(J(a,c)){case "transform":return X(a,c);case "css":return E(a,c);case "attribute":return a.getAttribute(c)}return a[c]||
|
15 |
+
0}function L(a,c){var d=/^(\*=|\+=|-=)/.exec(a);if(!d)return a;var b=y(a)||0;c=parseFloat(c);a=parseFloat(a.replace(d[0],""));switch(d[0][0]){case "+":return c+a+b;case "-":return c-a+b;case "*":return c*a+b}}function F(a,c){return Math.sqrt(Math.pow(c.x-a.x,2)+Math.pow(c.y-a.y,2))}function M(a){a=a.points;for(var c=0,d,b=0;b<a.numberOfItems;b++){var f=a.getItem(b);0<b&&(c+=F(d,f));d=f}return c}function N(a){if(a.getTotalLength)return a.getTotalLength();switch(a.tagName.toLowerCase()){case "circle":return 2*
|
16 |
+
Math.PI*a.getAttribute("r");case "rect":return 2*a.getAttribute("width")+2*a.getAttribute("height");case "line":return F({x:a.getAttribute("x1"),y:a.getAttribute("y1")},{x:a.getAttribute("x2"),y:a.getAttribute("y2")});case "polyline":return M(a);case "polygon":var c=a.points;return M(a)+F(c.getItem(c.numberOfItems-1),c.getItem(0))}}function Y(a,c){function d(b){b=void 0===b?0:b;return a.el.getPointAtLength(1<=c+b?c+b:0)}var b=d(),f=d(-1),n=d(1);switch(a.property){case "x":return b.x;case "y":return b.y;
|
17 |
+
case "angle":return 180*Math.atan2(n.y-f.y,n.x-f.x)/Math.PI}}function O(a,c){var d=/-?\d*\.?\d+/g,b;b=h.pth(a)?a.totalLength:a;if(h.col(b))if(h.rgb(b)){var f=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(b);b=f?"rgba("+f[1]+",1)":b}else b=h.hex(b)?T(b):h.hsl(b)?U(b):void 0;else f=(f=y(b))?b.substr(0,b.length-f.length):b,b=c&&!/\s/g.test(b)?f+c:f;b+="";return{original:b,numbers:b.match(d)?b.match(d).map(Number):[0],strings:h.str(a)||c?b.split(d):[]}}function P(a){a=a?p(h.arr(a)?a.map(m):m(a)):[];return r(a,
|
18 |
+
function(a,d,b){return b.indexOf(a)===d})}function Z(a){var c=P(a);return c.map(function(a,b){return{target:a,id:b,total:c.length}})}function aa(a,c){var d=C(c);if(h.arr(a)){var b=a.length;2!==b||h.obj(a[0])?h.fnc(c.duration)||(d.duration=c.duration/b):a={value:a}}return m(a).map(function(a,b){b=b?0:c.delay;a=h.obj(a)&&!h.pth(a)?a:{value:a};h.und(a.delay)&&(a.delay=b);return a}).map(function(a){return z(a,d)})}function ba(a,c){var d={},b;for(b in a){var f=I(a[b],c);h.arr(f)&&(f=f.map(function(a){return I(a,
|
19 |
+
c)}),1===f.length&&(f=f[0]));d[b]=f}d.duration=parseFloat(d.duration);d.delay=parseFloat(d.delay);return d}function ca(a){return h.arr(a)?A.apply(this,a):Q[a]}function da(a,c){var d;return a.tweens.map(function(b){b=ba(b,c);var f=b.value,e=K(c.target,a.name),k=d?d.to.original:e,k=h.arr(f)?f[0]:k,w=L(h.arr(f)?f[1]:f,k),e=y(w)||y(k)||y(e);b.from=O(k,e);b.to=O(w,e);b.start=d?d.end:a.offset;b.end=b.start+b.delay+b.duration;b.easing=ca(b.easing);b.elasticity=(1E3-Math.min(Math.max(b.elasticity,1),999))/
|
20 |
+
1E3;b.isPath=h.pth(f);b.isColor=h.col(b.from.original);b.isColor&&(b.round=1);return d=b})}function ea(a,c){return r(p(a.map(function(a){return c.map(function(b){var c=J(a.target,b.name);if(c){var d=da(b,a);b={type:c,property:b.name,animatable:a,tweens:d,duration:d[d.length-1].end,delay:d[0].delay}}else b=void 0;return b})})),function(a){return!h.und(a)})}function R(a,c,d,b){var f="delay"===a;return c.length?(f?Math.min:Math.max).apply(Math,c.map(function(b){return b[a]})):f?b.delay:d.offset+b.delay+
|
21 |
+
b.duration}function fa(a){var c=D(ga,a),d=D(S,a),b=Z(a.targets),f=[],e=z(c,d),k;for(k in a)e.hasOwnProperty(k)||"targets"===k||f.push({name:k,offset:e.offset,tweens:aa(a[k],d)});a=ea(b,f);return z(c,{children:[],animatables:b,animations:a,duration:R("duration",a,c,d),delay:R("delay",a,c,d)})}function q(a){function c(){return window.Promise&&new Promise(function(a){return p=a})}function d(a){return g.reversed?g.duration-a:a}function b(a){for(var b=0,c={},d=g.animations,f=d.length;b<f;){var e=d[b],
|
22 |
+
k=e.animatable,h=e.tweens,n=h.length-1,l=h[n];n&&(l=r(h,function(b){return a<b.end})[0]||l);for(var h=Math.min(Math.max(a-l.start-l.delay,0),l.duration)/l.duration,w=isNaN(h)?1:l.easing(h,l.elasticity),h=l.to.strings,p=l.round,n=[],m=void 0,m=l.to.numbers.length,t=0;t<m;t++){var x=void 0,x=l.to.numbers[t],q=l.from.numbers[t],x=l.isPath?Y(l.value,w*x):q+w*(x-q);p&&(l.isColor&&2<t||(x=Math.round(x*p)/p));n.push(x)}if(l=h.length)for(m=h[0],w=0;w<l;w++)p=h[w+1],t=n[w],isNaN(t)||(m=p?m+(t+p):m+(t+" "));
|
23 |
+
else m=n[0];ha[e.type](k.target,e.property,m,c,k.id);e.currentValue=m;b++}if(b=Object.keys(c).length)for(d=0;d<b;d++)H||(H=E(document.body,"transform")?"transform":"-webkit-transform"),g.animatables[d].target.style[H]=c[d].join(" ");g.currentTime=a;g.progress=a/g.duration*100}function f(a){if(g[a])g[a](g)}function e(){g.remaining&&!0!==g.remaining&&g.remaining--}function k(a){var k=g.duration,n=g.offset,w=n+g.delay,r=g.currentTime,x=g.reversed,q=d(a);if(g.children.length){var u=g.children,v=u.length;
|
24 |
+
if(q>=g.currentTime)for(var G=0;G<v;G++)u[G].seek(q);else for(;v--;)u[v].seek(q)}if(q>=w||!k)g.began||(g.began=!0,f("begin")),f("run");if(q>n&&q<k)b(q);else if(q<=n&&0!==r&&(b(0),x&&e()),q>=k&&r!==k||!k)b(k),x||e();f("update");a>=k&&(g.remaining?(t=h,"alternate"===g.direction&&(g.reversed=!g.reversed)):(g.pause(),g.completed||(g.completed=!0,f("complete"),"Promise"in window&&(p(),m=c()))),l=0)}a=void 0===a?{}:a;var h,t,l=0,p=null,m=c(),g=fa(a);g.reset=function(){var a=g.direction,c=g.loop;g.currentTime=
|
25 |
+
0;g.progress=0;g.paused=!0;g.began=!1;g.completed=!1;g.reversed="reverse"===a;g.remaining="alternate"===a&&1===c?2:c;b(0);for(a=g.children.length;a--;)g.children[a].reset()};g.tick=function(a){h=a;t||(t=h);k((l+h-t)*q.speed)};g.seek=function(a){k(d(a))};g.pause=function(){var a=v.indexOf(g);-1<a&&v.splice(a,1);g.paused=!0};g.play=function(){g.paused&&(g.paused=!1,t=0,l=d(g.currentTime),v.push(g),B||ia())};g.reverse=function(){g.reversed=!g.reversed;t=0;l=d(g.currentTime)};g.restart=function(){g.pause();
|
26 |
+
g.reset();g.play()};g.finished=m;g.reset();g.autoplay&&g.play();return g}var ga={update:void 0,begin:void 0,run:void 0,complete:void 0,loop:1,direction:"normal",autoplay:!0,offset:0},S={duration:1E3,delay:0,easing:"easeOutElastic",elasticity:500,round:0},W="translateX translateY translateZ rotate rotateX rotateY rotateZ scale scaleX scaleY scaleZ skewX skewY perspective".split(" "),H,h={arr:function(a){return Array.isArray(a)},obj:function(a){return-1<Object.prototype.toString.call(a).indexOf("Object")},
|
27 |
+
pth:function(a){return h.obj(a)&&a.hasOwnProperty("totalLength")},svg:function(a){return a instanceof SVGElement},dom:function(a){return a.nodeType||h.svg(a)},str:function(a){return"string"===typeof a},fnc:function(a){return"function"===typeof a},und:function(a){return"undefined"===typeof a},hex:function(a){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(a)},rgb:function(a){return/^rgb/.test(a)},hsl:function(a){return/^hsl/.test(a)},col:function(a){return h.hex(a)||h.rgb(a)||h.hsl(a)}},A=function(){function a(a,
|
28 |
+
d,b){return(((1-3*b+3*d)*a+(3*b-6*d))*a+3*d)*a}return function(c,d,b,f){if(0<=c&&1>=c&&0<=b&&1>=b){var e=new Float32Array(11);if(c!==d||b!==f)for(var k=0;11>k;++k)e[k]=a(.1*k,c,b);return function(k){if(c===d&&b===f)return k;if(0===k)return 0;if(1===k)return 1;for(var h=0,l=1;10!==l&&e[l]<=k;++l)h+=.1;--l;var l=h+(k-e[l])/(e[l+1]-e[l])*.1,n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(.001<=n){for(h=0;4>h;++h){n=3*(1-3*b+3*c)*l*l+2*(3*b-6*c)*l+3*c;if(0===n)break;var m=a(l,c,b)-k,l=l-m/n}k=l}else if(0===
|
29 |
+
n)k=l;else{var l=h,h=h+.1,g=0;do m=l+(h-l)/2,n=a(m,c,b)-k,0<n?h=m:l=m;while(1e-7<Math.abs(n)&&10>++g);k=m}return a(k,d,f)}}}}(),Q=function(){function a(a,b){return 0===a||1===a?a:-Math.pow(2,10*(a-1))*Math.sin(2*(a-1-b/(2*Math.PI)*Math.asin(1))*Math.PI/b)}var c="Quad Cubic Quart Quint Sine Expo Circ Back Elastic".split(" "),d={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],a],Out:[[.25,
|
30 |
+
.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],function(b,c){return 1-a(1-b,c)}],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],function(b,c){return.5>b?a(2*b,c)/2:1-a(-2*b+2,c)/2}]},b={linear:A(.25,.25,.75,.75)},f={},e;for(e in d)f.type=e,d[f.type].forEach(function(a){return function(d,f){b["ease"+a.type+c[f]]=h.fnc(d)?
|
31 |
+
d:A.apply($jscomp$this,d)}}(f)),f={type:f.type};return b}(),ha={css:function(a,c,d){return a.style[c]=d},attribute:function(a,c,d){return a.setAttribute(c,d)},object:function(a,c,d){return a[c]=d},transform:function(a,c,d,b,f){b[f]||(b[f]=[]);b[f].push(c+"("+d+")")}},v=[],B=0,ia=function(){function a(){B=requestAnimationFrame(c)}function c(c){var b=v.length;if(b){for(var d=0;d<b;)v[d]&&v[d].tick(c),d++;a()}else cancelAnimationFrame(B),B=0}return a}();q.version="2.2.0";q.speed=1;q.running=v;q.remove=
|
32 |
+
function(a){a=P(a);for(var c=v.length;c--;)for(var d=v[c],b=d.animations,f=b.length;f--;)u(a,b[f].animatable.target)&&(b.splice(f,1),b.length||d.pause())};q.getValue=K;q.path=function(a,c){var d=h.str(a)?e(a)[0]:a,b=c||100;return function(a){return{el:d,property:a,totalLength:N(d)*(b/100)}}};q.setDashoffset=function(a){var c=N(a);a.setAttribute("stroke-dasharray",c);return c};q.bezier=A;q.easings=Q;q.timeline=function(a){var c=q(a);c.pause();c.duration=0;c.add=function(d){c.children.forEach(function(a){a.began=
|
33 |
+
!0;a.completed=!0});m(d).forEach(function(b){var d=z(b,D(S,a||{}));d.targets=d.targets||a.targets;b=c.duration;var e=d.offset;d.autoplay=!1;d.direction=c.direction;d.offset=h.und(e)?b:L(e,b);c.began=!0;c.completed=!0;c.seek(d.offset);d=q(d);d.began=!0;d.completed=!0;d.duration>b&&(c.duration=d.duration);c.children.push(d)});c.seek(0);c.reset();c.autoplay&&c.restart();return c};return c};q.random=function(a,c){return Math.floor(Math.random()*(c-a+1))+a};return q});
|
js/external/imagesloaded.pkgd.min.js
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!
|
2 |
+
* imagesLoaded PACKAGED v4.1.4
|
3 |
+
* JavaScript is all like "You images are done yet or what?"
|
4 |
+
* MIT License
|
5 |
+
*/
|
6 |
+
|
7 |
+
!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return n.indexOf(t)==-1&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{},n=i[e]=i[e]||{};return n[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return n!=-1&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var r=i[o],s=n&&n[r];s&&(this.off(e,r),delete n[r]),r.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(i){return t(e,i)}):"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(e,t){function i(e,t){for(var i in t)e[i]=t[i];return e}function n(e){if(Array.isArray(e))return e;var t="object"==typeof e&&"number"==typeof e.length;return t?d.call(e):[e]}function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);var s=e;return"string"==typeof e&&(s=document.querySelectorAll(e)),s?(this.elements=n(s),this.options=i({},this.options),"function"==typeof t?r=t:i(this.options,t),r&&this.on("always",r),this.getImages(),h&&(this.jqDeferred=new h.Deferred),void setTimeout(this.check.bind(this))):void a.error("Bad element for imagesLoaded "+(s||e))}function r(e){this.img=e}function s(e,t){this.url=e,this.element=t,this.img=new Image}var h=e.jQuery,a=e.console,d=Array.prototype.slice;o.prototype=Object.create(t.prototype),o.prototype.options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),this.options.background===!0&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&u[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var r=e.querySelectorAll(this.options.background);for(n=0;n<r.length;n++){var s=r[n];this.addElementBackgroundImages(s)}}}};var u={1:!0,9:!0,11:!0};return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new r(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var i=new s(e,t);this.images.push(i)},o.prototype.check=function(){function e(e,i,n){setTimeout(function(){t.progress(e,i,n)})}var t=this;return this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?void this.images.forEach(function(t){t.once("progress",e),t.check()}):void this.complete()},o.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&a&&a.log("progress: "+i,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},r.prototype=Object.create(t.prototype),r.prototype.check=function(){var e=this.getIsImageComplete();return e?void this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),void(this.proxyImage.src=this.img.src))},r.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},r.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},r.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},r.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},r.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},r.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype=Object.create(r.prototype),s.prototype.check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url;var e=this.getIsImageComplete();e&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},s.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},s.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(t){t=t||e.jQuery,t&&(h=t,h.fn.imagesLoaded=function(e,t){var i=new o(this,e,t);return i.jqDeferred.promise(h(this))})},o.makeJQueryPlugin(),o});
|
js/external/uncover.js
ADDED
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* uncover.js
|
3 |
+
* http://www.codrops.com
|
4 |
+
*
|
5 |
+
* Licensed under the MIT license.
|
6 |
+
* http://www.opensource.org/licenses/mit-license.php
|
7 |
+
*
|
8 |
+
* Copyright 2018, Codrops
|
9 |
+
* http://www.codrops.com
|
10 |
+
*/
|
11 |
+
{
|
12 |
+
class Uncover {
|
13 |
+
constructor(el, options) {
|
14 |
+
this.DOM = {el: el};
|
15 |
+
this.options = {
|
16 |
+
// initially covered.
|
17 |
+
covered: true,
|
18 |
+
// total number of slices.
|
19 |
+
slicesTotal: 11,
|
20 |
+
// slices color.
|
21 |
+
slicesColor: '#fff',
|
22 |
+
// 'vertical' || 'horizontal'.
|
23 |
+
orientation: 'horizontal',
|
24 |
+
// 'bottom' || 'top' for vertical orientation and 'right' || 'left' for horizontal orientation.
|
25 |
+
// need to define for both show and hide methods.
|
26 |
+
// e.g. animate the slices in from left and hide them to the right side (for a horizontal layout)
|
27 |
+
slicesOrigin: {
|
28 |
+
show: 'left',
|
29 |
+
hide: 'right'
|
30 |
+
}
|
31 |
+
};
|
32 |
+
Object.assign(this.options, options);
|
33 |
+
this.isCovered = this.options.covered;
|
34 |
+
this.layout();
|
35 |
+
if ( !this.isCovered ) {
|
36 |
+
this.show();
|
37 |
+
}
|
38 |
+
}
|
39 |
+
layout() {
|
40 |
+
this.DOM.el.classList.add('uncover');
|
41 |
+
let inner = '';
|
42 |
+
inner += `<div class="uncover__img" style='background-image: ${this.DOM.el.style.backgroundImage}'></div>
|
43 |
+
<div class="uncover__slices uncover__slices--${this.options.orientation}">`;
|
44 |
+
for (let i = 0; i <= this.options.slicesTotal - 1; ++i) {
|
45 |
+
inner += `<div class="uncover__slice" style="color:${this.options.slicesColor}"></div>`;
|
46 |
+
}
|
47 |
+
inner += `</div>`;
|
48 |
+
this.DOM.el.innerHTML = inner;
|
49 |
+
this.DOM.img = this.DOM.el.querySelector('.uncover__img');
|
50 |
+
this.DOM.slices = Array.from(this.DOM.el.querySelectorAll('.uncover__slice'));
|
51 |
+
this.slicesTotal = this.DOM.slices.length;
|
52 |
+
}
|
53 |
+
show(animation = false, animationSettings = {}) {
|
54 |
+
if ( !this.isCovered ) return;
|
55 |
+
return this.toggle(animation,animationSettings);
|
56 |
+
}
|
57 |
+
hide(animation = false, animationSettings = {}) {
|
58 |
+
if ( this.isCovered ) return;
|
59 |
+
return this.toggle(animation,animationSettings);
|
60 |
+
}
|
61 |
+
toggle(animation,animationSettings) {
|
62 |
+
this.isCovered = !this.isCovered;
|
63 |
+
if ( !animation ) {
|
64 |
+
this.DOM.slices.forEach((slice) => {
|
65 |
+
slice.style.transform = !this.isCovered ?
|
66 |
+
this.options.orientation === 'vertical' ? 'translateY(100%)' : 'translateX(100%)' :
|
67 |
+
'none';
|
68 |
+
});
|
69 |
+
}
|
70 |
+
else {
|
71 |
+
let settings = {
|
72 |
+
slices: {
|
73 |
+
targets: this.DOM.slices,
|
74 |
+
duration: 800,
|
75 |
+
delay: (_,i) => i*80,
|
76 |
+
easing: 'easeInOutQuart',
|
77 |
+
translateX: this.options.orientation === 'vertical' ? '0%' :
|
78 |
+
!this.isCovered ?
|
79 |
+
this.options.slicesOrigin.show === 'right' ? '100%' : '-100%' :
|
80 |
+
this.options.slicesOrigin.hide === 'right' ? ['100%','0%'] : ['-100%','0%'],
|
81 |
+
|
82 |
+
translateY: this.options.orientation === 'vertical' ?
|
83 |
+
!this.isCovered ?
|
84 |
+
this.options.slicesOrigin.show === 'bottom' ? '100%' : '-100%' :
|
85 |
+
this.options.slicesOrigin.hide === 'bottom' ? ['100%','0%'] : ['-100%','0%']
|
86 |
+
: '0%'
|
87 |
+
},
|
88 |
+
image: {
|
89 |
+
targets: this.DOM.img
|
90 |
+
}
|
91 |
+
};
|
92 |
+
Object.assign(settings.slices, animationSettings.slices);
|
93 |
+
Object.assign(settings.image, animationSettings.image);
|
94 |
+
|
95 |
+
anime.remove(this.DOM.slices);
|
96 |
+
anime.remove(this.DOM.img);
|
97 |
+
|
98 |
+
let promises = [anime(settings.slices).finished];
|
99 |
+
if ( settings.image.duration ) {
|
100 |
+
promises.push(anime(settings.image).finished);
|
101 |
+
}
|
102 |
+
return Promise.all(promises);
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
window.Uncover = Uncover;
|
107 |
+
}
|
niteo-cmp.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
-
Version: 2.4.
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
@@ -18,7 +18,7 @@ class niteo_cmp {
|
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
-
$this->version = '2.4.
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
@@ -223,8 +223,8 @@ class niteo_cmp {
|
|
223 |
|
224 |
// iframe preview with sidebar controls cmp_preview=true&selector=true
|
225 |
if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
|
226 |
-
if ( file_exists(dirname(__FILE__) . '/inc/preview-
|
227 |
-
require_once (dirname(__FILE__) . '/inc/preview-
|
228 |
die();
|
229 |
}
|
230 |
}
|
3 |
Plugin Name: CMP - Coming Soon & Maintenance Plugin
|
4 |
Plugin URI: https://wordpress.org/plugins/cmp-coming-soon-maintenance/
|
5 |
Description: Display customizable landing page for Coming Soon, Maintenance & Under Construction page.
|
6 |
+
Version: 2.4.2
|
7 |
Author: NiteoThemes
|
8 |
Author URI: https://www.niteothemes.com
|
9 |
Text Domain: cmp-coming-soon-maintenance
|
18 |
public function __construct() {
|
19 |
$this->author = 'NiteoThemes';
|
20 |
$this->author_homepage = 'https://niteothemes.com';
|
21 |
+
$this->version = '2.4.2';
|
22 |
$this->dev = false;
|
23 |
$this->plugins_dir_path = plugin_dir_path( __DIR__ );
|
24 |
if ( $this->plugins_dir_path == './') {
|
223 |
|
224 |
// iframe preview with sidebar controls cmp_preview=true&selector=true
|
225 |
if ( isset($_GET['selector']) && $_GET['selector'] == 'true' ) {
|
226 |
+
if ( file_exists(dirname(__FILE__) . '/inc/preview-selector.php') ) {
|
227 |
+
require_once (dirname(__FILE__) . '/inc/preview-selector.php');
|
228 |
die();
|
229 |
}
|
230 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=KV2JF
|
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
-
Stable tag: 2.4.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -111,6 +111,13 @@ CMP plugin offers premium features for free, no PRO versions! With blazing speed
|
|
111 |
|
112 |
|
113 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
<h4>CMP 2.4.1 - bug fixes</h4>
|
115 |
<ul>
|
116 |
<li>Fixed issue when activation settings could not be saved in some cases.</li>
|
4 |
Tags: under construction, construction page, maintenance mode, landing page, launch page, launching, security, coming soon, customizable, offline, offline page, unavailable, free, unsplash, subscribe form
|
5 |
Requires at least: 3.0
|
6 |
Tested up to: 4.9
|
7 |
+
Stable tag: 2.4.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
111 |
|
112 |
|
113 |
== Changelog ==
|
114 |
+
<h4>CMP 2.4.2 - maintenance update</h4>
|
115 |
+
<ul>
|
116 |
+
<li>Optimized delivery of javascript in CMP themes</li>
|
117 |
+
<li>Fifty theme new slice slider option</li>
|
118 |
+
<li>Update compatibility with few other plugins which caused issues in admin styles</li>
|
119 |
+
</ul>
|
120 |
+
|
121 |
<h4>CMP 2.4.1 - bug fixes</h4>
|
122 |
<ul>
|
123 |
<li>Fixed issue when activation settings could not be saved in some cases.</li>
|