├── .gitignore ├── assets ├── dist │ ├── js │ │ ├── public.min.js │ │ └── public.min.js.map │ └── css │ │ ├── public.min.css.map │ │ └── public.min.css ├── vendor │ └── owl-carousel │ │ ├── css │ │ ├── owl.theme.default.min.css │ │ └── owl.carousel.min.css │ │ └── js │ │ └── owl.carousel.min.js └── source │ ├── js │ └── public.js │ └── css │ └── public.css ├── package.json ├── languages └── my-elementor-widget ├── Gruntfile.js ├── my-elementor-widget.php └── widgets ├── logo-carousel.php ├── pricing-table.php └── preview-card.php /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ -------------------------------------------------------------------------------- /assets/dist/js/public.min.js: -------------------------------------------------------------------------------- 1 | !function($){"use strict";function logoCarousel($scope,$){var $_this=$scope.find(".logo-carousel"),$currentID="#"+$_this.attr("id"),$loop=$_this.data("loop"),$dots=$_this.data("dots"),$navs=$_this.data("navs"),$margin=$_this.data("margin");$($currentID).owlCarousel({loop:$loop,margin:$margin,nav:$navs,dots:$dots,responsive:{0:{items:1},600:{items:3},1e3:{items:4}}})}$(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/myewpricing-logo-carousel-id.default",logoCarousel)})}(jQuery); 2 | //# sourceMappingURL=public.min.js.map -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-elementor-widget", 3 | "version": "1.0.0", 4 | "description": "A custom elementor widget plugin", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1" 7 | }, 8 | "author": "John Doe", 9 | "license": "MIT", 10 | "devDependencies": { 11 | "grunt": "^1.1.0", 12 | "grunt-contrib-clean": "^2.0.0", 13 | "grunt-contrib-compress": "^1.6.0", 14 | "grunt-contrib-concat": "^1.0.1", 15 | "grunt-contrib-copy": "^1.0.0", 16 | "grunt-contrib-cssmin": "^3.0.0", 17 | "grunt-contrib-uglify": "^4.0.1", 18 | "grunt-watcher": "^1.0.0", 19 | "grunt-wp-i18n": "^1.0.3" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /assets/dist/js/public.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"public.min.js","sources":["../../source/js/public.js"],"names":["$","logoCarousel","$scope","$_this","find","$currentID","attr","$loop","data","$dots","$navs","$margin","owlCarousel","loop","margin","nav","dots","responsive","0","items","600","1000","window","on","elementorFrontend","hooks","addAction","jQuery"],"mappings":"CAAC,SAAUA,GACP,aAKmB,SAAfC,aAAyBC,OAAQF,GACjC,IAAIG,OAASD,OAAOE,KAAM,kBACtBC,WAAa,IAAIF,OAAOG,KAAM,MAC9BC,MAAUJ,OAAOK,KAAM,QACvBC,MAAUN,OAAOK,KAAM,QACvBE,MAAUP,OAAOK,KAAM,QACvBG,QAAYR,OAAOK,KAAM,UAEnBR,EAAGK,YACTO,YAAY,CACZC,KAAMN,MACNO,OAAQH,QACRI,IAAKL,MACLM,KAAMP,MACNQ,WAAW,CACPC,EAAE,CACEC,MAAM,GAEVC,IAAI,CACAD,MAAM,GAEVE,IAAK,CACDF,MAAM,MAMtBnB,EAAEsB,QAAQC,GAAG,0BAA2B,WACpCC,kBAAkBC,MAAMC,UAAU,8DAA+DzB,gBAnCxG,CAqCE0B"} -------------------------------------------------------------------------------- /assets/vendor/owl-carousel/css/owl.theme.default.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-theme .owl-dots,.owl-theme .owl-nav{text-align:center;-webkit-tap-highlight-color:transparent}.owl-theme .owl-nav{margin-top:10px}.owl-theme .owl-nav [class*=owl-]{color:#FFF;font-size:14px;margin:5px;padding:4px 7px;background:#D6D6D6;display:inline-block;cursor:pointer;border-radius:3px}.owl-theme .owl-nav [class*=owl-]:hover{background:#869791;color:#FFF;text-decoration:none}.owl-theme .owl-nav .disabled{opacity:.5;cursor:default}.owl-theme .owl-nav.disabled+.owl-dots{margin-top:10px}.owl-theme .owl-dots .owl-dot{display:inline-block;zoom:1}.owl-theme .owl-dots .owl-dot span{width:10px;height:10px;margin:5px 7px;background:#D6D6D6;display:block;-webkit-backface-visibility:visible;transition:opacity .2s ease;border-radius:30px}.owl-theme .owl-dots .owl-dot.active span,.owl-theme .owl-dots .owl-dot:hover span{background:#869791} -------------------------------------------------------------------------------- /assets/source/js/public.js: -------------------------------------------------------------------------------- 1 | ;(function($) { 2 | "use strict"; 3 | 4 | /** 5 | * logo Carousel 6 | */ 7 | var logoCarousel = function( $scope, $ ) { 8 | var $_this = $scope.find( '.logo-carousel' ); 9 | var $currentID = '#'+$_this.attr( 'id' ), 10 | $loop = $_this.data( 'loop' ), 11 | $dots = $_this.data( 'dots' ), 12 | $navs = $_this.data( 'navs' ), 13 | $margin = $_this.data( 'margin' ); 14 | 15 | var owl = $( $currentID ); 16 | owl.owlCarousel({ 17 | loop: $loop, 18 | margin: $margin, 19 | nav: $navs, 20 | dots: $dots, 21 | responsive:{ 22 | 0:{ 23 | items:1 24 | }, 25 | 600:{ 26 | items:3 27 | }, 28 | 1000:{ 29 | items:4 30 | } 31 | } 32 | }) 33 | } 34 | 35 | $(window).on('elementor/frontend/init', function () { 36 | elementorFrontend.hooks.addAction('frontend/element_ready/myewpricing-logo-carousel-id.default', logoCarousel); 37 | }); 38 | })(jQuery); -------------------------------------------------------------------------------- /languages/my-elementor-widget: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2020 John Doe 2 | # This file is distributed under the same license as the My Elementor Widget package. 3 | msgid "" 4 | msgstr "" 5 | "Project-Id-Version: My Elementor Widget 1.0.0\n" 6 | "Report-Msgid-Bugs-To: " 7 | "https://wordpress.org/support/plugin/my-elementor-widget\n" 8 | "POT-Creation-Date: 2020-04-16 17:57:06+00:00\n" 9 | "MIME-Version: 1.0\n" 10 | "Content-Type: text/plain; charset=utf-8\n" 11 | "Content-Transfer-Encoding: 8bit\n" 12 | "PO-Revision-Date: 2020-MO-DA HO:MI+ZONE\n" 13 | "Last-Translator: FULL NAME \n" 14 | "Language-Team: LANGUAGE \n" 15 | "X-Generator: grunt-wp-i18n 1.0.3\n" 16 | 17 | #: my-elementor-widget.php:139 18 | msgid "\"%1$s\" requires \"%2$s\" to be installed and activated" 19 | msgstr "" 20 | 21 | #. Plugin Name of the plugin/theme 22 | msgid "My Elementor Widget" 23 | msgstr "" 24 | 25 | #: my-elementor-widget.php:141 my-elementor-widget.php:157 26 | msgid "Elementor" 27 | msgstr "" 28 | 29 | #: my-elementor-widget.php:155 my-elementor-widget.php:172 30 | msgid "\"%1$s\" requires \"%2$s\" version %3$s or greater" 31 | msgstr "" 32 | 33 | #: my-elementor-widget.php:174 34 | msgid "PHP" 35 | msgstr "" 36 | 37 | #: widgets/example.php:11 38 | msgid "Example Widget" 39 | msgstr "" 40 | 41 | #: widgets/example.php:33 42 | msgid "Content Settings" 43 | msgstr "" 44 | 45 | #. Plugin URI of the plugin/theme 46 | msgid "https://example.com" 47 | msgstr "" 48 | 49 | #. Description of the plugin/theme 50 | msgid "A custom elementor widget" 51 | msgstr "" 52 | 53 | #. Author of the plugin/theme 54 | msgid "John Doe" 55 | msgstr "" 56 | 57 | #. Author URI of the plugin/theme 58 | msgid "https://johndoe.me" 59 | msgstr "" -------------------------------------------------------------------------------- /assets/dist/css/public.min.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["assets\\source\\css\\public.css"],"names":[],"mappings":"AACA,YACI,MAAO,KACP,OAAQ,KACR,iBAAkB,QAClB,WAAY,IAAI,IAAK,2BACrB,WAAY,EAAE,MAAO,OAAO,kBAC5B,SAAU,OAEd,kBACI,WAAY,EAAE,MAAO,MAAM,kBAC3B,WAAY,IAAI,IAAK,2BAEzB,mBACI,SAAU,SACV,kBAAmB,UACnB,oBAAqB,OAAO,OAC5B,gBAAiB,MACjB,QAAS,EAEb,qBACI,SAAU,SACV,MAAO,KACP,OAAQ,KACR,IAAK,EACL,KAAM,EACN,OAAQ,EACR,MAAO,EACP,QAAS,GAEb,kCACI,cAAe,EAEnB,sBACI,YAAa,MAAQ,CAAE,WACvB,UAAW,KACX,YAAa,IACb,YAAa,KACb,OAAQ,EAEZ,qBACI,SAAU,SACV,MAAO,MACP,OAAQ,IACR,iBAAkB,gBAClB,cAAe,KACf,WAAY,IAAI,IAAK,2BACrB,QAAS,EAEb,qBACI,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IACb,MAAO,QACP,YAAa,KACb,cAAe,KAEnB,sBACI,cAAe,KACf,QAAS,KACT,gBAAiB,cACjB,YAAa,OAEjB,wCACI,QAAS,aACT,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IACb,eAAgB,KAChB,gBAAiB,KACjB,iBAAkB,QAClB,MAAO,KACP,QAAS,KAAK,KACd,cAAe,IACf,WAAY,IAAI,IAAK,YAEzB,8CACI,iBAAkB,QAClB,MAAO,KAEX,oCACI,SAAU,SACV,QAAS,IAAI,KACb,cAAe,KACf,IAAK,KACL,MAAO,KACP,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IAEjB,uCACI,SAAU,SACV,QAAS,IAAI,KACb,cAAe,KACf,OAAQ,MACR,MAAO,KACP,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IAEjB,0CACI,QAAS,aACT,QAAS,IAAI,KACb,cAAe,KACf,OAAQ,MACR,MAAO,KACP,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IAIjB,2CADA,wCAEA,8CACI,QAAS,GAEb,YACI,iBAAkB,QAClB,MAAO,KAEX,aACI,iBAAkB,KAClB,MAAO,KAEX,YACI,iBAAkB,QAClB,MAAO,KAIX,eACI,WAAY,KAEhB,qCACI,SAAU,SACV,QAAS,KAAK,KAAK,KAAK,KACxB,WAAY,OACZ,YAAa,aAAa,CAAE,WAC5B,QAAS,EAEb,8CACI,SAAU,SACV,IAAK,KACL,MAAO,KACP,iBAAkB,QAClB,MAAO,KACP,QAAS,GACT,QAAS,IAAI,KACb,UAAW,KACX,YAAa,KACb,OAAQ,EACR,cAAe,IACf,YAAa,UAEjB,mDACI,UAAW,KACX,YAAa,IACb,OAAQ,KAAK,EAAE,EAAE,EAErB,sDACI,UAAW,KACX,YAAa,IACb,OAAQ,KAAK,EACb,YAAa,KAEjB,oCACI,iBAAkB,QAClB,QAAS,KACT,YAAa,aAAa,CAAE,WAC5B,QAAS,KACT,gBAAiB,OACjB,YAAa,OAEjB,2CACI,YAAa,aAAa,CAAE,UAC5B,UAAW,KACX,YAAa,IACb,QAAS,EAAI,IAEjB,mDACI,UAAW,KAEf,oDACI,OAAQ,KACR,QAAS,KACT,YAAa,SAEjB,sCACI,QAAS,KACT,WAAY,OAEhB,0CACI,QAAS,KAAK,KACd,YAAa,aAAa,CAAE,WAC5B,UAAW,KACX,YAAa,IACb,cAAe,IAAI,MAAM,gBAE7B,qDACI,OAAQ,EAEZ,qCACI,QAAS,KACT,WAAY,OAEhB,uCACI,QAAS,aACT,QAAS,KAAK,KACd,iBAAkB,QAClB,MAAO,KACP,WAAY,OACZ,YAAa,aAAa,CAAE,WAC5B,YAAa,IACb,eAAgB,GAChB,gBAAiB,KACjB,cAAe,IACf,WAAY,IAAI,IAAK,YAEzB,6CACI,iBAAkB,QAClB,WAAY,IAAI,IAAK"} -------------------------------------------------------------------------------- /assets/vendor/owl-carousel/css/owl.carousel.min.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | .owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;touch-action:manipulation;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel .owl-nav button.owl-next,.owl-carousel .owl-nav button.owl-prev,.owl-carousel button.owl-dot{background:0 0;color:inherit;border:none;padding:0!important;font:inherit}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-ms-touch-action:pan-y;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item .owl-lazy:not([src]),.owl-carousel .owl-item .owl-lazy[src^=""]{max-height:0}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.png) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%} -------------------------------------------------------------------------------- /assets/dist/css/public.min.css: -------------------------------------------------------------------------------- 1 | .image-card{width:100%;height:auto;background-color:#fff9f9;transition:all .6s cubic-bezier(.25,.8,.25,1);box-shadow:0 .2rem 2.8rem rgba(36,36,36,.1);overflow:hidden}.image-card:hover{box-shadow:0 .1rem .8rem rgba(36,36,36,.1);transition:all .6s cubic-bezier(.25,.8,.25,1)}.image-card .image{position:relative;background-repeat:no-repeat;background-position:center center;background-size:cover;z-index:0}.image-card .image a{position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0;z-index:10}.image-card .content p:last-child{margin-bottom:0}.image-card .title h2{font-family:Ubuntu,sans-serif;font-size:23px;font-weight:500;line-height:30px;margin:0}.image-card .divider{position:relative;width:100px;height:2px;background-color:rgba(0,0,0,.05);margin-bottom:15px;transition:all .3s cubic-bezier(.25,.8,.25,1);z-index:0}.image-card .excerpt{font-family:'Nunito Sans',sans-serif;font-size:18px;font-weight:400;color:#707070;line-height:27px;margin-bottom:30px}.image-card .readmore{margin-bottom:15px;display:flex;justify-content:space-between;align-items:center}.image-card .readmore a.button-readmore{display:inline-block;font-family:'Nunito Sans',sans-serif;font-size:16px;font-weight:400;letter-spacing:.5px;text-decoration:none;background-color:#562dd4;color:#fff;padding:12px 25px;border-radius:4px;transition:all .3s ease-in-out}.image-card .readmore a.button-readmore:hover{background-color:#707070;color:#fff}.image-card .image .top-price-badge{position:absolute;padding:4px 12px;border-radius:30px;top:15px;right:30px;font-family:'Nunito Sans',sans-serif;font-size:14px;font-weight:500}.image-card .image .middle-price-badge{position:absolute;padding:4px 12px;border-radius:30px;bottom:-15px;right:30px;font-family:'Nunito Sans',sans-serif;font-size:14px;font-weight:500}.image-card .readmore .bottom-price-badge{display:inline-block;padding:4px 12px;border-radius:30px;bottom:-15px;right:30px;font-family:'Nunito Sans',sans-serif;font-size:14px;font-weight:500}.image-card .image .middle-price-badge del,.image-card .image .top-price-badge del,.image-card .readmore .bottom-price-badge del{opacity:.5}.badge-blue{background-color:#562dd4;color:#fff}.badge-white{background-color:#fff;color:#111}.badge-gray{background-color:#707070;color:#fff}.pricing-table{background:#fff}.pricing-table .pricing-table-header{position:relative;padding:40px 30px 30px 30px;text-align:center;font-family:'Nunito Sans',sans-serif;z-index:0}.pricing-table .pricing-table-header .popular{position:absolute;top:15px;right:15px;background-color:#4169e1;color:#fff;z-index:10;padding:5px 10px;font-size:13px;line-height:18px;margin:0;border-radius:4px;font-family:monospace}.pricing-table .pricing-table-header .header-title{font-size:20px;font-weight:600;margin:30px 0 0 0}.pricing-table .pricing-table-header .header-subtitle{font-size:16px;font-weight:400;margin:15px 0;line-height:30px}.pricing-table .pricing-table-price{background-color:#f9f9f9;padding:30px;font-family:'Nunito Sans',sans-serif;display:flex;justify-content:center;align-items:center}.pricing-table .pricing-table-price .price{font-family:'Nunito Sans',monospace;font-size:48px;font-weight:700;padding:0 5px}.pricing-table .pricing-table-price .price-divider{font-size:48px}.pricing-table .pricing-table-price .price-duration{height:50px;display:flex;align-items:flex-end}.pricing-table .pricing-table-feature{padding:20px;text-align:center}.pricing-table .pricing-table-feature div{padding:10px 20px;font-family:'Nunito Sans',sans-serif;font-size:16px;font-weight:500;border-bottom:1px solid rgba(0,0,0,.02)}.pricing-table .pricing-table-feature div:last-child{border:0}.pricing-table .pricing-table-action{padding:30px;text-align:center}.pricing-table .pricing-table-action a{display:inline-block;padding:12px 26px;background-color:#707070;color:#fff;text-align:center;font-family:'Nunito Sans',sans-serif;font-weight:600;letter-spacing:.9;text-decoration:none;border-radius:4px;transition:all .3s ease-in-out}.pricing-table .pricing-table-action a:hover{background-color:#562dd4;transition:all .3s ease-in-out} 2 | /*# sourceMappingURL=public.min.css.map */ -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | module.exports = function( grunt ) { 3 | var pkg = grunt.file.readJSON( 'package.json' ); 4 | grunt.initConfig( { 5 | // Settings folder directories 6 | dirs: { 7 | dist: 'assets/dist/', 8 | source: 'assets/source/', 9 | }, 10 | 11 | // Minify all css files 12 | cssmin: { 13 | options: { 14 | mergeIntoShorthands: false, 15 | sourceMap: true, 16 | root: 'root', 17 | }, 18 | target: { 19 | files: { 20 | '<%= dirs.dist %>/css/public.min.css': [ 21 | '<%= dirs.source %>/css/public.css' 22 | ] 23 | } 24 | } 25 | }, 26 | 27 | // Minify all js files 28 | uglify: { 29 | options: { 30 | mangle: false, 31 | sourceMap: true, 32 | }, 33 | my_target: { 34 | files: { 35 | '<%= dirs.dist %>/js/public.min.js': [ 36 | '<%= dirs.source %>/js/public.js' 37 | ] 38 | } 39 | } 40 | }, 41 | 42 | // Watch all changes 43 | watcher: { 44 | css: { 45 | files: [ '<%= dirs.source %>/css/*.css' ], 46 | tasks: [ 'cssmin' ], 47 | }, 48 | scripts: { 49 | files: [ '<%= dirs.source %>/js/*.js' ], 50 | tasks: [ 'uglify' ] 51 | }, 52 | }, 53 | 54 | // Generate POT file 55 | makepot: { 56 | target: { 57 | options: { 58 | domainPath: '/languages/', 59 | potFilename: 'my-elementor-widget', 60 | type: 'wp-plugin', 61 | } 62 | } 63 | }, 64 | 65 | // clean the build dir 66 | clean: { 67 | main: [ 'build/' ] 68 | }, 69 | 70 | // Copy the plugin into the build dir 71 | copy: { 72 | main: { 73 | src: [ 74 | '**', 75 | '!node_modules/**', 76 | '!build/**', 77 | '!testing/**', 78 | '!bin/**', 79 | '!.git/**', 80 | '!Gruntfile.js', 81 | '!package.json', 82 | '!package-lock.json', 83 | '!debug.log', 84 | '!phpunit.xml', 85 | '!.gitignore', 86 | '!.gitmodules', 87 | '!npm-debug.log', 88 | '!assets/less/**', 89 | '!tests/**', 90 | '!**/Gruntfile.js', 91 | '!**/package.json', 92 | '!**/README.md', 93 | '!**/export.sh', 94 | '!**/*~' 95 | ], 96 | dest: 'build/' 97 | } 98 | }, 99 | 100 | // Compress Everything 101 | compress: { 102 | main: { 103 | options: { 104 | mode: 'zip', 105 | archive: './build/my-elementor-widget-v-' + pkg.version + '.zip', 106 | }, 107 | expand: true, 108 | cwd: 'build/', 109 | src: [ '**/*' ], 110 | dest: 'my-elementor-widget' 111 | } 112 | }, 113 | 114 | // Generate Text Domain 115 | addtextdomain: { 116 | options: { 117 | textdomain: 'my-elementor-widget', 118 | updateDomains: [ 'my-elementor-widget' ] 119 | }, 120 | target: { 121 | files: { 122 | src: [ 123 | '*.php', 124 | '**/*.php', 125 | '!node_modules/**', 126 | '!tests/**' 127 | ] 128 | } 129 | } 130 | } 131 | }); 132 | 133 | // Load npm tasks 134 | grunt.loadNpmTasks( 'grunt-wp-i18n' ); 135 | grunt.loadNpmTasks( 'grunt-contrib-clean' ); 136 | grunt.loadNpmTasks( 'grunt-contrib-copy' ); 137 | grunt.loadNpmTasks( 'grunt-contrib-compress' ); 138 | grunt.loadNpmTasks( 'grunt-contrib-cssmin' ); 139 | grunt.loadNpmTasks( 'grunt-contrib-uglify' ); 140 | grunt.loadNpmTasks( 'grunt-watcher' ); 141 | 142 | // Register Grunt NPM Tasks 143 | grunt.registerTask( 'default', [ 'clean', 'cssmin', 'uglify', 'watcher' ] ); 144 | grunt.registerTask( 'release', [ 'makepot' ] ); 145 | grunt.registerTask( 'textdomain', [ 'addtextdomain' ] ); 146 | grunt.registerTask( 'zip', [ 'clean', 'cssmin', 'uglify', 'copy', 'compress' ] ); 147 | } -------------------------------------------------------------------------------- /assets/source/css/public.css: -------------------------------------------------------------------------------- 1 | /* Preview Card Style */ 2 | .image-card { 3 | width: 100%; 4 | height: auto; 5 | background-color: #FFF9F9; 6 | transition: all 0.6s cubic-bezier(.25,.8,.25,1); 7 | box-shadow: 0 0.2rem 2.8rem rgba(36,36,36,.1); 8 | overflow: hidden; 9 | } 10 | .image-card:hover { 11 | box-shadow: 0 0.1rem .8rem rgba(36,36,36,.1); 12 | transition: all 0.6s cubic-bezier(.25,.8,.25,1); 13 | } 14 | .image-card .image { 15 | position: relative; 16 | background-repeat: no-repeat; 17 | background-position: center center; 18 | background-size: cover; 19 | z-index: 0; 20 | } 21 | .image-card .image a { 22 | position: absolute; 23 | width: 100%; 24 | height: 100%; 25 | top: 0px; 26 | left: 0px; 27 | bottom: 0px; 28 | right: 0px; 29 | z-index: 10; 30 | } 31 | .image-card .content p:last-child { 32 | margin-bottom: 0px; 33 | } 34 | .image-card .title h2 { 35 | font-family: 'Ubuntu', sans-serif; 36 | font-size: 23px; 37 | font-weight: 500; 38 | line-height: 30px; 39 | margin: 0; 40 | } 41 | .image-card .divider { 42 | position: relative; 43 | width: 100px; 44 | height: 2px; 45 | background-color: rgba( 0,0,0,0.05 ); 46 | margin-bottom: 15px; 47 | transition: all 0.3s cubic-bezier(.25,.8,.25,1); 48 | z-index: 0; 49 | } 50 | .image-card .excerpt { 51 | font-family: 'Nunito Sans', sans-serif; 52 | font-size: 18px; 53 | font-weight: 400; 54 | color: #707070; 55 | line-height: 27px; 56 | margin-bottom: 30px; 57 | } 58 | .image-card .readmore { 59 | margin-bottom: 15px; 60 | display: flex; 61 | justify-content: space-between; 62 | align-items: center; 63 | } 64 | .image-card .readmore a.button-readmore { 65 | display: inline-block; 66 | font-family: 'Nunito Sans', sans-serif; 67 | font-size: 16px; 68 | font-weight: 400; 69 | letter-spacing: .5px; 70 | text-decoration: none; 71 | background-color: #562dd4; 72 | color: #fff; 73 | padding: 12px 25px; 74 | border-radius: 4px; 75 | transition: all 0.3s ease-in-out; 76 | } 77 | .image-card .readmore a.button-readmore:hover { 78 | background-color: #707070; 79 | color: #fff; 80 | } 81 | .image-card .image .top-price-badge { 82 | position: absolute; 83 | padding: 4px 12px; 84 | border-radius: 30px; 85 | top: 15px; 86 | right: 30px; 87 | font-family: 'Nunito Sans', sans-serif; 88 | font-size: 14px; 89 | font-weight: 500; 90 | } 91 | .image-card .image .middle-price-badge { 92 | position: absolute; 93 | padding: 4px 12px; 94 | border-radius: 30px; 95 | bottom: -15px; 96 | right: 30px; 97 | font-family: 'Nunito Sans', sans-serif; 98 | font-size: 14px; 99 | font-weight: 500; 100 | } 101 | .image-card .readmore .bottom-price-badge { 102 | display: inline-block; 103 | padding: 4px 12px; 104 | border-radius: 30px; 105 | bottom: -15px; 106 | right: 30px; 107 | font-family: 'Nunito Sans', sans-serif; 108 | font-size: 14px; 109 | font-weight: 500; 110 | } 111 | 112 | .image-card .image .top-price-badge del, 113 | .image-card .image .middle-price-badge del, 114 | .image-card .readmore .bottom-price-badge del { 115 | opacity: 0.5; 116 | } 117 | .badge-blue { 118 | background-color: #562dd4; 119 | color: #fff; 120 | } 121 | .badge-white { 122 | background-color: #fff; 123 | color: #111; 124 | } 125 | .badge-gray { 126 | background-color: #707070; 127 | color: #fff; 128 | } 129 | 130 | /* Pricing Table */ 131 | .pricing-table { 132 | background: #fff; 133 | } 134 | .pricing-table .pricing-table-header { 135 | position: relative; 136 | padding: 40px 30px 30px 30px; 137 | text-align: center; 138 | font-family: 'Nunito Sans', sans-serif; 139 | z-index: 0; 140 | } 141 | .pricing-table .pricing-table-header .popular { 142 | position: absolute; 143 | top: 15px; 144 | right: 15px; 145 | background-color: royalblue; 146 | color: #fff; 147 | z-index: 10; 148 | padding: 5px 10px; 149 | font-size: 13px; 150 | line-height: 18px; 151 | margin: 0; 152 | border-radius: 4px; 153 | font-family: monospace; 154 | } 155 | .pricing-table .pricing-table-header .header-title { 156 | font-size: 20px; 157 | font-weight: 600; 158 | margin: 30px 0 0 0; 159 | } 160 | .pricing-table .pricing-table-header .header-subtitle { 161 | font-size: 16px; 162 | font-weight: 400; 163 | margin: 15px 0; 164 | line-height: 30px; 165 | } 166 | .pricing-table .pricing-table-price { 167 | background-color: #f9f9f9; 168 | padding: 30px; 169 | font-family: 'Nunito Sans', sans-serif; 170 | display: flex; 171 | justify-content: center; 172 | align-items: center; 173 | } 174 | .pricing-table .pricing-table-price .price { 175 | font-family: 'Nunito Sans', monospace; 176 | font-size: 48px; 177 | font-weight: 700; 178 | padding: 0px 5px; 179 | } 180 | .pricing-table .pricing-table-price .price-divider { 181 | font-size: 48px; 182 | } 183 | .pricing-table .pricing-table-price .price-duration { 184 | height: 50px; 185 | display: flex; 186 | align-items: flex-end; 187 | } 188 | .pricing-table .pricing-table-feature { 189 | padding: 20px; 190 | text-align: center; 191 | } 192 | .pricing-table .pricing-table-feature div { 193 | padding: 10px 20px; 194 | font-family: 'Nunito Sans', sans-serif; 195 | font-size: 16px; 196 | font-weight: 500; 197 | border-bottom: 1px solid rgba( 0, 0, 0, 0.02 ); 198 | } 199 | .pricing-table .pricing-table-feature div:last-child { 200 | border: 0; 201 | } 202 | .pricing-table .pricing-table-action { 203 | padding: 30px; 204 | text-align: center; 205 | } 206 | .pricing-table .pricing-table-action a { 207 | display: inline-block; 208 | padding: 12px 26px; 209 | background-color: #707070; 210 | color: #fff; 211 | text-align: center; 212 | font-family: 'Nunito Sans', sans-serif; 213 | font-weight: 600; 214 | letter-spacing: 0.9; 215 | text-decoration: none; 216 | border-radius: 4px; 217 | transition: all 0.3s ease-in-out; 218 | } 219 | .pricing-table .pricing-table-action a:hover { 220 | background-color: #562dd4; 221 | transition: all 0.3s ease-in-out; 222 | } -------------------------------------------------------------------------------- /my-elementor-widget.php: -------------------------------------------------------------------------------- 1 | define_constants(); 50 | add_action( 'wp_enqueue_scripts', [ $this, 'scripts_styles' ] ); 51 | add_action( 'init', [ $this, 'i18n' ] ); 52 | add_action( 'plugins_loaded', [ $this, 'init' ] ); 53 | } 54 | 55 | /** 56 | * Define Plugin Constants 57 | * @since 1.0.0 58 | */ 59 | public function define_constants() { 60 | define( 'MYEW_PLUGIN_URL', trailingslashit( plugins_url( '/', __FILE__ ) ) ); 61 | define( 'MYEW_PLUGIN_PATH', trailingslashit( plugin_dir_path( __FILE__ ) ) ); 62 | } 63 | 64 | /** 65 | * Load Scripts & Styles 66 | * @since 1.0.0 67 | */ 68 | public function scripts_styles() { 69 | wp_register_style( 'myew-owl-carousel', MYEW_PLUGIN_URL . 'assets/vendor/owl-carousel/css/owl.carousel.min.css', [], rand(), 'all' ); 70 | wp_register_style( 'myew-owl-carousel-theme', MYEW_PLUGIN_URL . 'assets/vendor/owl-carousel/css/owl.theme.default.min.css', [], rand(), 'all' ); 71 | wp_register_script( 'myew-owl-carousel', MYEW_PLUGIN_URL . 'assets/vendor/owl-carousel/js/owl.carousel.min.js', [ 'jquery' ], rand(), true ); 72 | 73 | wp_register_style( 'myew-style', MYEW_PLUGIN_URL . 'assets/dist/css/public.min.css', [], rand(), 'all' ); 74 | wp_register_script( 'myew-script', MYEW_PLUGIN_URL . 'assets/dist/js/public.min.js', [ 'jquery' ], rand(), true ); 75 | 76 | wp_enqueue_style( 'myew-owl-carousel' ); 77 | wp_enqueue_style( 'myew-owl-carousel-theme' ); 78 | wp_enqueue_script( 'myew-owl-carousel' ); 79 | wp_enqueue_style( 'myew-style' ); 80 | wp_enqueue_script( 'myew-script' ); 81 | } 82 | 83 | /** 84 | * Load Text Domain 85 | * @since 1.0.0 86 | */ 87 | public function i18n() { 88 | load_plugin_textdomain( 'my-elementor-widget', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 89 | } 90 | 91 | /** 92 | * Initialize the plugin 93 | * @since 1.0.0 94 | */ 95 | public function init() { 96 | // Check if the ELementor installed and activated 97 | if( ! did_action( 'elementor/loaded' ) ) { 98 | add_action( 'admin_notices', [ $this, 'admin_notice_missing_main_plugin' ] ); 99 | return; 100 | } 101 | 102 | if( ! version_compare( ELEMENTOR_VERSION, self::MINIMUM_ELEMENTOR_VERSION, '>=' ) ) { 103 | add_action( 'admin_notices', [ $this, 'admin_notice_minimum_elementor_version' ] ); 104 | return; 105 | } 106 | 107 | if( ! version_compare( PHP_VERSION, self::MINIMUM_PHP_VERSION, '>=' ) ) { 108 | add_action( 'admin_notices', [ $this, 'admin_notice_minimum_php_version' ] ); 109 | return; 110 | } 111 | 112 | add_action( 'elementor/init', [ $this, 'init_category' ] ); 113 | add_action( 'elementor/widgets/widgets_registered', [ $this, 'init_widgets' ] ); 114 | } 115 | 116 | /** 117 | * Init Widgets 118 | * @since 1.0.0 119 | */ 120 | public function init_widgets() { 121 | require_once MYEW_PLUGIN_PATH . '/widgets/preview-card.php'; 122 | require_once MYEW_PLUGIN_PATH . '/widgets/pricing-table.php'; 123 | require_once MYEW_PLUGIN_PATH . '/widgets/logo-carousel.php'; 124 | } 125 | 126 | /** 127 | * Init Category Section 128 | * @since 1.0.0 129 | */ 130 | public function init_category() { 131 | Elementor\Plugin::instance()->elements_manager->add_category( 132 | 'myew-for-elementor', 133 | [ 134 | 'title' => 'My Elementor Widgets' 135 | ], 136 | 1 137 | ); 138 | } 139 | 140 | /** 141 | * Admin Notice 142 | * Warning when the site doesn't have Elementor installed or activated 143 | * @since 1.0.0 144 | */ 145 | public function admin_notice_missing_main_plugin() { 146 | if( isset( $_GET[ 'activate' ] ) ) unset( $_GET[ 'activate' ] ); 147 | $message = sprintf( 148 | esc_html__( '"%1$s" requires "%2$s" to be installed and activated', 'my-elementor-widget' ), 149 | ''.esc_html__( 'My Elementor Widget', 'my-elementor-widget' ).'', 150 | ''.esc_html__( 'Elementor', 'my-elementor-widget' ).'' 151 | ); 152 | 153 | printf( '

%1$s

', $message ); 154 | } 155 | 156 | /** 157 | * Admin Notice 158 | * Warning when the site doesn't have a minimum required Elementor version. 159 | * @since 1.0.0 160 | */ 161 | public function admin_notice_minimum_elementor_version() { 162 | if( isset( $_GET[ 'activate' ] ) ) unset( $_GET[ 'activate' ] ); 163 | $message = sprintf( 164 | esc_html__( '"%1$s" requires "%2$s" version %3$s or greater', 'my-elementor-widget' ), 165 | ''.esc_html__( 'My Elementor Widget', 'my-elementor-widget' ).'', 166 | ''.esc_html__( 'Elementor', 'my-elementor-widget' ).'', 167 | self::MINIMUM_ELEMENTOR_VERSION 168 | ); 169 | 170 | printf( '

%1$s

', $message ); 171 | } 172 | 173 | /** 174 | * Admin Notice 175 | * Warning when the site doesn't have a minimum required PHP version. 176 | * @since 1.0.0 177 | */ 178 | public function admin_notice_minimum_php_version() { 179 | if( isset( $_GET[ 'activate' ] ) ) unset( $_GET[ 'activate' ] ); 180 | $message = sprintf( 181 | esc_html__( '"%1$s" requires "%2$s" version %3$s or greater', 'my-elementor-widget' ), 182 | ''.esc_html__( 'My Elementor Widget', 'my-elementor-widget' ).'', 183 | ''.esc_html__( 'PHP', 'my-elementor-widget' ).'', 184 | self::MINIMUM_PHP_VERSION 185 | ); 186 | 187 | printf( '

%1$s

', $message ); 188 | } 189 | 190 | } 191 | 192 | MY_Elementor_Widget::instance(); -------------------------------------------------------------------------------- /widgets/logo-carousel.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 30 | 'content_settings', 31 | [ 32 | 'label' => __( 'Content Settings', 'my-elementor-widget' ), 33 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 34 | ] 35 | ); 36 | // Slider Repeater 37 | $repeater = new \Elementor\Repeater(); 38 | $repeater->add_control( 39 | 'slider_title', 40 | [ 41 | 'label' => __( 'Title', 'my-elementor-widget' ), 42 | 'type' => \Elementor\Controls_Manager::TEXT, 43 | 'default' => __( 'SLider Title #1', 'my-elementor-widget' ), 44 | 'label_block' => true 45 | ] 46 | ); 47 | $repeater->add_control( 48 | 'slider_image', 49 | [ 50 | 'label' => __( 'Image', 'my-elementor-widget' ), 51 | 'type' => \Elementor\Controls_Manager::MEDIA, 52 | 'default' => [ 53 | 'url' => \Elementor\Utils::get_placeholder_image_src(), 54 | ], 55 | ], 56 | ); 57 | $this->add_control( 58 | 'slider', 59 | [ 60 | 'label' => __( 'Slider Items', 'my-elementor-widget' ), 61 | 'type' => \Elementor\Controls_Manager::REPEATER, 62 | 'fields' => $repeater->get_controls(), 63 | 'default' => [ 64 | [ 65 | 'slider_title' => __( 'Slider title #1', 'my-elementor-widget' ), 66 | ], 67 | ], 68 | 'title_field' => '{{{ slider_title }}}', 69 | ] 70 | ); 71 | $this->end_controls_section(); 72 | 73 | // Slider Settings 74 | $this->start_controls_section( 75 | 'slider_settings', 76 | [ 77 | 'label' => __( 'Slider Settings', 'my-elementor-widget' ), 78 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 79 | ] 80 | ); 81 | // show Loop 82 | $this->add_control( 83 | 'loop', 84 | [ 85 | 'label' => __( 'Loop', 'plugin-domain' ), 86 | 'type' => \Elementor\Controls_Manager::SWITCHER, 87 | 'label_on' => __( 'Show', 'your-plugin' ), 88 | 'label_off' => __( 'Hide', 'your-plugin' ), 89 | 'return_value' => true, 90 | 'default' => true, 91 | ] 92 | ); 93 | 94 | // show Dots 95 | $this->add_control( 96 | 'dots', 97 | [ 98 | 'label' => __( 'Dots', 'plugin-domain' ), 99 | 'type' => \Elementor\Controls_Manager::SWITCHER, 100 | 'label_on' => __( 'Show', 'your-plugin' ), 101 | 'label_off' => __( 'Hide', 'your-plugin' ), 102 | 'return_value' => true, 103 | 'default' => true, 104 | ] 105 | ); 106 | 107 | // Show Navs 108 | $this->add_control( 109 | 'navs', 110 | [ 111 | 'label' => __( 'Navs', 'plugin-domain' ), 112 | 'type' => \Elementor\Controls_Manager::SWITCHER, 113 | 'label_on' => __( 'Show', 'your-plugin' ), 114 | 'label_off' => __( 'Hide', 'your-plugin' ), 115 | 'return_value' => true, 116 | 'default' => true, 117 | ] 118 | ); 119 | 120 | // Margin 121 | $this->add_control( 122 | 'margin', 123 | [ 124 | 'label' => __( 'Margin', 'plugin-domain' ), 125 | 'type' => \Elementor\Controls_Manager::NUMBER, 126 | 'default' => 10, 127 | 'placeholder' => __( 'Enter the margin between to slides', 'plugin-domain' ), 128 | ] 129 | ); 130 | 131 | $this->end_controls_section(); 132 | } 133 | 134 | private function style_tab() {} 135 | 136 | protected function render() { 137 | $settings = $this->get_settings_for_display(); 138 | $this->add_render_attribute( 139 | 'logo_carousel_options', 140 | [ 141 | 'id' => 'logo-carousel-' . $this->get_id(), 142 | 'data-loop' => $settings[ 'loop' ], 143 | 'data-dots' => $settings[ 'dots' ], 144 | 'data-navs' => $settings[ 'navs' ], 145 | 'data-margin' => $settings[ 'margin' ], 146 | ] 147 | ); 148 | ?> 149 | 156 | 161 | <# 162 | view.addRenderAttribute( 163 | 'logo_carousel_options', 164 | { 165 | 'id': 'logo-carousel-id', 166 | 'data-loop': settings.loop, 167 | 'data-dots': settings.dots, 168 | 'data-navs': settings.navs, 169 | 'data-margin': settings.margin 170 | } 171 | ); 172 | #> 173 | <# if( settings.slider.length ) { #> 174 | 181 | <# } #> 182 | widgets_manager->register_widget_type( new MYEW_Logo_Carousel_Widget() ); -------------------------------------------------------------------------------- /widgets/pricing-table.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 31 | 'header_section', 32 | [ 33 | 'label' => __( 'Header', 'my-elementor-widget' ), 34 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 35 | ] 36 | ); 37 | 38 | // Title 39 | $this->add_control( 40 | 'header_title', 41 | [ 42 | 'label' => __( 'Title', 'plugin-domain' ), 43 | 'type' => \Elementor\Controls_Manager::TEXT, 44 | 'default' => __( 'Pricing Title', 'plugin-domain' ), 45 | 'label_block' => true, 46 | 'placeholder' => __( 'Type your title here', 'plugin-domain' ), 47 | ] 48 | ); 49 | 50 | // Description 51 | $this->add_control( 52 | 'header_description', 53 | [ 54 | 'label' => __( 'Description', 'plugin-domain' ), 55 | 'type' => \Elementor\Controls_Manager::TEXTAREA, 56 | 'rows' => 5, 57 | 'default' => __( 'Default description', 'plugin-domain' ), 58 | 'placeholder' => __( 'Type your description here', 'plugin-domain' ), 59 | ] 60 | ); 61 | 62 | // Show Badge 63 | $this->add_control( 64 | 'show_badge', 65 | [ 66 | 'label' => __( 'Show Badge', 'plugin-domain' ), 67 | 'type' => \Elementor\Controls_Manager::SWITCHER, 68 | 'label_on' => __( 'Show', 'your-plugin' ), 69 | 'label_off' => __( 'Hide', 'your-plugin' ), 70 | 'return_value' => 'yes', 71 | 'default' => 'yes', 72 | ] 73 | ); 74 | 75 | // Badge Text 76 | $this->add_control( 77 | 'header_badge_text', 78 | [ 79 | 'label' => __( 'Badge Text', 'plugin-domain' ), 80 | 'type' => \Elementor\Controls_Manager::TEXT, 81 | 'default' => __( 'Popular', 'plugin-domain' ), 82 | 'label_block' => true, 83 | 'placeholder' => __( 'Badge text', 'plugin-domain' ), 84 | 'condition' => [ 85 | 'show_badge' => 'yes' 86 | ] 87 | ] 88 | ); 89 | 90 | $this->end_controls_section(); 91 | 92 | // Price Settings 93 | $this->start_controls_section( 94 | 'price_section', 95 | [ 96 | 'label' => __( 'Pricing', 'my-elementor-widget' ), 97 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 98 | ] 99 | ); 100 | 101 | // Price 102 | $this->add_control( 103 | 'pricing_price', 104 | [ 105 | 'label' => __( 'Price', 'plugin-domain' ), 106 | 'type' => \Elementor\Controls_Manager::TEXT, 107 | 'default' => __( '$99', 'plugin-domain' ), 108 | 'label_block' => true, 109 | 'placeholder' => __( 'Type your price here', 'plugin-domain' ), 110 | ] 111 | ); 112 | 113 | // Duration 114 | $this->add_control( 115 | 'pricing_duration', 116 | [ 117 | 'label' => __( 'Duration', 'plugin-domain' ), 118 | 'type' => \Elementor\Controls_Manager::TEXT, 119 | 'default' => __( 'year', 'plugin-domain' ), 120 | 'label_block' => true, 121 | 'placeholder' => __( 'Type your duration here', 'plugin-domain' ), 122 | ] 123 | ); 124 | 125 | $this->end_controls_section(); 126 | 127 | // Listing Settings 128 | $this->start_controls_section( 129 | 'listing_section', 130 | [ 131 | 'label' => __( 'Listing', 'my-elementor-widget' ), 132 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 133 | ] 134 | ); 135 | 136 | // List Repeater 137 | $repeater = new \Elementor\Repeater(); 138 | $repeater->add_control( 139 | 'feature_text', 140 | [ 141 | 'label' => __( 'Feature Text', 'plugin-domain' ), 142 | 'type' => \Elementor\Controls_Manager::TEXT, 143 | 'default' => __( '' , 'plugin-domain' ), 144 | 'label_block' => true, 145 | ] 146 | ); 147 | $repeater->add_control( 148 | 'feature_icon', 149 | [ 150 | 'label' => __( 'Feature Icon', 'text-domain' ), 151 | 'type' => \Elementor\Controls_Manager::ICONS, 152 | 'default' => [ 153 | 'value' => 'fas fa-check', 154 | 'library' => 'solid', 155 | ], 156 | ] 157 | ); 158 | 159 | $this->add_control( 160 | 'list', 161 | [ 162 | 'label' => __( 'Repeater List', 'plugin-domain' ), 163 | 'type' => \Elementor\Controls_Manager::REPEATER, 164 | 'fields' => $repeater->get_controls(), 165 | 'default' => [ 166 | [ 167 | 'feature_text' => __( 'upto 5 users', 'plugin-domain' ), 168 | ], 169 | [ 170 | 'feature_text' => __( 'max 100 items/month', 'plugin-domain' ), 171 | ], 172 | [ 173 | 'feature_text' => __( '500 quries', 'plugin-domain' ), 174 | ], 175 | [ 176 | 'feature_text' => __( 'basic statistic', 'plugin-domain' ), 177 | ], 178 | ], 179 | 'title_field' => '{{{ feature_text }}}', 180 | ] 181 | ); 182 | 183 | $this->end_controls_section(); 184 | 185 | // Button Settings 186 | $this->start_controls_section( 187 | 'button_section', 188 | [ 189 | 'label' => __( 'Button', 'my-elementor-widget' ), 190 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 191 | ] 192 | ); 193 | 194 | $this->end_controls_section(); 195 | 196 | // Style Tab 197 | $this->style_tab(); 198 | } 199 | 200 | private function style_tab() {} 201 | 202 | protected function render() { 203 | $settings = $this->get_settings_for_display(); 204 | ?> 205 |
206 |
207 | 208 | 209 | 210 |

211 |

212 |
213 |
214 |
215 |
/
216 |
217 |
218 |
219 | 220 |
'true' ] ); ?>
221 | 222 |
223 |
224 | Get This Plan 225 |
226 |
227 | widgets_manager->register_widget_type( new MYEW_Pricing_Table_Widget() ); -------------------------------------------------------------------------------- /widgets/preview-card.php: -------------------------------------------------------------------------------- 1 | start_controls_section( 31 | 'image_section', 32 | [ 33 | 'label' => __( 'Image', 'my-elementor-widget' ), 34 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 35 | ] 36 | ); 37 | 38 | // Image 39 | $this->add_control( 40 | 'image', 41 | [ 42 | 'label' => __( 'Choose Image', 'plugin-domain' ), 43 | 'type' => \Elementor\Controls_Manager::MEDIA, 44 | 'default' => [ 45 | 'url' => \Elementor\Utils::get_placeholder_image_src(), 46 | ], 47 | ] 48 | ); 49 | 50 | // Show Image link 51 | $this->add_control( 52 | 'show_image_link', 53 | [ 54 | 'label' => __( 'Show Image Link', 'plugin-domain' ), 55 | 'type' => \Elementor\Controls_Manager::SWITCHER, 56 | 'label_on' => __( 'Show', 'your-plugin' ), 57 | 'label_off' => __( 'Hide', 'your-plugin' ), 58 | 'return_value' => 'yes', 59 | 'default' => 'yes', 60 | ] 61 | ); 62 | 63 | // Image Link 64 | $this->add_control( 65 | 'image_link', 66 | [ 67 | 'label' => __( 'Image Link', 'plugin-domain' ), 68 | 'type' => \Elementor\Controls_Manager::URL, 69 | 'placeholder' => __( 'https://your-link.com', 'plugin-domain' ), 70 | 'show_external' => true, 71 | 'default' => [ 72 | 'url' => '', 73 | 'is_external' => true, 74 | 'nofollow' => true, 75 | ], 76 | 'condition' => [ 77 | 'show_image_link' => 'yes' 78 | ] 79 | ] 80 | ); 81 | 82 | $this->end_controls_section(); 83 | 84 | // Content Settings 85 | $this->start_controls_section( 86 | 'content_section', 87 | [ 88 | 'label' => __( 'Content', 'my-elementor-widget' ), 89 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 90 | ] 91 | ); 92 | 93 | // Title 94 | $this->add_control( 95 | 'card_title', 96 | [ 97 | 'label' => __( 'Title', 'plugin-domain' ), 98 | 'type' => \Elementor\Controls_Manager::TEXT, 99 | 'default' => __( 'Default title', 'plugin-domain' ), 100 | 'label_block' => true, 101 | 'placeholder' => __( 'Type your title here', 'plugin-domain' ), 102 | ] 103 | ); 104 | 105 | // Divider 106 | $this->add_control( 107 | 'show_divider', 108 | [ 109 | 'label' => __( 'Show Divider', 'plugin-domain' ), 110 | 'type' => \Elementor\Controls_Manager::SWITCHER, 111 | 'label_on' => __( 'Show', 'plugin-domain' ), 112 | 'label_off' => __( 'Hide', 'plugin-domain' ), 113 | 'return_value' => 'yes', 114 | 'default' => 'yes', 115 | ] 116 | ); 117 | 118 | // Content 119 | $this->add_control( 120 | 'item_description', 121 | [ 122 | 'label' => __( 'Description', 'plugin-domain' ), 123 | 'type' => \Elementor\Controls_Manager::WYSIWYG, 124 | 'default' => __( 'Default description', 'plugin-domain' ), 125 | 'placeholder' => __( 'Type your description here', 'plugin-domain' ), 126 | ] 127 | ); 128 | 129 | $this->end_controls_section(); 130 | 131 | // Badge Settings 132 | $this->start_controls_section( 133 | 'badge_section', 134 | [ 135 | 'label' => __( 'Badge', 'my-elementor-widget' ), 136 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 137 | ] 138 | ); 139 | 140 | // Top badge 141 | $this->add_control( 142 | 'show_top_badge', 143 | [ 144 | 'label' => __( 'Show Top Badge', 'plugin-domain' ), 145 | 'type' => \Elementor\Controls_Manager::SWITCHER, 146 | 'label_on' => __( 'Show', 'your-plugin' ), 147 | 'label_off' => __( 'Hide', 'your-plugin' ), 148 | 'return_value' => 'yes', 149 | 'default' => 'yes', 150 | ] 151 | ); 152 | 153 | // Top Badge Text 154 | $this->add_control( 155 | 'top_badge_text', 156 | [ 157 | 'label' => __( 'Top Badge Text', 'plugin-domain' ), 158 | 'type' => \Elementor\Controls_Manager::TEXT, 159 | 'default' => __( 'On Sale!', 'plugin-domain' ), 160 | 'placeholder' => __( 'Type your title here', 'plugin-domain' ), 161 | 'condition' => [ 162 | 'show_top_badge' => 'yes' 163 | ] 164 | ] 165 | ); 166 | 167 | // Middle badge 168 | $this->add_control( 169 | 'show_middle_badge', 170 | [ 171 | 'label' => __( 'Show Middle Badge', 'plugin-domain' ), 172 | 'type' => \Elementor\Controls_Manager::SWITCHER, 173 | 'label_on' => __( 'Show', 'your-plugin' ), 174 | 'label_off' => __( 'Hide', 'your-plugin' ), 175 | 'return_value' => 'yes', 176 | 'default' => 'yes', 177 | ] 178 | ); 179 | 180 | // Middle Badge Text 181 | $this->add_control( 182 | 'middle_badge_text', 183 | [ 184 | 'label' => __( 'Middle Badge Text', 'plugin-domain' ), 185 | 'type' => \Elementor\Controls_Manager::TEXT, 186 | 'default' => __( '$19.99', 'plugin-domain' ), 187 | 'placeholder' => __( 'Type your title here', 'plugin-domain' ), 188 | 'condition' => [ 189 | 'show_middle_badge' => 'yes' 190 | ] 191 | ] 192 | ); 193 | 194 | // Bottom badge 195 | $this->add_control( 196 | 'show_bottom_badge', 197 | [ 198 | 'label' => __( 'Show Bottom Badge', 'plugin-domain' ), 199 | 'type' => \Elementor\Controls_Manager::SWITCHER, 200 | 'label_on' => __( 'Show', 'your-plugin' ), 201 | 'label_off' => __( 'Hide', 'your-plugin' ), 202 | 'return_value' => 'yes', 203 | 'default' => 'yes', 204 | ] 205 | ); 206 | 207 | // Bottom Badge Text 208 | $this->add_control( 209 | 'bottom_badge_text', 210 | [ 211 | 'label' => __( 'Bottom Badge Text', 'plugin-domain' ), 212 | 'type' => \Elementor\Controls_Manager::TEXT, 213 | 'default' => __( '$19.99', 'plugin-domain' ), 214 | 'placeholder' => __( 'Type your title here', 'plugin-domain' ), 215 | 'condition' => [ 216 | 'show_bottom_badge' => 'yes' 217 | ] 218 | ] 219 | ); 220 | 221 | $this->end_controls_section(); 222 | 223 | // Button Settings 224 | $this->start_controls_section( 225 | 'button_section', 226 | [ 227 | 'label' => __( 'Button', 'my-elementor-widget' ), 228 | 'tab' => \Elementor\Controls_Manager::TAB_CONTENT, 229 | ] 230 | ); 231 | 232 | // Button Link 233 | $this->add_control( 234 | 'button_link', 235 | [ 236 | 'label' => __( 'Link', 'plugin-domain' ), 237 | 'type' => \Elementor\Controls_Manager::URL, 238 | 'placeholder' => __( 'https://your-link.com', 'plugin-domain' ), 239 | 'show_external' => true, 240 | 'default' => [ 241 | 'url' => '', 242 | 'is_external' => true, 243 | 'nofollow' => true, 244 | ], 245 | ] 246 | ); 247 | 248 | // Button Text 249 | $this->add_control( 250 | 'button_text', 251 | [ 252 | 'label' => __( 'Text', 'plugin-domain' ), 253 | 'type' => \Elementor\Controls_Manager::TEXT, 254 | 'default' => __( 'Buy Now', 'plugin-domain' ), 255 | 'placeholder' => __( 'Type your text here', 'plugin-domain' ), 256 | ] 257 | ); 258 | 259 | $this->end_controls_section(); 260 | 261 | 262 | // Style Tab 263 | $this->style_tab(); 264 | } 265 | 266 | private function style_tab() { 267 | // Image Style Settings 268 | $this->start_controls_section( 269 | 'image_style_section', 270 | [ 271 | 'label' => __( 'Image', 'my-elementor-widget' ), 272 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 273 | ] 274 | ); 275 | 276 | // Width 277 | $this->add_responsive_control( 278 | 'image_width', 279 | [ 280 | 'label' => __( 'Width', 'plugin-domain' ), 281 | 'type' => Controls_Manager::SLIDER, 282 | 'size_units' => [ 'px', '%' ], 283 | 'description' => 'Desfault: 100%', 284 | 'range' => [ 285 | 'px' => [ 286 | 'min' => 0, 287 | 'max' => 1000, 288 | 'step' => 1, 289 | ], 290 | '%' => [ 291 | 'min' => 0, 292 | 'max' => 100, 293 | ], 294 | ], 295 | 'default' => [ 296 | 'unit' => '%', 297 | 'size' => 100, 298 | ], 299 | 'selectors' => [ 300 | '{{WRAPPER}} .image-card .image' => 'width: {{SIZE}}{{UNIT}};', 301 | ], 302 | ] 303 | ); 304 | 305 | // Height 306 | $this->add_responsive_control( 307 | 'image_height', 308 | [ 309 | 'label' => __( 'Height', 'plugin-domain' ), 310 | 'type' => Controls_Manager::SLIDER, 311 | 'size_units' => [ 'px', '%' ], 312 | 'description' => 'Desfault: 230px', 313 | 'range' => [ 314 | 'px' => [ 315 | 'min' => 0, 316 | 'max' => 1000, 317 | 'step' => 1, 318 | ], 319 | '%' => [ 320 | 'min' => 0, 321 | 'max' => 100, 322 | ], 323 | ], 324 | 'default' => [ 325 | 'unit' => 'px', 326 | 'size' => 230, 327 | ], 328 | 'selectors' => [ 329 | '{{WRAPPER}} .image-card .image' => 'height: {{SIZE}}{{UNIT}};', 330 | ], 331 | ] 332 | ); 333 | 334 | // Padding 335 | $this->add_responsive_control( 336 | 'image_padding', 337 | [ 338 | 'label' => __( 'Padding', 'plugin-domain' ), 339 | 'type' => Controls_Manager::DIMENSIONS, 340 | 'size_units' => [ 'px', '%', 'em' ], 341 | 'default' => [ 342 | 'top' => 0, 343 | 'right' => 0, 344 | 'bottom' => 0, 345 | 'left' => 0, 346 | ], 347 | 'selectors' => [ 348 | '{{WRAPPER}} .image-card .image-wrapper' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 349 | ], 350 | ] 351 | ); 352 | 353 | // Border Type 354 | $this->add_group_control( 355 | \Elementor\Group_Control_Border::get_type(), 356 | [ 357 | 'name' => 'image_border', 358 | 'label' => __( 'Border', 'plugin-domain' ), 359 | 'selector' => '{{WRAPPER}} .image-card .image-wrapper', 360 | ] 361 | ); 362 | 363 | // Border Radius 364 | $this->add_responsive_control( 365 | 'image_border_radius', 366 | [ 367 | 'label' => __( 'Border Radius', 'plugin-domain' ), 368 | 'type' => Controls_Manager::DIMENSIONS, 369 | 'size_units' => [ 'px', '%', 'em' ], 370 | 'default' => [ 371 | 'top' => 0, 372 | 'right' => 0, 373 | 'bottom' => 0, 374 | 'left' => 0, 375 | ], 376 | 'selectors' => [ 377 | '{{WRAPPER}} .image-card .image-wrapper' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 378 | '{{WRAPPER}} .image-card .image-wrapper .image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 379 | ], 380 | ] 381 | ); 382 | 383 | // Box Shadow 384 | $this->add_group_control( 385 | \Elementor\Group_Control_Box_Shadow::get_type(), 386 | [ 387 | 'name' => 'image_box_shadow', 388 | 'label' => __( 'Box Shadow', 'plugin-domain' ), 389 | 'selector' => '{{WRAPPER}} .image-card .image-wrapper .image', 390 | ] 391 | ); 392 | 393 | $this->end_controls_section(); 394 | 395 | /** 396 | * Content Style Settings 397 | */ 398 | $this->start_controls_section( 399 | 'content_style_section', 400 | [ 401 | 'label' => __( 'Content', 'my-elementor-widget' ), 402 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 403 | ] 404 | ); 405 | 406 | // Padding 407 | $this->add_responsive_control( 408 | 'content_padding', 409 | [ 410 | 'label' => __( 'Padding', 'plugin-domain' ), 411 | 'type' => Controls_Manager::DIMENSIONS, 412 | 'size_units' => [ 'px', '%', 'em' ], 413 | 'default' => [ 414 | 'top' => 30, 415 | 'right' => 30, 416 | 'bottom' => 30, 417 | 'left' => 30, 418 | ], 419 | 'selectors' => [ 420 | '{{WRAPPER}} .image-card .content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', 421 | ], 422 | 'description' => 'Default: 30px', 423 | ] 424 | ); 425 | 426 | // Title heading 427 | $this->add_control( 428 | 'content_title_heading', 429 | [ 430 | 'label' => __( 'Title', 'plugin-name' ), 431 | 'type' => \Elementor\Controls_Manager::HEADING, 432 | 'separator' => 'before', 433 | ] 434 | ); 435 | 436 | // Title Bottom Spacing 437 | $this->add_responsive_control( 438 | 'content_title_bottom_spacing', 439 | [ 440 | 'label' => __( 'Bottom Spacing', 'plugin-domain' ), 441 | 'type' => Controls_Manager::SLIDER, 442 | 'size_units' => [ 'px', '%' ], 443 | 'description' => 'Default: 15px', 444 | 'range' => [ 445 | 'px' => [ 446 | 'min' => 0, 447 | 'max' => 1000, 448 | 'step' => 1, 449 | ], 450 | '%' => [ 451 | 'min' => 0, 452 | 'max' => 100, 453 | ], 454 | ], 455 | 'default' => [ 456 | 'unit' => 'px', 457 | 'size' => 15, 458 | ], 459 | 'selectors' => [ 460 | '{{WRAPPER}} .image-card .title' => 'margin-bottom: {{SIZE}}{{UNIT}};', 461 | ], 462 | ] 463 | ); 464 | 465 | // Title Color 466 | $this->add_control( 467 | 'content_title_color', 468 | [ 469 | 'label' => __( 'Title Color', 'plugin-domain' ), 470 | 'type' => \Elementor\Controls_Manager::COLOR, 471 | 'selectors' => [ 472 | '{{WRAPPER}} .image-card .title h2' => 'color: {{VALUE}}', 473 | ], 474 | 'default' => '#111', 475 | ] 476 | ); 477 | 478 | // Title Typography 479 | $this->add_group_control( 480 | \Elementor\Group_Control_Typography::get_type(), 481 | [ 482 | 'name' => 'content_title_typography', 483 | 'label' => __( 'Typography', 'plugin-domain' ), 484 | 'selector' => '{{WRAPPER}} .image-card .title h2', 485 | ] 486 | ); 487 | 488 | // Description heading 489 | $this->add_control( 490 | 'content_description_heading', 491 | [ 492 | 'label' => __( 'Description', 'plugin-name' ), 493 | 'type' => \Elementor\Controls_Manager::HEADING, 494 | 'separator' => 'before', 495 | ] 496 | ); 497 | 498 | // Description Bottom Spacing 499 | $this->add_responsive_control( 500 | 'content_description_bottom_spacing', 501 | [ 502 | 'label' => __( 'Bottom Spacing', 'plugin-domain' ), 503 | 'type' => Controls_Manager::SLIDER, 504 | 'size_units' => [ 'px', '%' ], 505 | 'description' => 'Default: 30px', 506 | 'range' => [ 507 | 'px' => [ 508 | 'min' => 0, 509 | 'max' => 1000, 510 | 'step' => 1, 511 | ], 512 | '%' => [ 513 | 'min' => 0, 514 | 'max' => 100, 515 | ], 516 | ], 517 | 'default' => [ 518 | 'unit' => 'px', 519 | 'size' => 30, 520 | ], 521 | 'selectors' => [ 522 | '{{WRAPPER}} .image-card .excerpt' => 'margin-bottom: {{SIZE}}{{UNIT}};', 523 | ], 524 | ] 525 | ); 526 | 527 | // Description Color 528 | $this->add_control( 529 | 'content_description_color', 530 | [ 531 | 'label' => __( 'Description Color', 'plugin-domain' ), 532 | 'type' => \Elementor\Controls_Manager::COLOR, 533 | 'selectors' => [ 534 | '{{WRAPPER}} .image-card .excerpt' => 'color: {{VALUE}}', 535 | ], 536 | 'default' => '#111', 537 | ] 538 | ); 539 | 540 | // Description Typography 541 | $this->add_group_control( 542 | \Elementor\Group_Control_Typography::get_type(), 543 | [ 544 | 'name' => 'content_description_typography', 545 | 'label' => __( 'Typography', 'plugin-domain' ), 546 | 'selector' => '{{WRAPPER}} .image-card .excerpt', 547 | ] 548 | ); 549 | 550 | 551 | $this->end_controls_section(); 552 | 553 | /** 554 | * Divider Style Settings 555 | */ 556 | $this->start_controls_section( 557 | 'divider_style_section', 558 | [ 559 | 'label' => __( 'Divider', 'my-elementor-widget' ), 560 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 561 | ] 562 | ); 563 | 564 | // Width 565 | $this->add_control( 566 | 'divider_width', 567 | [ 568 | 'label' => __( 'Width', 'plugin-domain' ), 569 | 'type' => Controls_Manager::SLIDER, 570 | 'size_units' => [ 'px', '%' ], 571 | 'description' => 'Default: 100px', 572 | 'range' => [ 573 | 'px' => [ 574 | 'min' => 0, 575 | 'max' => 1000, 576 | 'step' => 1, 577 | ], 578 | '%' => [ 579 | 'min' => 0, 580 | 'max' => 100, 581 | ], 582 | ], 583 | 'default' => [ 584 | 'unit' => 'px', 585 | 'size' => 100, 586 | ], 587 | 'selectors' => [ 588 | '{{WRAPPER}} .image-card .divider' => 'width: {{SIZE}}{{UNIT}};', 589 | ], 590 | ] 591 | ); 592 | 593 | // Height 594 | $this->add_control( 595 | 'divider_height', 596 | [ 597 | 'label' => __( 'Height', 'plugin-domain' ), 598 | 'type' => Controls_Manager::SLIDER, 599 | 'size_units' => [ 'px', '%' ], 600 | 'description' => 'Default: 2px', 601 | 'range' => [ 602 | 'px' => [ 603 | 'min' => 0, 604 | 'max' => 1000, 605 | 'step' => 1, 606 | ], 607 | '%' => [ 608 | 'min' => 0, 609 | 'max' => 100, 610 | ], 611 | ], 612 | 'default' => [ 613 | 'unit' => 'px', 614 | 'size' => 2, 615 | ], 616 | 'selectors' => [ 617 | '{{WRAPPER}} .image-card .divider' => 'height: {{SIZE}}{{UNIT}};', 618 | ], 619 | ] 620 | ); 621 | 622 | // Background Color 623 | $this->add_control( 624 | 'divider_backgorund_color', 625 | [ 626 | 'label' => __( 'Background Color', 'plugin-domain' ), 627 | 'type' => \Elementor\Controls_Manager::COLOR, 628 | 'default' => 'rgba( 0,0,0,0.05 )', 629 | 'selectors' => [ 630 | '{{WRAPPER}} .image-card .divider ' => 'background-color: {{VALUE}}', 631 | ], 632 | ] 633 | ); 634 | 635 | $this->end_controls_section(); 636 | 637 | /** 638 | * Top badge Style Settings 639 | */ 640 | $this->start_controls_section( 641 | 'top_badge_style_section', 642 | [ 643 | 'label' => __( 'Top Badge', 'my-elementor-widget' ), 644 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 645 | ] 646 | ); 647 | 648 | // Background Color 649 | $this->add_control( 650 | 'top_badge_backgorund_color', 651 | [ 652 | 'label' => __( 'Background Color', 'plugin-domain' ), 653 | 'type' => \Elementor\Controls_Manager::COLOR, 654 | 'default' => '#562dd4', 655 | 'selectors' => [ 656 | '{{WRAPPER}} .image-card .image .top-price-badge' => 'background-color: {{VALUE}}', 657 | ], 658 | ] 659 | ); 660 | 661 | // Text Color 662 | $this->add_control( 663 | 'top_badge_text_color', 664 | [ 665 | 'label' => __( 'Text Color', 'plugin-domain' ), 666 | 'type' => \Elementor\Controls_Manager::COLOR, 667 | 'default' => '#fff', 668 | 'selectors' => [ 669 | '{{WRAPPER}} .image-card .image .top-price-badge' => 'color: {{VALUE}}', 670 | ], 671 | ] 672 | ); 673 | 674 | // Typography 675 | $this->add_group_control( 676 | \Elementor\Group_Control_Typography::get_type(), 677 | [ 678 | 'name' => 'top_badge_typography', 679 | 'label' => __( 'Typography', 'plugin-domain' ), 680 | 'selector' => '{{WRAPPER}} .image-card .image .top-price-badge', 681 | ] 682 | ); 683 | 684 | $this->end_controls_section(); 685 | 686 | /** 687 | * Buy Button Style Settings 688 | */ 689 | $this->start_controls_section( 690 | 'buy_button_style_section', 691 | [ 692 | 'label' => __( 'Buy Button', 'my-elementor-widget' ), 693 | 'tab' => \Elementor\Controls_Manager::TAB_STYLE, 694 | ] 695 | ); 696 | 697 | // Button Tabs 698 | $this->start_controls_tabs( 699 | 'but_button_style_tabs' 700 | ); 701 | // Normal State 702 | $this->start_controls_tab( 703 | 'buy_button_normal_state', 704 | [ 705 | 'label' => __( 'Normal', 'plugin-name' ), 706 | ] 707 | ); 708 | // Background Color 709 | $this->add_control( 710 | 'but_button_normal_bg_color', 711 | [ 712 | 'label' => __( 'Background Color', 'plugin-domain' ), 713 | 'type' => \Elementor\Controls_Manager::COLOR, 714 | 'default' => '#562dd4', 715 | 'selectors' => [ 716 | '{{WRAPPER}} .image-card .readmore a.button-readmore' => 'background-color: {{VALUE}}', 717 | ], 718 | ] 719 | ); 720 | // Text Color 721 | $this->add_control( 722 | 'but_button_normal_text_color', 723 | [ 724 | 'label' => __( 'Text Color', 'plugin-domain' ), 725 | 'type' => \Elementor\Controls_Manager::COLOR, 726 | 'default' => '#fff', 727 | 'selectors' => [ 728 | '{{WRAPPER}} .image-card .readmore a.button-readmore' => 'color: {{VALUE}}', 729 | ], 730 | ] 731 | ); 732 | $this->end_controls_tab(); 733 | 734 | // Hover State 735 | $this->start_controls_tab( 736 | 'buy_button_hover_state', 737 | [ 738 | 'label' => __( 'Hover', 'plugin-name' ), 739 | ] 740 | ); 741 | // Background Color 742 | $this->add_control( 743 | 'but_button_hover_bg_color', 744 | [ 745 | 'label' => __( 'Background Color', 'plugin-domain' ), 746 | 'type' => \Elementor\Controls_Manager::COLOR, 747 | 'default' => '#707070', 748 | 'selectors' => [ 749 | '{{WRAPPER}} .image-card .readmore a.button-readmore:hover' => 'background-color: {{VALUE}}', 750 | ], 751 | ] 752 | ); 753 | // Text Color 754 | $this->add_control( 755 | 'but_button_hover_text_color', 756 | [ 757 | 'label' => __( 'Text Color', 'plugin-domain' ), 758 | 'type' => \Elementor\Controls_Manager::COLOR, 759 | 'default' => '#fff', 760 | 'selectors' => [ 761 | '{{WRAPPER}} .image-card .readmore a.button-readmore:hover' => 'color: {{VALUE}}', 762 | ], 763 | ] 764 | ); 765 | $this->end_controls_tab(); 766 | 767 | $this->end_controls_tabs(); 768 | 769 | // Typography 770 | $this->add_group_control( 771 | \Elementor\Group_Control_Typography::get_type(), 772 | [ 773 | 'name' => 'buy_button_typography', 774 | 'label' => __( 'Typography', 'plugin-domain' ), 775 | 'selector' => '{{WRAPPER}} .image-card .readmore a.button-readmore', 776 | ] 777 | ); 778 | 779 | $this->end_controls_section(); 780 | } 781 | 782 | protected function render() { 783 | $settings = $this->get_settings_for_display(); 784 | // Image 785 | $image_target = $settings[ 'image_link' ][ 'is_external' ] ? ' target="_blank"' : ''; 786 | $image_nofollow = $settings[ 'image_link' ][ 'nofollow' ] ? ' rel="nofollow"' : ''; 787 | // Button 788 | $button_target = $settings[ 'button_link' ][ 'is_external' ] ? ' target="_blank"' : ''; 789 | $button_nofollow = $settings[ 'button_link' ][ 'nofollow' ] ? ' rel="nofollow"' : ''; 790 | 791 | // For Inline Editin 792 | $this->add_inline_editing_attributes( 'card_title', 'none' ); 793 | $this->add_inline_editing_attributes( 'item_description', 'advanced' ); 794 | ?> 795 |
796 |
797 |
798 | 799 | > 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 |
808 |
809 |
810 |
811 |

get_render_attribute_string( 'card_title' ); ?>>

812 |
813 | 814 |
815 | 816 |
817 |
get_render_attribute_string( 'item_description' ); ?>> 818 | 819 |
820 |
821 |
822 | class="button button-readmore"> 823 | 824 | 825 | 826 |
827 |
828 |
829 | 834 | <# 835 | var image_target = settings.image_link.is_external ? ' target="_blank"' : ''; 836 | var image_nofollow = settings.image_link.nofollow ? ' rel="nofollow"' : ''; 837 | 838 | var link_target = settings.button_link.is_external ? ' target="_blank"' : ''; 839 | var link_nofollow = settings.button_link.nofollow ? ' rel="nofollow"' : ''; 840 | 841 | view.addInlineEditingAttributes( 'card_title', 'none' ); 842 | view.addInlineEditingAttributes( 'item_description', 'none' ); 843 | #> 844 |
845 |
846 |
847 | <# if( 'yes' === settings.show_image_link ) { #> 848 | 849 | <# } #> 850 | <# if( 'yes' === settings.show_top_badge ) { #> 851 | {{{ settings.top_badge_text }}} 852 | <# } #> 853 | <# if( 'yes' === settings.show_middle_badge ) { #> 854 | {{{ settings.middle_badge_text }}} 855 | <# } #> 856 |
857 |
858 |
859 |
860 |

{{{ settings.card_title }}}

861 |
862 | <# if( 'yes' === settings.show_divider ) { #> 863 |
864 | <# } #> 865 |
866 |
867 | {{{ settings.item_description }}} 868 |
869 |
870 |
871 | {{{ settings.button_text }}} 872 | <# if( 'yes' === settings.show_bottom_badge ) { #> 873 | {{{ settings.bottom_badge_text }}} 874 | <# } #> 875 |
876 |
877 |
878 | widgets_manager->register_widget_type( new MYEW_Preview_Card_Widget() ); -------------------------------------------------------------------------------- /assets/vendor/owl-carousel/js/owl.carousel.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Owl Carousel v2.3.4 3 | * Copyright 2013-2018 David Deutsch 4 | * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE 5 | */ 6 | !function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("
",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&bi-g-f&&b",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='
',d=k.lazyLoad?a("
",{class:"owl-video-tn "+j,srcType:c}):a("
",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("
",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a(''),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('
').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1, 7 | animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['',''],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('