Version Description
- New: Testimonial Widget
- New: Floating Effects from -> to controller
- New: Hover animation effect in Card Widget image
- Update: Card Widget button default style
- Update: Dual Button Widget default style
- Fix: WP Forms style issue
- Fix: Card Widget editor mode JS error issue
- Fix: Dual Button Widget inline editing issue
Download this release
Release Info
Developer | thehappymonster |
Plugin | Happy Addons for Elementor (Mega Menu, Post Grid, Woocommerce Product Grid, Table, Event Calendar, Slider Elementor Widget) |
Version | 1.1.1 |
Comparing to | |
See all releases |
Code changes from version 1.0.5 to 1.1.1
- assets/admin/css/dashboard.css +139 -0
- assets/css/main.css +141 -9
- assets/css/main.min.css +1 -1
- assets/js/happy-addons.js +58 -55
- assets/js/happy-addons.min.js +1 -1
- base.php +4 -1
- base/widget-base.php +0 -29
- classes/asset-manager.php +16 -0
- classes/dashboard.php +38 -0
- classes/happy-effects.php +111 -15
- classes/widget-manager.php +1 -0
- inc/admin-templates/save.php +8 -0
- inc/admin-templates/widgets.php +25 -0
- plugin.php +1 -1
- readme.txt +21 -6
- widgets/card/widget.php +106 -14
- widgets/dual-button/widget.php +5 -5
- widgets/testimonial/widget.php +465 -0
- widgets/wpform/widget.php +3 -1
assets/admin/css/dashboard.css
ADDED
@@ -0,0 +1,139 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.happy-settings {
|
2 |
+
padding: 15px;
|
3 |
+
}
|
4 |
+
.happy-settings .ha-settings-tab {
|
5 |
+
background-color: #fff;
|
6 |
+
position: relative;
|
7 |
+
padding: 10px 10px 20px 10px;
|
8 |
+
}
|
9 |
+
.happy-settings .row {
|
10 |
+
width: 100%;
|
11 |
+
height: auto;
|
12 |
+
display: flex;
|
13 |
+
flex-flow: row wrap;
|
14 |
+
justify-content: space-between;
|
15 |
+
align-content: flex-start;
|
16 |
+
}
|
17 |
+
.happy-settings .ha-container {
|
18 |
+
width: 100%;
|
19 |
+
height: auto;
|
20 |
+
}
|
21 |
+
.happy-settings .ha-container p.ha-elements-control-notice {
|
22 |
+
margin: 10px 0 15px 10px;
|
23 |
+
}
|
24 |
+
.happy-settings #widgets .checkbox-wrapper {
|
25 |
+
display: flex;
|
26 |
+
flex-flow: row wrap;
|
27 |
+
align-items: center;
|
28 |
+
}
|
29 |
+
.happy-settings #widgets .ha-checkbox {
|
30 |
+
display: flex;
|
31 |
+
flex-direction: row;
|
32 |
+
flex: 0 0 250px;
|
33 |
+
align-items: center;
|
34 |
+
justify-content: space-between;
|
35 |
+
font-size: 18px;
|
36 |
+
margin: 10px 40px 10px 10px;
|
37 |
+
border-radius: 3px;
|
38 |
+
box-shadow: 1px 1px 6px 1px rgba(80,80,80,0.1);
|
39 |
+
padding: 15px;
|
40 |
+
}
|
41 |
+
|
42 |
+
.ha-switch {
|
43 |
+
position: relative;
|
44 |
+
display: inline-block;
|
45 |
+
width: 50px;
|
46 |
+
height: 30px;
|
47 |
+
}
|
48 |
+
.ha-switch input {
|
49 |
+
opacity: 0;
|
50 |
+
width: 0;
|
51 |
+
height: 0;
|
52 |
+
}
|
53 |
+
|
54 |
+
.ha-slider {
|
55 |
+
position: absolute;
|
56 |
+
cursor: pointer;
|
57 |
+
top: 0;
|
58 |
+
left: 0;
|
59 |
+
right: 0;
|
60 |
+
bottom: 0;
|
61 |
+
background-color: #ccc;
|
62 |
+
-webkit-transition: .4s;
|
63 |
+
transition: .4s;
|
64 |
+
}
|
65 |
+
|
66 |
+
.ha-slider:before {
|
67 |
+
content: "";
|
68 |
+
position: absolute;
|
69 |
+
height: 23px;
|
70 |
+
width: 23px;
|
71 |
+
left: 0px;
|
72 |
+
bottom: 4px;
|
73 |
+
background-color: white;
|
74 |
+
-webkit-transition: .4s;
|
75 |
+
transition: .4s;
|
76 |
+
}
|
77 |
+
|
78 |
+
.ha-switch input:checked + .ha-slider {
|
79 |
+
background-color: #562dd4;
|
80 |
+
}
|
81 |
+
|
82 |
+
.ha-switch input:focus + .ha-slider {
|
83 |
+
box-shadow: 0 0 1px #2196F3;
|
84 |
+
}
|
85 |
+
.ha-switch input + .ha-slider:before {
|
86 |
+
-webkit-transform: translateX(4px);
|
87 |
+
-ms-transform: translateX(4px);
|
88 |
+
transform: translateX(4px);
|
89 |
+
}
|
90 |
+
.ha-switch input:checked + .ha-slider:before {
|
91 |
+
-webkit-transform: translateX(19px);
|
92 |
+
-ms-transform: translateX(19px);
|
93 |
+
transform: translateX(22px);
|
94 |
+
}
|
95 |
+
|
96 |
+
/* Rounded sliders */
|
97 |
+
.ha-slider.round {
|
98 |
+
border-radius: 34px;
|
99 |
+
}
|
100 |
+
.ha-slider.round:before {
|
101 |
+
border-radius: 50%;
|
102 |
+
}
|
103 |
+
|
104 |
+
/* save button */
|
105 |
+
.ha-button-wrap {
|
106 |
+
display: flex;
|
107 |
+
flex-direction: row;
|
108 |
+
align-items: center;
|
109 |
+
justify-content: space-between;
|
110 |
+
padding: 20px;
|
111 |
+
margin-top: 20px;
|
112 |
+
background: #fff;
|
113 |
+
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
|
114 |
+
}
|
115 |
+
.brand {
|
116 |
+
font-size: 22px;
|
117 |
+
text-transform: capitalize;
|
118 |
+
color: #fff;
|
119 |
+
font-weight: 500;
|
120 |
+
margin: 0px;
|
121 |
+
background: linear-gradient(90deg, #e2498a 0%, #562dd4 100%);
|
122 |
+
padding: 10px;
|
123 |
+
}
|
124 |
+
button.ha-save-button {
|
125 |
+
font-size: 16px;
|
126 |
+
text-transform: capitalize;
|
127 |
+
padding: 12px 18px;
|
128 |
+
border-radius: 4px;
|
129 |
+
border: none;
|
130 |
+
background-color: #e2498a;
|
131 |
+
box-shadow: 0 1px 0 #8a0d42;
|
132 |
+
color: #fff;
|
133 |
+
transition: background-color .4s, transform .4s;
|
134 |
+
}
|
135 |
+
button.ha-save-button:hover {
|
136 |
+
background-color: #562dd4;
|
137 |
+
box-shadow: 0 1px 0 #301963;
|
138 |
+
transition: background-color .4s, transform .4s;
|
139 |
+
}
|
assets/css/main.css
CHANGED
@@ -44,25 +44,27 @@
|
|
44 |
vertical-align: middle;
|
45 |
text-align: center;
|
46 |
text-decoration: none;
|
47 |
-
font-weight: bold;
|
48 |
font-size: 14px;
|
49 |
line-height: 1;
|
50 |
-webkit-transition: all .3s;
|
51 |
transition: all .3s;
|
52 |
}
|
53 |
.ha-btn:not(.ha-btn--link) {
|
54 |
-
padding:
|
55 |
border-radius: .25rem;
|
56 |
-
background-color: #
|
57 |
color: #fff;
|
58 |
-
text-align: center;
|
59 |
}
|
60 |
.ha-btn:not(.ha-btn--link):hover,
|
61 |
.ha-btn:not(.ha-btn--link):focus {
|
62 |
-
background-color: #
|
63 |
}
|
64 |
.ha-btn.ha-btn--link {
|
65 |
-
color: #
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
.ha-btn-icon {
|
68 |
-webkit-transition: all .3s;
|
@@ -93,7 +95,8 @@
|
|
93 |
margin-top: 0;
|
94 |
margin-bottom: .75rem;
|
95 |
color: #151515;
|
96 |
-
font-
|
|
|
97 |
}
|
98 |
|
99 |
.ha-card-text {
|
@@ -637,13 +640,21 @@ span .ha-review-ratting--star:before,
|
|
637 |
.ha-dual-btn--left {
|
638 |
border-top-left-radius: 50px;
|
639 |
border-bottom-left-radius: 50px;
|
640 |
-
background-color: #
|
|
|
|
|
|
|
|
|
641 |
}
|
642 |
|
643 |
.ha-dual-btn--right {
|
644 |
border-top-right-radius: 50px;
|
645 |
border-bottom-right-radius: 50px;
|
646 |
-
background-color: #
|
|
|
|
|
|
|
|
|
647 |
}
|
648 |
|
649 |
.ha-dual-btn-connector {
|
@@ -672,3 +683,124 @@ span .ha-review-ratting--star:before,
|
|
672 |
.ha-dual-btn-icon--after {
|
673 |
margin-left: 5px;
|
674 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
vertical-align: middle;
|
45 |
text-align: center;
|
46 |
text-decoration: none;
|
|
|
47 |
font-size: 14px;
|
48 |
line-height: 1;
|
49 |
-webkit-transition: all .3s;
|
50 |
transition: all .3s;
|
51 |
}
|
52 |
.ha-btn:not(.ha-btn--link) {
|
53 |
+
padding: 15px 25px;
|
54 |
border-radius: .25rem;
|
55 |
+
background-color: #562dd4;
|
56 |
color: #fff;
|
|
|
57 |
}
|
58 |
.ha-btn:not(.ha-btn--link):hover,
|
59 |
.ha-btn:not(.ha-btn--link):focus {
|
60 |
+
background-color: #e2498a;
|
61 |
}
|
62 |
.ha-btn.ha-btn--link {
|
63 |
+
color: #562dd4;
|
64 |
+
}
|
65 |
+
.ha-btn.ha-btn--link:hover,
|
66 |
+
.ha-btn.ha-btn--link:focus {
|
67 |
+
color: #e2498a;
|
68 |
}
|
69 |
.ha-btn-icon {
|
70 |
-webkit-transition: all .3s;
|
95 |
margin-top: 0;
|
96 |
margin-bottom: .75rem;
|
97 |
color: #151515;
|
98 |
+
font-weight: 700;
|
99 |
+
font-size: 22px;
|
100 |
}
|
101 |
|
102 |
.ha-card-text {
|
640 |
.ha-dual-btn--left {
|
641 |
border-top-left-radius: 50px;
|
642 |
border-bottom-left-radius: 50px;
|
643 |
+
background-color: #562dd4;
|
644 |
+
}
|
645 |
+
.ha-dual-btn--left:hover,
|
646 |
+
.ha-dual-btn--left:focus {
|
647 |
+
background-color: #4423ab;
|
648 |
}
|
649 |
|
650 |
.ha-dual-btn--right {
|
651 |
border-top-right-radius: 50px;
|
652 |
border-bottom-right-radius: 50px;
|
653 |
+
background-color: #e2498a;
|
654 |
+
}
|
655 |
+
.ha-dual-btn--right:hover,
|
656 |
+
.ha-dual-btn--right:focus {
|
657 |
+
background-color: #d6226e;
|
658 |
}
|
659 |
|
660 |
.ha-dual-btn-connector {
|
683 |
.ha-dual-btn-icon--after {
|
684 |
margin-left: 5px;
|
685 |
}
|
686 |
+
|
687 |
+
.ha-testimonial--basic > .elementor-widget-container {
|
688 |
+
padding: 2rem;
|
689 |
+
border: 1px solid #ececec;
|
690 |
+
border-radius: .5rem;
|
691 |
+
}
|
692 |
+
|
693 |
+
.ha-testimonial--basic .ha-testimonial__content {
|
694 |
+
margin-bottom: 2.5em;
|
695 |
+
}
|
696 |
+
|
697 |
+
.ha-testimonial--bubble .ha-testimonial__content {
|
698 |
+
position: relative;
|
699 |
+
margin-bottom: 1.5rem;
|
700 |
+
padding: 2rem;
|
701 |
+
border-radius: 6px;
|
702 |
+
background-color: #fff;
|
703 |
+
box-shadow: 0 .2rem 2.8rem rgba(36, 36, 36, .1);
|
704 |
+
line-height: 1.6rem;
|
705 |
+
}
|
706 |
+
.ha-testimonial--bubble .ha-testimonial__content:after {
|
707 |
+
position: absolute;
|
708 |
+
bottom: -14px;
|
709 |
+
color: #fff;
|
710 |
+
content: "\e911";
|
711 |
+
font-size: 36px;
|
712 |
+
font-family: "Happy Icons";
|
713 |
+
-webkit-transform: rotate(-180deg);
|
714 |
+
-ms-transform: rotate(-180deg);
|
715 |
+
transform: rotate(-180deg);
|
716 |
+
}
|
717 |
+
|
718 |
+
.ha-testimonial--left.ha-testimonial--bubble .ha-testimonial__content:after {
|
719 |
+
left: 15px;
|
720 |
+
}
|
721 |
+
|
722 |
+
.ha-testimonial--center.ha-testimonial--bubble .ha-testimonial__content:after {
|
723 |
+
left: 50%;
|
724 |
+
-webkit-transform: translateX(-50%) rotate(-180deg);
|
725 |
+
-ms-transform: translateX(-50%) rotate(-180deg);
|
726 |
+
transform: translateX(-50%) rotate(-180deg);
|
727 |
+
}
|
728 |
+
|
729 |
+
.ha-testimonial--right.ha-testimonial--bubble .ha-testimonial__content:after {
|
730 |
+
right: 15px;
|
731 |
+
}
|
732 |
+
|
733 |
+
.ha-testimonial__reviewer {
|
734 |
+
display: -webkit-box;
|
735 |
+
display: -webkit-flex;
|
736 |
+
display: -ms-flexbox;
|
737 |
+
display: flex;
|
738 |
+
-webkit-box-align: center;
|
739 |
+
-webkit-align-items: center;
|
740 |
+
align-items: center;
|
741 |
+
-ms-flex-align: center;
|
742 |
+
-webkit-box-flex: 1;
|
743 |
+
-webkit-flex: 1;
|
744 |
+
-ms-flex: 1;
|
745 |
+
flex: 1;
|
746 |
+
}
|
747 |
+
.ha-testimonial__reviewer-thumb {
|
748 |
+
width: 65px;
|
749 |
+
height: 65px;
|
750 |
+
}
|
751 |
+
.ha-testimonial__reviewer-thumb > img {
|
752 |
+
width: 100%;
|
753 |
+
height: 100%;
|
754 |
+
border-radius: 50%;
|
755 |
+
|
756 |
+
-o-object-fit: cover;
|
757 |
+
object-fit: cover;
|
758 |
+
}
|
759 |
+
.ha-testimonial__reviewer-name {
|
760 |
+
margin-bottom: .3rem;
|
761 |
+
color: #562dd4;
|
762 |
+
font-weight: bold;
|
763 |
+
font-size: 18px;
|
764 |
+
}
|
765 |
+
.ha-testimonial__reviewer-title {
|
766 |
+
color: #8c8c8c;
|
767 |
+
font-size: 16px;
|
768 |
+
}
|
769 |
+
|
770 |
+
.ha-testimonial--left .ha-testimonial__reviewer-meta {
|
771 |
+
padding-left: 1em;
|
772 |
+
}
|
773 |
+
|
774 |
+
.ha-testimonial--center .ha-testimonial__reviewer {
|
775 |
+
-webkit-box-orient: vertical;
|
776 |
+
-webkit-box-direction: normal;
|
777 |
+
-webkit-flex-direction: column;
|
778 |
+
-ms-flex-direction: column;
|
779 |
+
flex-direction: column;
|
780 |
+
}
|
781 |
+
.ha-testimonial--center .ha-testimonial__reviewer-meta {
|
782 |
+
padding-top: 1em;
|
783 |
+
}
|
784 |
+
|
785 |
+
.ha-testimonial--right .ha-testimonial__reviewer {
|
786 |
+
-webkit-box-orient: horizontal;
|
787 |
+
-webkit-box-direction: reverse;
|
788 |
+
-webkit-flex-direction: row-reverse;
|
789 |
+
-ms-flex-direction: row-reverse;
|
790 |
+
flex-direction: row-reverse;
|
791 |
+
}
|
792 |
+
.ha-testimonial--right .ha-testimonial__reviewer-meta {
|
793 |
+
padding-right: 1em;
|
794 |
+
}
|
795 |
+
|
796 |
+
.ha-testimonial--left {
|
797 |
+
text-align: left;
|
798 |
+
}
|
799 |
+
|
800 |
+
.ha-testimonial--right {
|
801 |
+
text-align: right;
|
802 |
+
}
|
803 |
+
|
804 |
+
.ha-testimonial--center {
|
805 |
+
text-align: center;
|
806 |
+
}
|
assets/css/main.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ha-card>.elementor-widget-container,.ha-icon-box>.elementor-widget-container,.ha-image-compare>.elementor-widget-container,.ha-infobox>.elementor-widget-container,.ha-member>.elementor-widget-container,.ha-review>.elementor-widget-container{border-radius:.5rem;background-color:#fff;box-shadow:0 .2rem 2.8rem rgba(36,36,36,.1);word-wrap:break-word;overflow-wrap:break-word}.happy-addon,.happy-addon *{box-sizing:border-box}.happy-addon img{max-width:100%;height:auto;-o-object-fit:cover;object-fit:cover}.happy-addon p:empty{display:none}.ha-cf:after,.ha-cf:before{display:table;content:" "}.ha-cf:after{clear:both}.ha-btn{display:inline-block;vertical-align:middle;text-align:center;text-decoration:none;font-weight:700;font-size:14px;line-height:1;-webkit-transition:all .3s;transition:all .3s}.ha-btn:not(.ha-btn--link){padding:.7rem 1.3rem;border-radius:.25rem;background-color:#8c8c8c;color:#fff;text-align:center}.ha-btn:not(.ha-btn--link):focus,.ha-btn:not(.ha-btn--link):hover{background-color:#242424}.ha-btn.ha-btn--link{color:#3ca6ff}.ha-btn-icon{-webkit-transition:all .3s;transition:all .3s}.ha-btn-icon+.ha-btn-text,.ha-btn-text+.ha-btn-icon{margin-left:5px}.ha-card-figure{position:relative;height:250px}.ha-card-figure>img{border-top-left-radius:calc(.5rem - 1px);border-top-right-radius:calc(.5rem - 1px)}.ha-card-body{padding:1.5rem}.ha-card-title{margin-top:0;margin-bottom:.75rem;color:#151515;font-size:24px}.ha-card-text{margin-bottom:2rem;color:#616161;font-size:16px;line-height:1.7}.ha-card-text>p,.ha-infobox-text>p{margin-top:0;margin-bottom:0}.ha-card--top .ha-card-figure,.ha-member-links>a{display:inline-block}.ha-card--left>.elementor-widget-container,.ha-card--right>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center}.ha-card--left>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.ha-card--left .ha-card-body,.ha-card--left .ha-card-figure,.ha-card--right .ha-card-body,.ha-card--right .ha-card-figure{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ha-card--left .ha-card-body,.ha-card--right .ha-card-body{padding:2.5rem}.ha-card--left .ha-card-figure>img{border-radius:calc(.5rem - 1px) 0 0 calc(.5rem - 1px)}.ha-card--right>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;text-align:right}.ha-card--right .ha-card-figure>img{border-radius:0 calc(.5rem - 1px) calc(.5rem - 1px) 0}.ha-card .ha-badge{position:absolute}.ha-badge{padding:.475rem 1.1rem;border-radius:50px;background-color:#fff;font-size:12px}.ha-badge--top-left{top:1rem;left:1rem}.ha-badge--top-center{top:1rem;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-badge--top-right{top:1rem;right:1rem}.ha-badge--middle-left{top:50%;left:1rem;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ha-badge--middle-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ha-badge--middle-right{top:50%;right:1rem;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ha-badge--bottom-left{bottom:1rem;left:1rem}.ha-badge--bottom-center{bottom:1rem;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-badge--bottom-right{right:1rem;bottom:1rem}.ha-infobox>.elementor-widget-container{padding:1.5rem}.ha-infobox-title{margin-top:0;margin-bottom:1rem;color:#151515;font-size:24px}.ha-infobox-figure{display:inline-block;margin:0 0 1.5rem!important}.ha-infobox-figure--icon{text-align:center;font-size:3rem}.ha-icon-box-icon>i,.ha-infobox-figure>i{position:relative;display:block;width:1em;height:1em}.ha-icon-box-icon>i:before,.ha-infobox-figure>i:before{position:absolute;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-card-figure>img,.ha-infobox-figure>img,.ha-member-figure img{width:100%;height:100%;vertical-align:bottom}.ha-infobox-text+.ha-btn--link{margin-top:1rem}.ha-icon-box>.elementor-widget-container{position:relative;padding:1.25rem}.ha-icon-box-title{margin-top:0;margin-bottom:0;color:#151515;font-size:24px;-webkit-transition:color .3s;transition:color .3s}.ha-icon-box-icon{display:inline-block;margin-bottom:1rem;color:#151515;text-align:center;font-size:3rem;-webkit-transition:border .3s,background .3s,color .3s,-webkit-transform .3s;transition:transform .3s,border .3s,background .3s,color .3s;transition:transform .3s,border .3s,background .3s,color .3s,-webkit-transform .3s}.ha-icon-box-icon>i{-webkit-transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ha-icon-box-link{display:block;color:transparent;text-decoration:none}.ha-icon-box .ha-badge{position:absolute;z-index:9999;background-color:#e2498a;color:#fff}.ha-member>.elementor-widget-container{padding:1.25rem}.ha-member-figure{display:inline-block;margin:0 0 1.5rem!important}.ha-member-name{margin-top:0;margin-bottom:.5rem;color:#151515;font-size:18px}.ha-member-position{margin-bottom:1.5rem;color:#7f7f7f;font-size:14px}.ha-member-bio{margin-bottom:1.5rem;font-size:14px;line-height:1.6}.ha-member-links>a{color:#9895ad;text-align:center;line-height:1;-webkit-transition:all .2s;transition:all .2s}.ha-member-links>a:focus,.ha-member-links>a:hover{color:#222}.ha-member-links>a>i{width:1em;height:1em}.ha-member-links>a:not(:last-child){margin-right:.3rem}.ha-review-header{margin-top:1.5rem}.ha-review-desc p,.ha-review-figure{margin:0}.ha-review-figure>img{width:100%;height:100%;border-radius:50%;vertical-align:bottom}.ha-review-reviewer{margin-top:0;margin-bottom:.3rem;color:#151515;font-size:18px}.ha-review-position{margin-bottom:.5rem;color:#7f7f7f;font-size:15px}.ha-review-ratting{display:inline-block;font-size:12px;line-height:1}.ha-review-ratting--num{padding:.25em .66em;border-radius:2.5em;background-color:#287dfe;color:#fff}.ha-review-ratting--star{display:inline-block;color:#ffbf36;font-family:"Fontawesome"}.ha-review-ratting--star>span{position:relative;overflow:hidden;height:1em}.ha-review-ratting--star span>span{position:absolute;top:0;left:0;overflow:hidden;padding-top:1.5em}.ha-review-ratting--star span>span:before,span .ha-review-ratting--star:before{position:absolute;top:0;left:0}.ha-review-ratting--star span:before{content:"\f006\f006\f006\f006\f006"}.ha-review-ratting--star span>span:before{content:"\f005\f005\f005\f005\f005"}.ha-review-desc{margin-top:1.5rem;font-size:16px;line-height:1.6}.ha-review--top>.elementor-widget-container{padding:2rem}.ha-review--top .ha-review-figure{display:inline-block;max-width:70px;height:70px}.ha-review--left>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.ha-review--left>.elementor-widget-container,.ha-review--right>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;padding-left:2rem}.ha-review--left .ha-review-figure,.ha-review--right .ha-review-figure{-webkit-box-flex:0;-webkit-flex:0 0 150px;-ms-flex:0 0 150px;flex:0 0 150px;max-width:150px;height:150px}.ha-review--left .ha-review-body,.ha-review--right .ha-review-body{-webkit-box-flex:0;-webkit-flex:0 0 calc(100% - 150px);-ms-flex:0 0 calc(100% - 150px);flex:0 0 calc(100% - 150px);padding:2rem;max-width:calc(100% - 150px)}.ha-review--left .ha-review-body>:first-child,.ha-review--right .ha-review-body>:first-child{margin-top:0}.ha-review--right>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;padding-right:2rem;padding-left:0;text-align:right}.ha-image-compare .twentytwenty-container,.ha-image-compare .twentytwenty-wrapper{border-radius:inherit}.ha-skills>.elementor-widget-container{padding-top:1px}.ha-skill{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background-color:#e9ecef;font-size:.75rem}.ha-skill--inside .ha-skill-info,.ha-skill--outside .ha-skill-info{text-align:left;font-size:14px}.ha-skill--inside .ha-skill-level-text,.ha-skill--outside .ha-skill-level-text{float:right}.ha-skill--outside{height:2px}.ha-skill--outside .ha-skill-level{position:relative}.ha-skill--outside .ha-skill-info{position:absolute;top:-25px;width:100%;color:#242424}.ha-skill--inside{overflow:hidden;height:30px;border-radius:.3rem}.ha-skill--inside .ha-skill-info{padding-right:1rem;padding-left:1rem;color:#fff}.ha-skill-level{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;background-color:#007bff;color:#fff;text-align:center;white-space:nowrap;-webkit-transition:width .6s ease;transition:width .6s ease}.ha-skill--outside{margin-top:40px}.ha-skill--inside:not(:first-child){margin-top:20px}.ha-gradient-heading{margin-top:0;margin-bottom:0}.ha-gradient-heading>a{color:inherit;text-decoration:none}.ha-dual-button>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.ha-dual-btn,.ha-dual-btn-connector{display:inline-block}.ha-dual-btn-wrapper{position:relative;text-align:center;font-weight:400}.ha-dual-btn{padding:1.2rem 3rem;color:#fff;text-decoration:none;font-size:14px}.ha-dual-btn--left{border-top-left-radius:50px;border-bottom-left-radius:50px;background-color:#3266fd}.ha-dual-btn--right{border-top-right-radius:50px;border-bottom-right-radius:50px;background-color:#27374c}.ha-dual-btn-connector{position:absolute!important;top:50%;right:0;z-index:9;width:30px;height:30px;border-radius:100%;background-color:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.3);color:#27374c;text-transform:uppercase;font-size:12px;line-height:30px;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.ha-dual-btn-icon--before{margin-right:5px}.ha-dual-btn-icon--after{margin-left:5px}
|
1 |
+
.ha-card>.elementor-widget-container,.ha-icon-box>.elementor-widget-container,.ha-image-compare>.elementor-widget-container,.ha-infobox>.elementor-widget-container,.ha-member>.elementor-widget-container,.ha-review>.elementor-widget-container{border-radius:.5rem;background-color:#fff;box-shadow:0 .2rem 2.8rem rgba(36,36,36,.1);word-wrap:break-word;overflow-wrap:break-word}.happy-addon,.happy-addon *{box-sizing:border-box}.happy-addon img{max-width:100%;height:auto;-o-object-fit:cover;object-fit:cover}.happy-addon p:empty{display:none}.ha-cf:after,.ha-cf:before{display:table;content:" "}.ha-cf:after{clear:both}.ha-btn{display:inline-block;vertical-align:middle;text-align:center;text-decoration:none;font-size:14px;line-height:1;-webkit-transition:all .3s;transition:all .3s}.ha-btn:not(.ha-btn--link){padding:15px 25px;border-radius:.25rem;background-color:#562dd4;color:#fff}.ha-btn:not(.ha-btn--link):focus,.ha-btn:not(.ha-btn--link):hover{background-color:#e2498a}.ha-btn.ha-btn--link{color:#562dd4}.ha-btn.ha-btn--link:focus,.ha-btn.ha-btn--link:hover{color:#e2498a}.ha-btn-icon{-webkit-transition:all .3s;transition:all .3s}.ha-btn-icon+.ha-btn-text,.ha-btn-text+.ha-btn-icon{margin-left:5px}.ha-card-figure{position:relative;height:250px}.ha-card-figure>img{border-top-left-radius:calc(.5rem - 1px);border-top-right-radius:calc(.5rem - 1px)}.ha-card-body{padding:1.5rem}.ha-card-title{margin-top:0;margin-bottom:.75rem;color:#151515;font-weight:700;font-size:22px}.ha-card-text{margin-bottom:2rem;color:#616161;font-size:16px;line-height:1.7}.ha-card-text>p,.ha-infobox-text>p{margin-top:0;margin-bottom:0}.ha-card--top .ha-card-figure,.ha-member-links>a{display:inline-block}.ha-card--left>.elementor-widget-container,.ha-card--right>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center}.ha-card--left>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.ha-card--left .ha-card-body,.ha-card--left .ha-card-figure,.ha-card--right .ha-card-body,.ha-card--right .ha-card-figure{-webkit-box-flex:0;-webkit-flex:0 0 50%;-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.ha-card--left .ha-card-body,.ha-card--right .ha-card-body{padding:2.5rem}.ha-card--left .ha-card-figure>img{border-radius:calc(.5rem - 1px) 0 0 calc(.5rem - 1px)}.ha-card--right>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;text-align:right}.ha-card--right .ha-card-figure>img{border-radius:0 calc(.5rem - 1px) calc(.5rem - 1px) 0}.ha-card .ha-badge{position:absolute}.ha-badge{padding:.475rem 1.1rem;border-radius:50px;background-color:#fff;font-size:12px}.ha-badge--top-left{top:1rem;left:1rem}.ha-badge--top-center{top:1rem;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-badge--top-right{top:1rem;right:1rem}.ha-badge--middle-left{top:50%;left:1rem;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ha-badge--middle-center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.ha-badge--middle-right{top:50%;right:1rem;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.ha-badge--bottom-left{bottom:1rem;left:1rem}.ha-badge--bottom-center{bottom:1rem;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-badge--bottom-right{right:1rem;bottom:1rem}.ha-infobox>.elementor-widget-container{padding:1.5rem}.ha-infobox-title{margin-top:0;margin-bottom:1rem;color:#151515;font-size:24px}.ha-infobox-figure{display:inline-block;margin:0 0 1.5rem!important}.ha-infobox-figure--icon{text-align:center;font-size:3rem}.ha-icon-box-icon>i,.ha-infobox-figure>i{position:relative;display:block;width:1em;height:1em}.ha-icon-box-icon>i:before,.ha-infobox-figure>i:before{position:absolute;left:50%;-webkit-transform:translateX(-50%);-ms-transform:translateX(-50%);transform:translateX(-50%)}.ha-card-figure>img,.ha-infobox-figure>img,.ha-member-figure img{width:100%;height:100%;vertical-align:bottom}.ha-infobox-text+.ha-btn--link{margin-top:1rem}.ha-icon-box>.elementor-widget-container{position:relative;padding:1.25rem}.ha-icon-box-title{margin-top:0;margin-bottom:0;color:#151515;font-size:24px;-webkit-transition:color .3s;transition:color .3s}.ha-icon-box-icon{display:inline-block;margin-bottom:1rem;color:#151515;text-align:center;font-size:3rem;-webkit-transition:border .3s,background .3s,color .3s,-webkit-transform .3s;transition:transform .3s,border .3s,background .3s,color .3s;transition:transform .3s,border .3s,background .3s,color .3s,-webkit-transform .3s}.ha-icon-box-icon>i{-webkit-transition:-webkit-transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ha-icon-box-link{display:block;color:transparent;text-decoration:none}.ha-icon-box .ha-badge{position:absolute;z-index:9999;background-color:#e2498a;color:#fff}.ha-member>.elementor-widget-container{padding:1.25rem}.ha-member-figure{display:inline-block;margin:0 0 1.5rem!important}.ha-member-name{margin-top:0;margin-bottom:.5rem;color:#151515;font-size:18px}.ha-member-position{margin-bottom:1.5rem;color:#7f7f7f;font-size:14px}.ha-member-bio{margin-bottom:1.5rem;font-size:14px;line-height:1.6}.ha-member-links>a{color:#9895ad;text-align:center;line-height:1;-webkit-transition:all .2s;transition:all .2s}.ha-member-links>a:focus,.ha-member-links>a:hover{color:#222}.ha-member-links>a>i{width:1em;height:1em}.ha-member-links>a:not(:last-child){margin-right:.3rem}.ha-review-header{margin-top:1.5rem}.ha-review-desc p,.ha-review-figure{margin:0}.ha-review-figure>img{width:100%;height:100%;border-radius:50%;vertical-align:bottom}.ha-review-reviewer{margin-top:0;margin-bottom:.3rem;color:#151515;font-size:18px}.ha-review-position{margin-bottom:.5rem;color:#7f7f7f;font-size:15px}.ha-review-ratting{display:inline-block;font-size:12px;line-height:1}.ha-review-ratting--num{padding:.25em .66em;border-radius:2.5em;background-color:#287dfe;color:#fff}.ha-review-ratting--star{display:inline-block;color:#ffbf36;font-family:"Fontawesome"}.ha-review-ratting--star>span{position:relative;overflow:hidden;height:1em}.ha-review-ratting--star span>span{position:absolute;top:0;left:0;overflow:hidden;padding-top:1.5em}.ha-review-ratting--star span>span:before,span .ha-review-ratting--star:before{position:absolute;top:0;left:0}.ha-review-ratting--star span:before{content:"\f006\f006\f006\f006\f006"}.ha-review-ratting--star span>span:before{content:"\f005\f005\f005\f005\f005"}.ha-review-desc{margin-top:1.5rem;font-size:16px;line-height:1.6}.ha-review--top>.elementor-widget-container{padding:2rem}.ha-review--top .ha-review-figure{display:inline-block;max-width:70px;height:70px}.ha-review--left>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row}.ha-review--left>.elementor-widget-container,.ha-review--right>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;padding-left:2rem}.ha-review--left .ha-review-figure,.ha-review--right .ha-review-figure{-webkit-box-flex:0;-webkit-flex:0 0 150px;-ms-flex:0 0 150px;flex:0 0 150px;max-width:150px;height:150px}.ha-review--left .ha-review-body,.ha-review--right .ha-review-body{-webkit-box-flex:0;-webkit-flex:0 0 calc(100% - 150px);-ms-flex:0 0 calc(100% - 150px);flex:0 0 calc(100% - 150px);padding:2rem;max-width:calc(100% - 150px)}.ha-review--left .ha-review-body>:first-child,.ha-review--right .ha-review-body>:first-child{margin-top:0}.ha-review--right>.elementor-widget-container{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;padding-right:2rem;padding-left:0;text-align:right}.ha-image-compare .twentytwenty-container,.ha-image-compare .twentytwenty-wrapper{border-radius:inherit}.ha-skills>.elementor-widget-container{padding-top:1px}.ha-skill{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background-color:#e9ecef;font-size:.75rem}.ha-skill--inside .ha-skill-info,.ha-skill--outside .ha-skill-info{text-align:left;font-size:14px}.ha-skill--inside .ha-skill-level-text,.ha-skill--outside .ha-skill-level-text{float:right}.ha-skill--outside{height:2px}.ha-skill--outside .ha-skill-level{position:relative}.ha-skill--outside .ha-skill-info{position:absolute;top:-25px;width:100%;color:#242424}.ha-skill--inside{overflow:hidden;height:30px;border-radius:.3rem}.ha-skill--inside .ha-skill-info{padding-right:1rem;padding-left:1rem;color:#fff}.ha-skill-level{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;background-color:#007bff;color:#fff;text-align:center;white-space:nowrap;-webkit-transition:width .6s ease;transition:width .6s ease}.ha-skill--outside{margin-top:40px}.ha-skill--inside:not(:first-child){margin-top:20px}.ha-gradient-heading{margin-top:0;margin-bottom:0}.ha-gradient-heading>a{color:inherit;text-decoration:none}.ha-dual-button>.elementor-widget-container{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.ha-dual-btn,.ha-dual-btn-connector{display:inline-block}.ha-dual-btn-wrapper{position:relative;text-align:center;font-weight:400}.ha-dual-btn{padding:1.2rem 3rem;color:#fff;text-decoration:none;font-size:14px}.ha-dual-btn--left{border-top-left-radius:50px;border-bottom-left-radius:50px;background-color:#562dd4}.ha-dual-btn--left:focus,.ha-dual-btn--left:hover{background-color:#4423ab}.ha-dual-btn--right{border-top-right-radius:50px;border-bottom-right-radius:50px;background-color:#e2498a}.ha-dual-btn--right:focus,.ha-dual-btn--right:hover{background-color:#d6226e}.ha-dual-btn-connector{position:absolute!important;top:50%;right:0;z-index:9;width:30px;height:30px;border-radius:100%;background-color:#fff;box-shadow:0 0 0 5px rgba(255,255,255,.3);color:#27374c;text-transform:uppercase;font-size:12px;line-height:30px;-webkit-transform:translate(50%,-50%);-ms-transform:translate(50%,-50%);transform:translate(50%,-50%)}.ha-dual-btn-icon--before{margin-right:5px}.ha-dual-btn-icon--after{margin-left:5px}.ha-testimonial--basic>.elementor-widget-container{padding:2rem;border:1px solid #ececec;border-radius:.5rem}.ha-testimonial--basic .ha-testimonial__content{margin-bottom:2.5em}.ha-testimonial--bubble .ha-testimonial__content{position:relative;margin-bottom:1.5rem;padding:2rem;border-radius:6px;background-color:#fff;box-shadow:0 .2rem 2.8rem rgba(36,36,36,.1);line-height:1.6rem}.ha-testimonial--bubble .ha-testimonial__content:after{position:absolute;bottom:-14px;color:#fff;content:"\e911";font-size:36px;font-family:"Happy Icons";-webkit-transform:rotate(-180deg);-ms-transform:rotate(-180deg);transform:rotate(-180deg)}.ha-testimonial--left.ha-testimonial--bubble .ha-testimonial__content:after{left:15px}.ha-testimonial--center.ha-testimonial--bubble .ha-testimonial__content:after{left:50%;-webkit-transform:translateX(-50%) rotate(-180deg);-ms-transform:translateX(-50%) rotate(-180deg);transform:translateX(-50%) rotate(-180deg)}.ha-testimonial--right.ha-testimonial--bubble .ha-testimonial__content:after{right:15px}.ha-testimonial__reviewer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;-ms-flex-align:center;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.ha-testimonial__reviewer-thumb{width:65px;height:65px}.ha-testimonial__reviewer-thumb>img{width:100%;height:100%;border-radius:50%;-o-object-fit:cover;object-fit:cover}.ha-testimonial__reviewer-name{margin-bottom:.3rem;color:#562dd4;font-weight:700;font-size:18px}.ha-testimonial__reviewer-title{color:#8c8c8c;font-size:16px}.ha-testimonial--left .ha-testimonial__reviewer-meta{padding-left:1em}.ha-testimonial--center .ha-testimonial__reviewer{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.ha-testimonial--center .ha-testimonial__reviewer-meta{padding-top:1em}.ha-testimonial--right .ha-testimonial__reviewer{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.ha-testimonial--right .ha-testimonial__reviewer-meta{padding-right:1em}.ha-testimonial--left{text-align:left}.ha-testimonial--right{text-align:right}.ha-testimonial--center{text-align:center}
|
assets/js/happy-addons.js
CHANGED
@@ -31,95 +31,98 @@ window.Happy = window.Happy || {};
|
|
31 |
this.run();
|
32 |
},
|
33 |
|
34 |
-
|
35 |
return this.$element.find('.elementor-widget-container')[0];
|
36 |
},
|
37 |
|
38 |
-
|
39 |
-
anime.remove(this.
|
40 |
-
this.
|
41 |
},
|
42 |
|
43 |
onDestroy: function() {
|
44 |
elementorModules.frontend.handlers.Base.prototype.onDestroy.apply(this, arguments);
|
45 |
-
this.
|
46 |
},
|
47 |
|
48 |
onElementChange: function() {
|
49 |
-
this.
|
50 |
this.run();
|
51 |
},
|
52 |
|
|
|
|
|
|
|
|
|
53 |
run: function() {
|
54 |
-
var
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
delay: settings.ha_floating_fx_translate_delay.size || 0
|
68 |
}
|
69 |
}
|
70 |
-
if (
|
71 |
-
|
72 |
-
value:
|
73 |
-
duration:
|
74 |
-
delay:
|
75 |
}
|
76 |
}
|
77 |
}
|
78 |
|
79 |
-
if (
|
80 |
-
if (
|
81 |
-
|
82 |
-
value:
|
83 |
-
duration:
|
84 |
-
delay:
|
85 |
}
|
86 |
}
|
87 |
-
if (
|
88 |
-
|
89 |
-
value:
|
90 |
-
duration:
|
91 |
-
delay:
|
92 |
}
|
93 |
}
|
94 |
-
if (
|
95 |
-
|
96 |
-
value:
|
97 |
-
duration:
|
98 |
-
delay:
|
99 |
}
|
100 |
}
|
101 |
}
|
102 |
|
103 |
-
if (
|
104 |
-
if (
|
105 |
-
|
106 |
-
value:
|
107 |
-
duration:
|
108 |
-
delay:
|
109 |
}
|
110 |
}
|
111 |
-
if (
|
112 |
-
|
113 |
-
value:
|
114 |
-
duration:
|
115 |
-
delay:
|
116 |
}
|
117 |
}
|
118 |
}
|
119 |
|
120 |
-
if (
|
121 |
-
this.
|
122 |
-
anime(
|
123 |
}
|
124 |
}
|
125 |
});
|
31 |
this.run();
|
32 |
},
|
33 |
|
34 |
+
getWrapper: function() {
|
35 |
return this.$element.find('.elementor-widget-container')[0];
|
36 |
},
|
37 |
|
38 |
+
factoryReset: function() {
|
39 |
+
anime.remove(this.getWrapper());
|
40 |
+
this.getWrapper() && this.getWrapper().removeAttribute('style');
|
41 |
},
|
42 |
|
43 |
onDestroy: function() {
|
44 |
elementorModules.frontend.handlers.Base.prototype.onDestroy.apply(this, arguments);
|
45 |
+
this.factoryReset();
|
46 |
},
|
47 |
|
48 |
onElementChange: function() {
|
49 |
+
this.factoryReset();
|
50 |
this.run();
|
51 |
},
|
52 |
|
53 |
+
getConfig: function(key) {
|
54 |
+
return this.getElementSettings('ha_floating_fx_' + key);
|
55 |
+
},
|
56 |
+
|
57 |
run: function() {
|
58 |
+
var config = {
|
59 |
+
targets: this.getWrapper(),
|
60 |
+
loop: true,
|
61 |
+
direction: 'alternate',
|
62 |
+
easing: 'easeInOutSine',
|
63 |
+
};
|
64 |
+
|
65 |
+
if (this.getConfig('translate_toggle')) {
|
66 |
+
if (this.getConfig('translate_x.size') || this.getConfig('translate_x.sizes.to')) {
|
67 |
+
config.translateX = {
|
68 |
+
value: [this.getConfig('translate_x.sizes.from') || 0, this.getConfig('translate_x.size') || this.getConfig('translate_x.sizes.to')],
|
69 |
+
duration: this.getConfig('translate_duration.size'),
|
70 |
+
delay: this.getConfig('translate_delay.size') || 0
|
|
|
71 |
}
|
72 |
}
|
73 |
+
if (this.getConfig('translate_y.size') || this.getConfig('translate_y.sizes.to')) {
|
74 |
+
config.translateY = {
|
75 |
+
value: [this.getConfig('translate_y.sizes.from') || 0, this.getConfig('translate_y.size') || this.getConfig('translate_y.sizes.to')],
|
76 |
+
duration: this.getConfig('translate_duration.size'),
|
77 |
+
delay: this.getConfig('translate_delay.size') || 0
|
78 |
}
|
79 |
}
|
80 |
}
|
81 |
|
82 |
+
if (this.getConfig('rotate_toggle')) {
|
83 |
+
if (this.getConfig('rotate_x.size') || this.getConfig('rotate_x.sizes.to')) {
|
84 |
+
config.rotateX = {
|
85 |
+
value: [this.getConfig('rotate_x.sizes.from') || 0, this.getConfig('rotate_x.size') || this.getConfig('rotate_x.sizes.to')],
|
86 |
+
duration: this.getConfig('rotate_duration.size'),
|
87 |
+
delay: this.getConfig('rotate_delay.size') || 0
|
88 |
}
|
89 |
}
|
90 |
+
if (this.getConfig('rotate_y.size') || this.getConfig('rotate_y.sizes.to')) {
|
91 |
+
config.rotateY = {
|
92 |
+
value: [this.getConfig('rotate_y.sizes.from') || 0, this.getConfig('rotate_y.size') || this.getConfig('rotate_y.sizes.to')],
|
93 |
+
duration: this.getConfig('rotate_duration.size'),
|
94 |
+
delay: this.getConfig('rotate_delay.size') || 0
|
95 |
}
|
96 |
}
|
97 |
+
if (this.getConfig('rotate_z.size') || this.getConfig('rotate_z.sizes.to')) {
|
98 |
+
config.rotateZ = {
|
99 |
+
value: [this.getConfig('rotate_z.sizes.from') || 0, this.getConfig('rotate_z.size') || this.getConfig('rotate_z.sizes.to')],
|
100 |
+
duration: this.getConfig('rotate_duration.size'),
|
101 |
+
delay: this.getConfig('rotate_delay.size') || 0
|
102 |
}
|
103 |
}
|
104 |
}
|
105 |
|
106 |
+
if (this.getConfig('scale_toggle')) {
|
107 |
+
if (this.getConfig('scale_x.size') || this.getConfig('scale_x.sizes.to')) {
|
108 |
+
config.scaleX = {
|
109 |
+
value: [this.getConfig('scale_x.sizes.from') || 0, this.getConfig('scale_x.size') || this.getConfig('scale_x.sizes.to')],
|
110 |
+
duration: this.getConfig('scale_duration.size'),
|
111 |
+
delay: this.getConfig('scale_delay.size') || 0
|
112 |
}
|
113 |
}
|
114 |
+
if (this.getConfig('scale_y.size') || this.getConfig('scale_y.sizes.to')) {
|
115 |
+
config.scaleY = {
|
116 |
+
value: [this.getConfig('scale_y.sizes.from') || 0, this.getConfig('scale_y.size') || this.getConfig('scale_y.sizes.to')],
|
117 |
+
duration: this.getConfig('scale_duration.size'),
|
118 |
+
delay: this.getConfig('scale_delay.size') || 0
|
119 |
}
|
120 |
}
|
121 |
}
|
122 |
|
123 |
+
if (this.getConfig('translate_toggle') || this.getConfig('rotate_toggle') || this.getConfig('scale_toggle')) {
|
124 |
+
this.getWrapper() && this.getWrapper().style.setProperty('will-change', 'transform');
|
125 |
+
anime(config);
|
126 |
}
|
127 |
}
|
128 |
});
|
assets/js/happy-addons.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
"use strict";window.Happy=window.Happy||{},function(e,
|
1 |
+
"use strict";window.Happy=window.Happy||{},function(t,e,i){var s=t(i);t.fn.getHappySettings=function(){return this.data("happy-settings")},e.initImageComparison=function(t){var e=t.find(".hajs-image-comparison"),i=e.getHappySettings();i[{on_hover:"move_slider_on_hover",on_swipe:"move_with_handle_only",on_click:"click_to_move"}[i.move_handle||"on_swipe"]]=!0,delete i.move_handle,e.imagesLoaded().done(function(){e.twentytwenty(i)})},s.on("elementor/frontend/init",function(){var t=elementorModules.frontend.handlers.Base.extend({onInit:function(){elementorModules.frontend.handlers.Base.prototype.onInit.apply(this,arguments),this.run()},getWrapper:function(){return this.$element.find(".elementor-widget-container")[0]},factoryReset:function(){anime.remove(this.getWrapper()),this.getWrapper()&&this.getWrapper().removeAttribute("style")},onDestroy:function(){elementorModules.frontend.handlers.Base.prototype.onDestroy.apply(this,arguments),this.factoryReset()},onElementChange:function(){this.factoryReset(),this.run()},getConfig:function(t){return this.getElementSettings("ha_floating_fx_"+t)},run:function(){var t={targets:this.getWrapper(),loop:!0,direction:"alternate",easing:"easeInOutSine"};this.getConfig("translate_toggle")&&((this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to"))&&(t.translateX={value:[this.getConfig("translate_x.sizes.from")||0,this.getConfig("translate_x.size")||this.getConfig("translate_x.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0}),(this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to"))&&(t.translateY={value:[this.getConfig("translate_y.sizes.from")||0,this.getConfig("translate_y.size")||this.getConfig("translate_y.sizes.to")],duration:this.getConfig("translate_duration.size"),delay:this.getConfig("translate_delay.size")||0})),this.getConfig("rotate_toggle")&&((this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to"))&&(t.rotateX={value:[this.getConfig("rotate_x.sizes.from")||0,this.getConfig("rotate_x.size")||this.getConfig("rotate_x.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to"))&&(t.rotateY={value:[this.getConfig("rotate_y.sizes.from")||0,this.getConfig("rotate_y.size")||this.getConfig("rotate_y.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0}),(this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to"))&&(t.rotateZ={value:[this.getConfig("rotate_z.sizes.from")||0,this.getConfig("rotate_z.size")||this.getConfig("rotate_z.sizes.to")],duration:this.getConfig("rotate_duration.size"),delay:this.getConfig("rotate_delay.size")||0})),this.getConfig("scale_toggle")&&((this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to"))&&(t.scaleX={value:[this.getConfig("scale_x.sizes.from")||0,this.getConfig("scale_x.size")||this.getConfig("scale_x.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0}),(this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to"))&&(t.scaleY={value:[this.getConfig("scale_y.sizes.from")||0,this.getConfig("scale_y.size")||this.getConfig("scale_y.sizes.to")],duration:this.getConfig("scale_duration.size"),delay:this.getConfig("scale_delay.size")||0})),(this.getConfig("translate_toggle")||this.getConfig("rotate_toggle")||this.getConfig("scale_toggle"))&&(this.getWrapper()&&this.getWrapper().style.setProperty("will-change","transform"),anime(t))}});elementorFrontend.hooks.addAction("frontend/element_ready/ha-image-compare.default",e.initImageComparison),elementorFrontend.hooks.addAction("frontend/element_ready/widget",function(e){elementorFrontend.elementsHandler.addHandler(t,{$element:e})})})}(jQuery,Happy,window);
|
base.php
CHANGED
@@ -9,12 +9,13 @@ namespace Happy_Addons\Elementor;
|
|
9 |
use Happy_Addons\Elementor\Manager\Assets;
|
10 |
use Happy_Addons\Elementor\Manager\Widgets;
|
11 |
use Happy_Addons\Elementor\Extension\Happy_Effects;
|
|
|
12 |
|
13 |
defined( 'ABSPATH' ) || die();
|
14 |
|
15 |
class Base {
|
16 |
|
17 |
-
const VERSION = '1.
|
18 |
|
19 |
const MINIMUM_ELEMENTOR_VERSION = '2.5.0';
|
20 |
|
@@ -68,6 +69,7 @@ class Base {
|
|
68 |
Widgets::init();
|
69 |
Assets::init();
|
70 |
Happy_Effects::init();
|
|
|
71 |
}
|
72 |
|
73 |
public function include_files() {
|
@@ -76,6 +78,7 @@ class Base {
|
|
76 |
require( __DIR__ . '/classes/widget-manager.php' );
|
77 |
require( __DIR__ . '/classes/asset-manager.php' );
|
78 |
require( __DIR__ . '/classes/happy-effects.php' );
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
9 |
use Happy_Addons\Elementor\Manager\Assets;
|
10 |
use Happy_Addons\Elementor\Manager\Widgets;
|
11 |
use Happy_Addons\Elementor\Extension\Happy_Effects;
|
12 |
+
use Happy_Addons\Elementor\Admin\Dashboard;
|
13 |
|
14 |
defined( 'ABSPATH' ) || die();
|
15 |
|
16 |
class Base {
|
17 |
|
18 |
+
const VERSION = '1.1.1';
|
19 |
|
20 |
const MINIMUM_ELEMENTOR_VERSION = '2.5.0';
|
21 |
|
69 |
Widgets::init();
|
70 |
Assets::init();
|
71 |
Happy_Effects::init();
|
72 |
+
// Dashboard::init();
|
73 |
}
|
74 |
|
75 |
public function include_files() {
|
78 |
require( __DIR__ . '/classes/widget-manager.php' );
|
79 |
require( __DIR__ . '/classes/asset-manager.php' );
|
80 |
require( __DIR__ . '/classes/happy-effects.php' );
|
81 |
+
// require( __DIR__ . '/classes/dashboard.php' );
|
82 |
}
|
83 |
|
84 |
/**
|
base/widget-base.php
CHANGED
@@ -69,40 +69,13 @@ abstract class Base extends Widget_Base {
|
|
69 |
return rtrim( $html_class );
|
70 |
}
|
71 |
|
72 |
-
protected function get_presets() {
|
73 |
-
return [];
|
74 |
-
}
|
75 |
-
|
76 |
/**
|
77 |
* Register design controls
|
78 |
*
|
79 |
* Design controls are fixed for all widgets
|
80 |
*/
|
81 |
private function register_design_controls() {
|
82 |
-
$presets = $this->get_presets();
|
83 |
-
if ( empty( $presets ) ) {
|
84 |
-
return;
|
85 |
-
}
|
86 |
-
|
87 |
-
$this->start_controls_section(
|
88 |
-
'_design',
|
89 |
-
[
|
90 |
-
'label' => __( 'Design', 'happy-elementor-addons' ),
|
91 |
-
'tab' => Controls_Manager::TAB_CONTENT,
|
92 |
-
]
|
93 |
-
);
|
94 |
|
95 |
-
$this->add_control(
|
96 |
-
'_preset',
|
97 |
-
[
|
98 |
-
'label' => __( 'Preset', 'happy-elementor-addons' ),
|
99 |
-
'type' => 'select',
|
100 |
-
'options' => ['' => __( 'Default', 'happy-elementor-addons' )] + $presets,
|
101 |
-
'default' => '',
|
102 |
-
]
|
103 |
-
);
|
104 |
-
|
105 |
-
$this->end_controls_section();
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -133,8 +106,6 @@ abstract class Base extends Widget_Base {
|
|
133 |
* Register widget controls
|
134 |
*/
|
135 |
protected function _register_controls() {
|
136 |
-
$this->register_design_controls();
|
137 |
-
|
138 |
$this->register_content_controls();
|
139 |
|
140 |
$this->register_style_controls();
|
69 |
return rtrim( $html_class );
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
72 |
/**
|
73 |
* Register design controls
|
74 |
*
|
75 |
* Design controls are fixed for all widgets
|
76 |
*/
|
77 |
private function register_design_controls() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
|
81 |
/**
|
106 |
* Register widget controls
|
107 |
*/
|
108 |
protected function _register_controls() {
|
|
|
|
|
109 |
$this->register_content_controls();
|
110 |
|
111 |
$this->register_style_controls();
|
classes/asset-manager.php
CHANGED
@@ -14,6 +14,9 @@ class Assets {
|
|
14 |
// Frontend scripts
|
15 |
add_action( 'wp_enqueue_scripts', [__CLASS__, 'enqueue_frontend_scripts'] );
|
16 |
|
|
|
|
|
|
|
17 |
// Edit and preview enqueue
|
18 |
add_action( 'elementor/preview/enqueue_styles', [__CLASS__, 'enqueue_preview_style'] );
|
19 |
|
@@ -88,6 +91,19 @@ class Assets {
|
|
88 |
);
|
89 |
}
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
public static function enqueue_editor_scripts() {
|
92 |
wp_enqueue_style(
|
93 |
'happy-icon',
|
14 |
// Frontend scripts
|
15 |
add_action( 'wp_enqueue_scripts', [__CLASS__, 'enqueue_frontend_scripts'] );
|
16 |
|
17 |
+
// Dashboard scripts
|
18 |
+
add_action( 'admin_enqueue_scripts', [__CLASS__, 'dashboard_enqueue_scripts'] );
|
19 |
+
|
20 |
// Edit and preview enqueue
|
21 |
add_action( 'elementor/preview/enqueue_styles', [__CLASS__, 'enqueue_preview_style'] );
|
22 |
|
91 |
);
|
92 |
}
|
93 |
|
94 |
+
public static function dashboard_enqueue_scripts() {
|
95 |
+
$currentScreen = get_current_screen();
|
96 |
+
if ( $currentScreen->id != "elementor_page_happy-settings" ) {
|
97 |
+
return;
|
98 |
+
}
|
99 |
+
wp_enqueue_style(
|
100 |
+
'happy-dashboard',
|
101 |
+
HAPPY_ASSETS . 'admin/css/dashboard.css',
|
102 |
+
null,
|
103 |
+
Base::VERSION
|
104 |
+
);
|
105 |
+
}
|
106 |
+
|
107 |
public static function enqueue_editor_scripts() {
|
108 |
wp_enqueue_style(
|
109 |
'happy-icon',
|
classes/dashboard.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
namespace Happy_Addons\Elementor\Admin;
|
3 |
+
|
4 |
+
use Elementor\Base;
|
5 |
+
|
6 |
+
defined( 'ABSPATH' ) || die();
|
7 |
+
|
8 |
+
class Dashboard {
|
9 |
+
|
10 |
+
public static function init() {
|
11 |
+
add_action( 'admin_menu', [__CLASS__, 'happy_admin_menu'], 515 );
|
12 |
+
}
|
13 |
+
|
14 |
+
public static function happy_admin_menu() {
|
15 |
+
add_submenu_page(
|
16 |
+
'elementor',
|
17 |
+
__( 'Happy Addons', 'happy-elementor-addons' ),
|
18 |
+
__( 'Happy Addons', 'happy-elementor-addons' ),
|
19 |
+
'manage_options',
|
20 |
+
'happy-settings',
|
21 |
+
array( __CLASS__, 'happy_admin_settings' )
|
22 |
+
);
|
23 |
+
}
|
24 |
+
|
25 |
+
public static function happy_admin_settings() {
|
26 |
+
echo '<div class="happy-settings">';
|
27 |
+
|
28 |
+
include_once HAPPY_DIR_PATH . 'inc/admin-templates/widgets.php';
|
29 |
+
include_once HAPPY_DIR_PATH . 'inc/admin-templates/save.php';
|
30 |
+
|
31 |
+
echo '</div>';
|
32 |
+
}
|
33 |
+
|
34 |
+
// public function save_settings() {
|
35 |
+
//
|
36 |
+
// }
|
37 |
+
|
38 |
+
}
|
classes/happy-effects.php
CHANGED
@@ -59,7 +59,25 @@ class Happy_Effects {
|
|
59 |
[
|
60 |
'label' => __( 'Translate X', 'happy-elementor-addons' ),
|
61 |
'type' => Controls_Manager::SLIDER,
|
62 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
'condition' => [
|
64 |
'ha_floating_fx_translate_toggle' => 'yes',
|
65 |
'ha_floating_fx' => 'yes',
|
@@ -74,7 +92,25 @@ class Happy_Effects {
|
|
74 |
[
|
75 |
'label' => __( 'Translate Y', 'happy-elementor-addons' ),
|
76 |
'type' => Controls_Manager::SLIDER,
|
77 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
'condition' => [
|
79 |
'ha_floating_fx_translate_toggle' => 'yes',
|
80 |
'ha_floating_fx' => 'yes',
|
@@ -153,13 +189,25 @@ class Happy_Effects {
|
|
153 |
[
|
154 |
'label' => __( 'Rotate X', 'happy-elementor-addons' ),
|
155 |
'type' => Controls_Manager::SLIDER,
|
156 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
'range' => [
|
158 |
'px' => [
|
159 |
-
'min' =>
|
160 |
-
'max' =>
|
161 |
]
|
162 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
'condition' => [
|
164 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
165 |
'ha_floating_fx' => 'yes',
|
@@ -174,13 +222,25 @@ class Happy_Effects {
|
|
174 |
[
|
175 |
'label' => __( 'Rotate Y', 'happy-elementor-addons' ),
|
176 |
'type' => Controls_Manager::SLIDER,
|
177 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
'range' => [
|
179 |
'px' => [
|
180 |
-
'min' =>
|
181 |
-
'max' =>
|
182 |
]
|
183 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
'condition' => [
|
185 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
186 |
'ha_floating_fx' => 'yes',
|
@@ -195,13 +255,25 @@ class Happy_Effects {
|
|
195 |
[
|
196 |
'label' => __( 'Rotate Z', 'happy-elementor-addons' ),
|
197 |
'type' => Controls_Manager::SLIDER,
|
198 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
'range' => [
|
200 |
'px' => [
|
201 |
-
'min' =>
|
202 |
-
'max' =>
|
203 |
]
|
204 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
'condition' => [
|
206 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
207 |
'ha_floating_fx' => 'yes',
|
@@ -280,14 +352,26 @@ class Happy_Effects {
|
|
280 |
[
|
281 |
'label' => __( 'Scale X', 'happy-elementor-addons' ),
|
282 |
'type' => Controls_Manager::SLIDER,
|
283 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
'range' => [
|
285 |
'px' => [
|
286 |
'min' => 0,
|
287 |
-
'max' =>
|
288 |
'step' => .1
|
289 |
]
|
290 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
'condition' => [
|
292 |
'ha_floating_fx_scale_toggle' => 'yes',
|
293 |
'ha_floating_fx' => 'yes',
|
@@ -302,14 +386,26 @@ class Happy_Effects {
|
|
302 |
[
|
303 |
'label' => __( 'Scale Y', 'happy-elementor-addons' ),
|
304 |
'type' => Controls_Manager::SLIDER,
|
305 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
306 |
'range' => [
|
307 |
'px' => [
|
308 |
'min' => 0,
|
309 |
-
'max' =>
|
310 |
'step' => .1
|
311 |
]
|
312 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
313 |
'condition' => [
|
314 |
'ha_floating_fx_scale_toggle' => 'yes',
|
315 |
'ha_floating_fx' => 'yes',
|
59 |
[
|
60 |
'label' => __( 'Translate X', 'happy-elementor-addons' ),
|
61 |
'type' => Controls_Manager::SLIDER,
|
62 |
+
'default' => [
|
63 |
+
'sizes' => [
|
64 |
+
'from' => 0,
|
65 |
+
'to' => 5,
|
66 |
+
],
|
67 |
+
'unit' => 'px',
|
68 |
+
],
|
69 |
+
'range' => [
|
70 |
+
'px' => [
|
71 |
+
'min' => -100,
|
72 |
+
'max' => 100,
|
73 |
+
]
|
74 |
+
],
|
75 |
+
'labels' => [
|
76 |
+
__( 'From', 'happy-elementor-addons' ),
|
77 |
+
__( 'To', 'happy-elementor-addons' ),
|
78 |
+
],
|
79 |
+
'scales' => 1,
|
80 |
+
'handles' => 'range',
|
81 |
'condition' => [
|
82 |
'ha_floating_fx_translate_toggle' => 'yes',
|
83 |
'ha_floating_fx' => 'yes',
|
92 |
[
|
93 |
'label' => __( 'Translate Y', 'happy-elementor-addons' ),
|
94 |
'type' => Controls_Manager::SLIDER,
|
95 |
+
'default' => [
|
96 |
+
'sizes' => [
|
97 |
+
'from' => 0,
|
98 |
+
'to' => 5,
|
99 |
+
],
|
100 |
+
'unit' => 'px',
|
101 |
+
],
|
102 |
+
'range' => [
|
103 |
+
'px' => [
|
104 |
+
'min' => -100,
|
105 |
+
'max' => 100,
|
106 |
+
]
|
107 |
+
],
|
108 |
+
'labels' => [
|
109 |
+
__( 'From', 'happy-elementor-addons' ),
|
110 |
+
__( 'To', 'happy-elementor-addons' ),
|
111 |
+
],
|
112 |
+
'scales' => 1,
|
113 |
+
'handles' => 'range',
|
114 |
'condition' => [
|
115 |
'ha_floating_fx_translate_toggle' => 'yes',
|
116 |
'ha_floating_fx' => 'yes',
|
189 |
[
|
190 |
'label' => __( 'Rotate X', 'happy-elementor-addons' ),
|
191 |
'type' => Controls_Manager::SLIDER,
|
192 |
+
'default' => [
|
193 |
+
'sizes' => [
|
194 |
+
'from' => 0,
|
195 |
+
'to' => 45,
|
196 |
+
],
|
197 |
+
'unit' => 'px',
|
198 |
+
],
|
199 |
'range' => [
|
200 |
'px' => [
|
201 |
+
'min' => -180,
|
202 |
+
'max' => 180,
|
203 |
]
|
204 |
],
|
205 |
+
'labels' => [
|
206 |
+
__( 'From', 'happy-elementor-addons' ),
|
207 |
+
__( 'To', 'happy-elementor-addons' ),
|
208 |
+
],
|
209 |
+
'scales' => 1,
|
210 |
+
'handles' => 'range',
|
211 |
'condition' => [
|
212 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
213 |
'ha_floating_fx' => 'yes',
|
222 |
[
|
223 |
'label' => __( 'Rotate Y', 'happy-elementor-addons' ),
|
224 |
'type' => Controls_Manager::SLIDER,
|
225 |
+
'default' => [
|
226 |
+
'sizes' => [
|
227 |
+
'from' => 0,
|
228 |
+
'to' => 45,
|
229 |
+
],
|
230 |
+
'unit' => 'px',
|
231 |
+
],
|
232 |
'range' => [
|
233 |
'px' => [
|
234 |
+
'min' => -180,
|
235 |
+
'max' => 180,
|
236 |
]
|
237 |
],
|
238 |
+
'labels' => [
|
239 |
+
__( 'From', 'happy-elementor-addons' ),
|
240 |
+
__( 'To', 'happy-elementor-addons' ),
|
241 |
+
],
|
242 |
+
'scales' => 1,
|
243 |
+
'handles' => 'range',
|
244 |
'condition' => [
|
245 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
246 |
'ha_floating_fx' => 'yes',
|
255 |
[
|
256 |
'label' => __( 'Rotate Z', 'happy-elementor-addons' ),
|
257 |
'type' => Controls_Manager::SLIDER,
|
258 |
+
'default' => [
|
259 |
+
'sizes' => [
|
260 |
+
'from' => 0,
|
261 |
+
'to' => 45,
|
262 |
+
],
|
263 |
+
'unit' => 'px',
|
264 |
+
],
|
265 |
'range' => [
|
266 |
'px' => [
|
267 |
+
'min' => -180,
|
268 |
+
'max' => 180,
|
269 |
]
|
270 |
],
|
271 |
+
'labels' => [
|
272 |
+
__( 'From', 'happy-elementor-addons' ),
|
273 |
+
__( 'To', 'happy-elementor-addons' ),
|
274 |
+
],
|
275 |
+
'scales' => 1,
|
276 |
+
'handles' => 'range',
|
277 |
'condition' => [
|
278 |
'ha_floating_fx_rotate_toggle' => 'yes',
|
279 |
'ha_floating_fx' => 'yes',
|
352 |
[
|
353 |
'label' => __( 'Scale X', 'happy-elementor-addons' ),
|
354 |
'type' => Controls_Manager::SLIDER,
|
355 |
+
'default' => [
|
356 |
+
'sizes' => [
|
357 |
+
'from' => 1,
|
358 |
+
'to' => 1.2,
|
359 |
+
],
|
360 |
+
'unit' => 'px',
|
361 |
+
],
|
362 |
'range' => [
|
363 |
'px' => [
|
364 |
'min' => 0,
|
365 |
+
'max' => 5,
|
366 |
'step' => .1
|
367 |
]
|
368 |
],
|
369 |
+
'labels' => [
|
370 |
+
__( 'From', 'happy-elementor-addons' ),
|
371 |
+
__( 'To', 'happy-elementor-addons' ),
|
372 |
+
],
|
373 |
+
'scales' => 1,
|
374 |
+
'handles' => 'range',
|
375 |
'condition' => [
|
376 |
'ha_floating_fx_scale_toggle' => 'yes',
|
377 |
'ha_floating_fx' => 'yes',
|
386 |
[
|
387 |
'label' => __( 'Scale Y', 'happy-elementor-addons' ),
|
388 |
'type' => Controls_Manager::SLIDER,
|
389 |
+
'default' => [
|
390 |
+
'sizes' => [
|
391 |
+
'from' => 1,
|
392 |
+
'to' => 1.2,
|
393 |
+
],
|
394 |
+
'unit' => 'px',
|
395 |
+
],
|
396 |
'range' => [
|
397 |
'px' => [
|
398 |
'min' => 0,
|
399 |
+
'max' => 5,
|
400 |
'step' => .1
|
401 |
]
|
402 |
],
|
403 |
+
'labels' => [
|
404 |
+
__( 'From', 'happy-elementor-addons' ),
|
405 |
+
__( 'To', 'happy-elementor-addons' ),
|
406 |
+
],
|
407 |
+
'scales' => 1,
|
408 |
+
'handles' => 'range',
|
409 |
'condition' => [
|
410 |
'ha_floating_fx_scale_toggle' => 'yes',
|
411 |
'ha_floating_fx' => 'yes',
|
classes/widget-manager.php
CHANGED
@@ -37,6 +37,7 @@ class Widgets {
|
|
37 |
'calderaform',
|
38 |
'weform',
|
39 |
'dual-button',
|
|
|
40 |
];
|
41 |
|
42 |
foreach ( $widgets as $widget ) {
|
37 |
'calderaform',
|
38 |
'weform',
|
39 |
'dual-button',
|
40 |
+
'testimonial',
|
41 |
];
|
42 |
|
43 |
foreach ( $widgets as $widget ) {
|
inc/admin-templates/save.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div class="ha-button-wrap">
|
2 |
+
<div class="brand">
|
3 |
+
<?php _e( 'Happy Elementor Addons', 'happy-elementor-addons' ); ?>
|
4 |
+
</div>
|
5 |
+
<button type="submit" class="ha-save-button">
|
6 |
+
<?php _e('Save settings', 'happy-elementor-addons'); ?>
|
7 |
+
</button>
|
8 |
+
</div>
|
inc/admin-templates/widgets.php
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="widgets" class="ha-settings-tab">
|
2 |
+
<div class="row">
|
3 |
+
<div class="ha-container">
|
4 |
+
<p class="ha-elements-control-notice">
|
5 |
+
<?php _e( 'You can disable the elements you are not using on your site. That will disable all associated assets of those widgets to improve your site loading.', 'happy-elementor-addons' ) ?>
|
6 |
+
</p>
|
7 |
+
<div class="checkbox-wrapper">
|
8 |
+
<div class="ha-checkbox">
|
9 |
+
<?php _e( 'Card', 'happy-elementor-addons' ); ?>
|
10 |
+
<label class="ha-switch" for="card">
|
11 |
+
<input type="checkbox" checked id="card" name="card">
|
12 |
+
<span class="ha-slider round"></span>
|
13 |
+
</label>
|
14 |
+
</div>
|
15 |
+
<div class="ha-checkbox">
|
16 |
+
<?php _e( 'Info Box', 'happy-elementor-addons' ); ?>
|
17 |
+
<label class="ha-switch" for="info">
|
18 |
+
<input type="checkbox" id="info" name="info">
|
19 |
+
<span class="ha-slider round"></span>
|
20 |
+
</label>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</div>
|
24 |
+
</div>
|
25 |
+
</div>
|
plugin.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Happy Elementor Addons
|
4 |
* Plugin URI: https://happyaddons.com/
|
5 |
* Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
|
6 |
-
* Version: 1.
|
7 |
* Author: HappyMonster
|
8 |
* Author URI: https://happymonster.me/
|
9 |
* License: GPLv2
|
3 |
* Plugin Name: Happy Elementor Addons
|
4 |
* Plugin URI: https://happyaddons.com/
|
5 |
* Description: <a href="https://happyaddons.com/">HappyAddons</a> is a collection of slick, powerful widgets that works seamlessly with Elementor page builder. It’s trendy look with detail customization features allows to create extraordinary designs instantly. <a href="https://happyaddons.com/">HappyAddons</a> is free, rapidly growing and comes with great support.
|
6 |
+
* Version: 1.1.1
|
7 |
* Author: HappyMonster
|
8 |
* Author URI: https://happymonster.me/
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -1,14 +1,13 @@
|
|
1 |
=== Happy Elementor Addons ===
|
2 |
Plugin Name: Happy Elementor Addons
|
3 |
-
Version: 1.
|
4 |
Author: HappyMonster
|
5 |
-
Author URI:
|
6 |
Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
|
7 |
Tags: elementor, form, page builder, widget, addon
|
8 |
Requires at least: 4.7
|
9 |
Tested up to: 5.2.2
|
10 |
Requires PHP: 5.4
|
11 |
-
Stable tag: 1.0.5
|
12 |
License: GPLv2
|
13 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
@@ -29,11 +28,12 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
29 |
7. **[Review](https://happyaddons.com/elementor-review-widget-demo/)** - Showcase your user feedback, reviews and rating easily than ever using our review widget. Display user photo, texts and star ratings. Make them stand out using built in offsets and positioning features. [Check demo](https://happyaddons.com/elementor-review-widget-demo/)
|
30 |
8. **[Skill Bars](https://happyaddons.com/elementor-skill-bars-widget-demo/)** - An essential building block to showcase user skills, task percentage, required tools and other progressive information in different ways. Comes with incredible customizing options to suit your needs. [Check demo](https://happyaddons.com/elementor-skill-bars-widget-demo/)
|
31 |
9. **[Contact Form 7](https://happyaddons.com/elementor-contact-form-7-widget-demo/)** - This utility widget helps you to integrate existing forms built using CF7 plugin across your web pages without spending too much time. [Check demo](https://happyaddons.com/elementor-contact-form-7-widget-demo/)
|
32 |
-
10. **[Caldera Forms](https://happyaddons.com/elementor-caldera-forms-widget-demo/)** - This widget can help you to display your caldera forms to display on your web pages designed with Elementor. [Check demo](https://happyaddons.com/elementor-caldera-forms-widget-demo/)
|
33 |
11. **[weForms](https://happyaddons.com/elementor-we-forms-widget-demo/)** - Designed forms using weForms plugin and looking for a way to display those on your Elementor powered pages? This is the answer for that. [Check demo](https://happyaddons.com/elementor-we-forms-widget-demo/)
|
34 |
12. **[Ninja Forms](https://happyaddons.com/elementor-ninja-form-widget-demo/)** - Use this widget to embed forms created using Ninja Forms to display seamlessly on your web pages. Various styling options will help you to look at them even better. [Check demo](https://happyaddons.com/elementor-ninja-form-widget-demo/)
|
35 |
-
|
36 |
-
|
|
|
37 |
|
38 |
### Included Free Extensions
|
39 |
**Happy Effects**
|
@@ -91,6 +91,21 @@ It's really easy and super simple to install **Happy Elementor Addons** plugin b
|
|
91 |
|
92 |
== Changelog ==
|
93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
= 1.0.5 =
|
95 |
|
96 |
* New: Happy Effects (universal widget extension)
|
1 |
=== Happy Elementor Addons ===
|
2 |
Plugin Name: Happy Elementor Addons
|
3 |
+
Version: 1.1.1
|
4 |
Author: HappyMonster
|
5 |
+
Author URI: https://happyaddons.com/
|
6 |
Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
|
7 |
Tags: elementor, form, page builder, widget, addon
|
8 |
Requires at least: 4.7
|
9 |
Tested up to: 5.2.2
|
10 |
Requires PHP: 5.4
|
|
|
11 |
License: GPLv2
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
28 |
7. **[Review](https://happyaddons.com/elementor-review-widget-demo/)** - Showcase your user feedback, reviews and rating easily than ever using our review widget. Display user photo, texts and star ratings. Make them stand out using built in offsets and positioning features. [Check demo](https://happyaddons.com/elementor-review-widget-demo/)
|
29 |
8. **[Skill Bars](https://happyaddons.com/elementor-skill-bars-widget-demo/)** - An essential building block to showcase user skills, task percentage, required tools and other progressive information in different ways. Comes with incredible customizing options to suit your needs. [Check demo](https://happyaddons.com/elementor-skill-bars-widget-demo/)
|
30 |
9. **[Contact Form 7](https://happyaddons.com/elementor-contact-form-7-widget-demo/)** - This utility widget helps you to integrate existing forms built using CF7 plugin across your web pages without spending too much time. [Check demo](https://happyaddons.com/elementor-contact-form-7-widget-demo/)
|
31 |
+
10. **[ Caldera Forms](https://happyaddons.com/elementor-caldera-forms-widget-demo/)** - This widget can help you to display your caldera forms to display on your web pages designed with Elementor. [Check demo](https://happyaddons.com/elementor-caldera-forms-widget-demo/)
|
32 |
11. **[weForms](https://happyaddons.com/elementor-we-forms-widget-demo/)** - Designed forms using weForms plugin and looking for a way to display those on your Elementor powered pages? This is the answer for that. [Check demo](https://happyaddons.com/elementor-we-forms-widget-demo/)
|
33 |
12. **[Ninja Forms](https://happyaddons.com/elementor-ninja-form-widget-demo/)** - Use this widget to embed forms created using Ninja Forms to display seamlessly on your web pages. Various styling options will help you to look at them even better. [Check demo](https://happyaddons.com/elementor-ninja-form-widget-demo/)
|
34 |
+
13. **[WPForms](https://happyaddons.com/elementor-wpform-widget-demo/)** - Use this widget to embed forms created using WPForms to display seamlessly on your web pages. Various styling options will help you to look at them even better.
|
35 |
+
14. **[Dual Button](https://happyaddons.com/elementor-dual-button-widget-demo/)** - DualButton widget allows you to add two flexible and trendy action buttons in your sections, in different styles.
|
36 |
+
15. **Testimonial**
|
37 |
|
38 |
### Included Free Extensions
|
39 |
**Happy Effects**
|
91 |
|
92 |
== Changelog ==
|
93 |
|
94 |
+
= 1.1.1 =
|
95 |
+
|
96 |
+
* New: Testimonial Widget
|
97 |
+
* New: Floating Effects from -> to controller
|
98 |
+
* New: Hover animation effect in Card Widget image
|
99 |
+
* Update: Card Widget button default style
|
100 |
+
* Update: Dual Button Widget default style
|
101 |
+
* Fix: WP Forms style issue
|
102 |
+
* Fix: Card Widget editor mode JS error issue
|
103 |
+
* Fix: Dual Button Widget inline editing issue
|
104 |
+
|
105 |
+
= 1.1.0 =
|
106 |
+
|
107 |
+
* Fix: Minor issue fix
|
108 |
+
|
109 |
= 1.0.5 =
|
110 |
|
111 |
* New: Happy Effects (universal widget extension)
|
widgets/card/widget.php
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
*/
|
7 |
namespace Happy_Addons\Elementor\Widget;
|
8 |
|
|
|
9 |
use Elementor\Scheme_Typography;
|
10 |
use Elementor\Utils;
|
11 |
use Elementor\Control_Media;
|
@@ -31,15 +32,6 @@ class Card extends Base {
|
|
31 |
return __( 'Card', 'happy-elementor-addons' );
|
32 |
}
|
33 |
|
34 |
-
protected function get_presets() {
|
35 |
-
return [
|
36 |
-
'design-1' => __( 'Design 1', 'happy-elementor-addons' ),
|
37 |
-
'design-2' => __( 'Design 2', 'happy-elementor-addons' ),
|
38 |
-
'design-3' => __( 'Design 3', 'happy-elementor-addons' ),
|
39 |
-
'design-4' => __( 'Design 4', 'happy-elementor-addons' ),
|
40 |
-
];
|
41 |
-
}
|
42 |
-
|
43 |
/**
|
44 |
* Get widget icon.
|
45 |
*
|
@@ -468,9 +460,112 @@ class Card extends Base {
|
|
468 |
'box_shadow_position',
|
469 |
],
|
470 |
'selector' => '{{WRAPPER}} .ha-card-figure > img',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
471 |
]
|
472 |
);
|
473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
$this->end_controls_section();
|
475 |
|
476 |
$this->start_controls_section(
|
@@ -896,7 +991,7 @@ class Card extends Base {
|
|
896 |
|
897 |
protected function render() {
|
898 |
$settings = $this->get_settings_for_display();
|
899 |
-
|
900 |
$this->add_inline_editing_attributes( 'badge_text', 'none' );
|
901 |
$this->add_render_attribute(
|
902 |
'badge_text',
|
@@ -927,7 +1022,6 @@ class Card extends Base {
|
|
927 |
$this->add_render_attribute( 'image', 'src', $settings['image']['url'] );
|
928 |
$this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $settings['image'] ) );
|
929 |
$this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $settings['image'] ) );
|
930 |
-
$settings['hover_animation'] = 'disable-animation'; // hack to prevent image hover animation
|
931 |
?>
|
932 |
<figure class="ha-card-figure">
|
933 |
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image' ); ?>
|
@@ -1009,8 +1103,6 @@ class Card extends Base {
|
|
1009 |
view.addRenderAttribute( 'button', 'class', 'ha-btn' );
|
1010 |
view.addRenderAttribute( 'button', 'href', settings.button_link.url );
|
1011 |
|
1012 |
-
HappyHelloWorld();
|
1013 |
-
|
1014 |
if ( settings.image.url || settings.image.id ) {
|
1015 |
var image = {
|
1016 |
id: settings.image.id,
|
@@ -1022,7 +1114,7 @@ class Card extends Base {
|
|
1022 |
|
1023 |
var image_url = elementor.imagesManager.getImageUrl( image ); #>
|
1024 |
<figure class="ha-card-figure">
|
1025 |
-
<img src="{{ image_url }}">
|
1026 |
<# if (settings.badge_text) { #>
|
1027 |
<div {{{ view.getRenderAttributeString( 'badge_text' ) }}}>{{ settings.badge_text }}</div>
|
1028 |
<# } #>
|
6 |
*/
|
7 |
namespace Happy_Addons\Elementor\Widget;
|
8 |
|
9 |
+
use Elementor\Group_Control_Css_Filter;
|
10 |
use Elementor\Scheme_Typography;
|
11 |
use Elementor\Utils;
|
12 |
use Elementor\Control_Media;
|
32 |
return __( 'Card', 'happy-elementor-addons' );
|
33 |
}
|
34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
/**
|
36 |
* Get widget icon.
|
37 |
*
|
460 |
'box_shadow_position',
|
461 |
],
|
462 |
'selector' => '{{WRAPPER}} .ha-card-figure > img',
|
463 |
+
'separator' => 'after'
|
464 |
+
]
|
465 |
+
);
|
466 |
+
|
467 |
+
$this->start_controls_tabs(
|
468 |
+
'_tabs_image_effects',
|
469 |
+
[
|
470 |
+
'separator' => 'before'
|
471 |
+
]
|
472 |
+
);
|
473 |
+
|
474 |
+
$this->start_controls_tab(
|
475 |
+
'_tab_image_effects_normal',
|
476 |
+
[
|
477 |
+
'label' => __( 'Normal', 'happy-elementor-addons' ),
|
478 |
]
|
479 |
);
|
480 |
|
481 |
+
$this->add_control(
|
482 |
+
'image_opacity',
|
483 |
+
[
|
484 |
+
'label' => __( 'Opacity', 'happy-elementor-addons' ),
|
485 |
+
'type' => Controls_Manager::SLIDER,
|
486 |
+
'range' => [
|
487 |
+
'px' => [
|
488 |
+
'max' => 1,
|
489 |
+
'min' => 0.10,
|
490 |
+
'step' => 0.01,
|
491 |
+
],
|
492 |
+
],
|
493 |
+
'selectors' => [
|
494 |
+
'{{WRAPPER}} .ha-card-figure > img' => 'opacity: {{SIZE}};',
|
495 |
+
],
|
496 |
+
]
|
497 |
+
);
|
498 |
+
|
499 |
+
$this->add_group_control(
|
500 |
+
Group_Control_Css_Filter::get_type(),
|
501 |
+
[
|
502 |
+
'name' => 'image_css_filters',
|
503 |
+
'selector' => '{{WRAPPER}} .ha-card-figure > img',
|
504 |
+
]
|
505 |
+
);
|
506 |
+
|
507 |
+
$this->end_controls_tab();
|
508 |
+
|
509 |
+
$this->start_controls_tab( 'hover',
|
510 |
+
[
|
511 |
+
'label' => __( 'Hover', 'happy-elementor-addons' ),
|
512 |
+
]
|
513 |
+
);
|
514 |
+
|
515 |
+
$this->add_control(
|
516 |
+
'image_opacity_hover',
|
517 |
+
[
|
518 |
+
'label' => __( 'Opacity', 'happy-elementor-addons' ),
|
519 |
+
'type' => Controls_Manager::SLIDER,
|
520 |
+
'range' => [
|
521 |
+
'px' => [
|
522 |
+
'max' => 1,
|
523 |
+
'min' => 0.10,
|
524 |
+
'step' => 0.01,
|
525 |
+
],
|
526 |
+
],
|
527 |
+
'selectors' => [
|
528 |
+
'{{WRAPPER}} .ha-card-figure:hover > img' => 'opacity: {{SIZE}};',
|
529 |
+
],
|
530 |
+
]
|
531 |
+
);
|
532 |
+
|
533 |
+
$this->add_group_control(
|
534 |
+
Group_Control_Css_Filter::get_type(),
|
535 |
+
[
|
536 |
+
'name' => 'image_css_filters_hover',
|
537 |
+
'selector' => '{{WRAPPER}} .ha-card-figure:hover > img',
|
538 |
+
]
|
539 |
+
);
|
540 |
+
|
541 |
+
$this->add_control(
|
542 |
+
'image_background_hover_transition',
|
543 |
+
[
|
544 |
+
'label' => __( 'Transition Duration', 'happy-elementor-addons' ),
|
545 |
+
'type' => Controls_Manager::SLIDER,
|
546 |
+
'range' => [
|
547 |
+
'px' => [
|
548 |
+
'max' => 3,
|
549 |
+
'step' => 0.1,
|
550 |
+
],
|
551 |
+
],
|
552 |
+
'selectors' => [
|
553 |
+
'{{WRAPPER}} .ha-card-figure > img' => 'transition-duration: {{SIZE}}s',
|
554 |
+
],
|
555 |
+
]
|
556 |
+
);
|
557 |
+
|
558 |
+
$this->add_control(
|
559 |
+
'hover_animation',
|
560 |
+
[
|
561 |
+
'label' => __( 'Hover Animation', 'happy-elementor-addons' ),
|
562 |
+
'type' => Controls_Manager::HOVER_ANIMATION,
|
563 |
+
]
|
564 |
+
);
|
565 |
+
|
566 |
+
$this->end_controls_tab();
|
567 |
+
$this->end_controls_tabs();
|
568 |
+
|
569 |
$this->end_controls_section();
|
570 |
|
571 |
$this->start_controls_section(
|
991 |
|
992 |
protected function render() {
|
993 |
$settings = $this->get_settings_for_display();
|
994 |
+
$this->get_settings();
|
995 |
$this->add_inline_editing_attributes( 'badge_text', 'none' );
|
996 |
$this->add_render_attribute(
|
997 |
'badge_text',
|
1022 |
$this->add_render_attribute( 'image', 'src', $settings['image']['url'] );
|
1023 |
$this->add_render_attribute( 'image', 'alt', Control_Media::get_image_alt( $settings['image'] ) );
|
1024 |
$this->add_render_attribute( 'image', 'title', Control_Media::get_image_title( $settings['image'] ) );
|
|
|
1025 |
?>
|
1026 |
<figure class="ha-card-figure">
|
1027 |
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image' ); ?>
|
1103 |
view.addRenderAttribute( 'button', 'class', 'ha-btn' );
|
1104 |
view.addRenderAttribute( 'button', 'href', settings.button_link.url );
|
1105 |
|
|
|
|
|
1106 |
if ( settings.image.url || settings.image.id ) {
|
1107 |
var image = {
|
1108 |
id: settings.image.id,
|
1114 |
|
1115 |
var image_url = elementor.imagesManager.getImageUrl( image ); #>
|
1116 |
<figure class="ha-card-figure">
|
1117 |
+
<img class="elementor-animation-{{settings.hover_animation}}" src="{{ image_url }}">
|
1118 |
<# if (settings.badge_text) { #>
|
1119 |
<div {{{ view.getRenderAttributeString( 'badge_text' ) }}}>{{ settings.badge_text }}</div>
|
1120 |
<# } #>
|
widgets/dual-button/widget.php
CHANGED
@@ -750,13 +750,13 @@ class Dual_Button extends Base {
|
|
750 |
}
|
751 |
|
752 |
// Button connector
|
753 |
-
$this->add_render_attribute( '
|
754 |
if ( $settings['button_connector_type'] === 'icon' ) {
|
755 |
-
$this->add_render_attribute( '
|
756 |
$connector = sprintf( '<i class="%s"></i>', esc_attr( $settings['button_connector_icon'] ) );
|
757 |
} else {
|
758 |
-
$this->add_render_attribute( '
|
759 |
-
$this->add_inline_editing_attributes( '
|
760 |
$connector = esc_html( $settings['button_connector_text'] );
|
761 |
}
|
762 |
|
@@ -790,7 +790,7 @@ class Dual_Button extends Base {
|
|
790 |
<?php endif; ?>
|
791 |
</a>
|
792 |
<?php if ( $settings['button_connector_hide'] !== 'yes' ) : ?>
|
793 |
-
<span <?php echo $this->get_render_attribute_string( '
|
794 |
<?php endif; ?>
|
795 |
</div>
|
796 |
<div class="ha-dual-btn-wrapper">
|
750 |
}
|
751 |
|
752 |
// Button connector
|
753 |
+
$this->add_render_attribute( 'button_connector_text', 'class', 'ha-dual-btn-connector' );
|
754 |
if ( $settings['button_connector_type'] === 'icon' ) {
|
755 |
+
$this->add_render_attribute( 'button_connector_text', 'class', 'ha-dual-btn-connector--icon' );
|
756 |
$connector = sprintf( '<i class="%s"></i>', esc_attr( $settings['button_connector_icon'] ) );
|
757 |
} else {
|
758 |
+
$this->add_render_attribute( 'button_connector_text', 'class', 'ha-dual-btn-connector--text' );
|
759 |
+
$this->add_inline_editing_attributes( 'button_connector_text', 'none' );
|
760 |
$connector = esc_html( $settings['button_connector_text'] );
|
761 |
}
|
762 |
|
790 |
<?php endif; ?>
|
791 |
</a>
|
792 |
<?php if ( $settings['button_connector_hide'] !== 'yes' ) : ?>
|
793 |
+
<span <?php echo $this->get_render_attribute_string( 'button_connector_text' ); ?>><?php echo $connector; ?></span>
|
794 |
<?php endif; ?>
|
795 |
</div>
|
796 |
<div class="ha-dual-btn-wrapper">
|
widgets/testimonial/widget.php
ADDED
@@ -0,0 +1,465 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Testimonial widget class
|
4 |
+
*
|
5 |
+
* @package Happy_Addons
|
6 |
+
*/
|
7 |
+
namespace Happy_Addons\Elementor\Widget;
|
8 |
+
|
9 |
+
use Elementor\Controls_Manager;
|
10 |
+
use Elementor\Group_Control_Image_Size;
|
11 |
+
use Elementor\Group_Control_Border;
|
12 |
+
use Elementor\Group_Control_Box_Shadow;
|
13 |
+
use Elementor\Group_Control_Typography;
|
14 |
+
use Elementor\Control_Media;
|
15 |
+
use Elementor\Scheme_Typography;
|
16 |
+
use Elementor\Utils;
|
17 |
+
|
18 |
+
defined( 'ABSPATH' ) || die();
|
19 |
+
|
20 |
+
class Testimonial extends Base {
|
21 |
+
|
22 |
+
/**
|
23 |
+
* Get widget title.
|
24 |
+
*
|
25 |
+
* @since 1.0.0
|
26 |
+
* @access public
|
27 |
+
*
|
28 |
+
* @return string Widget title.
|
29 |
+
*/
|
30 |
+
public function get_title() {
|
31 |
+
return __( 'Testimonial', 'happy-elementor-addons' );
|
32 |
+
}
|
33 |
+
|
34 |
+
/**
|
35 |
+
* Get widget icon.
|
36 |
+
*
|
37 |
+
* @since 1.0.0
|
38 |
+
* @access public
|
39 |
+
*
|
40 |
+
* @return string Widget icon.
|
41 |
+
*/
|
42 |
+
public function get_icon() {
|
43 |
+
return 'hm hm-testimonial';
|
44 |
+
}
|
45 |
+
|
46 |
+
public function get_keywords() {
|
47 |
+
return [ 'testimonial', 'review', 'feedback' ];
|
48 |
+
}
|
49 |
+
|
50 |
+
protected function register_content_controls() {
|
51 |
+
$this->start_controls_section(
|
52 |
+
'_section_testimonial',
|
53 |
+
[
|
54 |
+
'label' => __( 'Testimonial', 'happy-elementor-addons' ),
|
55 |
+
'tab' => Controls_Manager::TAB_CONTENT,
|
56 |
+
]
|
57 |
+
);
|
58 |
+
|
59 |
+
$this->add_control(
|
60 |
+
'testimonial',
|
61 |
+
[
|
62 |
+
'label' => __( 'Testimonial', 'happy-elementor-addons' ),
|
63 |
+
'label_block' => true,
|
64 |
+
'type' => Controls_Manager::TEXTAREA,
|
65 |
+
'default' => __( 'Testimonial contents', 'happy-elementor-addons' ),
|
66 |
+
'placeholder' => __( 'Type testimonial', 'happy-elementor-addons' ),
|
67 |
+
]
|
68 |
+
);
|
69 |
+
|
70 |
+
$this->add_control(
|
71 |
+
'align',
|
72 |
+
[
|
73 |
+
'label' => __( 'Alignment', 'happy-elementor-addons' ),
|
74 |
+
'type' => Controls_Manager::CHOOSE,
|
75 |
+
'label_block' => false,
|
76 |
+
'options' => [
|
77 |
+
'left' => [
|
78 |
+
'title' => __( 'Left', 'happy-elementor-addons' ),
|
79 |
+
'icon' => 'eicon-h-align-left',
|
80 |
+
],
|
81 |
+
'center' => [
|
82 |
+
'title' => __( 'Center', 'happy-elementor-addons' ),
|
83 |
+
'icon' => 'eicon-h-align-center',
|
84 |
+
],
|
85 |
+
'right' => [
|
86 |
+
'title' => __( 'Right', 'happy-elementor-addons' ),
|
87 |
+
'icon' => 'eicon-h-align-right',
|
88 |
+
],
|
89 |
+
],
|
90 |
+
'toggle' => false,
|
91 |
+
'default' => 'left',
|
92 |
+
'prefix_class' => 'ha-testimonial--'
|
93 |
+
]
|
94 |
+
);
|
95 |
+
|
96 |
+
$this->add_control(
|
97 |
+
'_design',
|
98 |
+
[
|
99 |
+
'label' => __( 'Design', 'happy-elementor-addons' ),
|
100 |
+
'type' => Controls_Manager::SELECT,
|
101 |
+
'label_block' => false,
|
102 |
+
'options' => [
|
103 |
+
'basic' => __( 'Default', 'happy-elementor-addons' ),
|
104 |
+
'bubble' => __( 'Bubble', 'happy-elementor-addons' ),
|
105 |
+
],
|
106 |
+
'default' => 'basic',
|
107 |
+
'prefix_class' => 'ha-testimonial--'
|
108 |
+
]
|
109 |
+
);
|
110 |
+
|
111 |
+
$this->end_controls_section();
|
112 |
+
|
113 |
+
$this->start_controls_section(
|
114 |
+
'_section_reviewer',
|
115 |
+
[
|
116 |
+
'label' => __( 'Reviewer', 'happy-elementor-addons' ),
|
117 |
+
'tab' => Controls_Manager::TAB_CONTENT,
|
118 |
+
]
|
119 |
+
);
|
120 |
+
|
121 |
+
$this->add_control(
|
122 |
+
'image',
|
123 |
+
[
|
124 |
+
'label' => __( 'Image', 'happy-elementor-addons' ),
|
125 |
+
'type' => Controls_Manager::MEDIA,
|
126 |
+
'default' => [
|
127 |
+
'url' => Utils::get_placeholder_image_src(),
|
128 |
+
],
|
129 |
+
]
|
130 |
+
);
|
131 |
+
|
132 |
+
$this->add_group_control(
|
133 |
+
Group_Control_Image_Size::get_type(),
|
134 |
+
[
|
135 |
+
'name' => 'thumbnail',
|
136 |
+
'default' => 'full',
|
137 |
+
'exclude' => ['custom'],
|
138 |
+
'separator' => 'none',
|
139 |
+
]
|
140 |
+
);
|
141 |
+
|
142 |
+
$this->add_control(
|
143 |
+
'name',
|
144 |
+
[
|
145 |
+
'label' => __( 'Name', 'happy-elementor-addons' ),
|
146 |
+
'label_block' => true,
|
147 |
+
'type' => Controls_Manager::TEXT,
|
148 |
+
'default' => __( 'Happy', 'happy-elementor-addons' ),
|
149 |
+
'placeholder' => __( 'Type Reviewer Name', 'happy-elementor-addons' ),
|
150 |
+
]
|
151 |
+
);
|
152 |
+
|
153 |
+
$this->add_control(
|
154 |
+
'title',
|
155 |
+
[
|
156 |
+
'label' => __( 'Title', 'happy-elementor-addons' ),
|
157 |
+
'label_block' => true,
|
158 |
+
'type' => Controls_Manager::TEXT,
|
159 |
+
'default' => __( 'CMO, HappyAddons', 'happy-elementor-addons' ),
|
160 |
+
'placeholder' => __( 'Type reviewer title', 'happy-elementor-addons' ),
|
161 |
+
]
|
162 |
+
);
|
163 |
+
|
164 |
+
$this->end_controls_section();
|
165 |
+
}
|
166 |
+
|
167 |
+
protected function register_style_controls() {
|
168 |
+
$this->start_controls_section(
|
169 |
+
'_section_style_image',
|
170 |
+
[
|
171 |
+
'label' => __( 'Reviewer Image', 'happy-elementor-addons' ),
|
172 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
173 |
+
]
|
174 |
+
);
|
175 |
+
|
176 |
+
$this->add_responsive_control(
|
177 |
+
'image_width',
|
178 |
+
[
|
179 |
+
'label' => __( 'Width', 'happy-elementor-addons' ),
|
180 |
+
'type' => Controls_Manager::SLIDER,
|
181 |
+
'size_units' => [ 'px' ],
|
182 |
+
'range' => [
|
183 |
+
'px' => [
|
184 |
+
'min' => 65,
|
185 |
+
'max' => 200,
|
186 |
+
],
|
187 |
+
],
|
188 |
+
'selectors' => [
|
189 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-thumb' => 'width: {{SIZE}}{{UNIT}};',
|
190 |
+
'{{WRAPPER}}.ha-testimonial--left .ha-testimonial__content:after' => 'left: calc(({{SIZE}}{{UNIT}} / 2) - 13px);',
|
191 |
+
'{{WRAPPER}}.ha-testimonial--right .ha-testimonial__content:after' => 'right: calc(({{SIZE}}{{UNIT}} / 2) - 13px);',
|
192 |
+
],
|
193 |
+
]
|
194 |
+
);
|
195 |
+
|
196 |
+
$this->add_responsive_control(
|
197 |
+
'image_height',
|
198 |
+
[
|
199 |
+
'label' => __( 'Height', 'happy-elementor-addons' ),
|
200 |
+
'type' => Controls_Manager::SLIDER,
|
201 |
+
'size_units' => [ 'px' ],
|
202 |
+
'range' => [
|
203 |
+
'px' => [
|
204 |
+
'min' => 20,
|
205 |
+
'max' => 200,
|
206 |
+
],
|
207 |
+
],
|
208 |
+
'selectors' => [
|
209 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-thumb' => 'height: {{SIZE}}{{UNIT}};',
|
210 |
+
],
|
211 |
+
]
|
212 |
+
);
|
213 |
+
|
214 |
+
$this->add_responsive_control(
|
215 |
+
'image_spacing',
|
216 |
+
[
|
217 |
+
'label' => __( 'Spacing', 'happy-elementor-addons' ),
|
218 |
+
'type' => Controls_Manager::SLIDER,
|
219 |
+
'size_units' => ['px'],
|
220 |
+
'selectors' => [
|
221 |
+
'{{WRAPPER}}.ha-testimonial--left .ha-testimonial__reviewer-meta' => 'padding-left: {{SIZE}}{{UNIT}};',
|
222 |
+
'{{WRAPPER}}.ha-testimonial--right .ha-testimonial__reviewer-meta' => 'padding-right: {{SIZE}}{{UNIT}};',
|
223 |
+
'{{WRAPPER}}.ha-testimonial--center .ha-testimonial__reviewer-meta' => 'padding-top: {{SIZE}}{{UNIT}};',
|
224 |
+
],
|
225 |
+
]
|
226 |
+
);
|
227 |
+
|
228 |
+
$this->add_group_control(
|
229 |
+
Group_Control_Border::get_type(),
|
230 |
+
[
|
231 |
+
'name' => 'image_border',
|
232 |
+
'selector' => '{{WRAPPER}} .ha-testimonial__reviewer-thumb > img',
|
233 |
+
]
|
234 |
+
);
|
235 |
+
|
236 |
+
$this->add_responsive_control(
|
237 |
+
'image_border_radius',
|
238 |
+
[
|
239 |
+
'label' => __( 'Border Radius', 'happy-elementor-addons' ),
|
240 |
+
'type' => Controls_Manager::DIMENSIONS,
|
241 |
+
'size_units' => [ 'px', '%' ],
|
242 |
+
'selectors' => [
|
243 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-thumb > img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
244 |
+
],
|
245 |
+
]
|
246 |
+
);
|
247 |
+
|
248 |
+
$this->add_group_control(
|
249 |
+
Group_Control_Box_Shadow::get_type(),
|
250 |
+
[
|
251 |
+
'name' => 'image_box_shadow',
|
252 |
+
'selector' => '.ha-testimonial__reviewer-thumb > img',
|
253 |
+
]
|
254 |
+
);
|
255 |
+
|
256 |
+
$this->end_controls_section();
|
257 |
+
|
258 |
+
$this->start_controls_section(
|
259 |
+
'_section_style_reviewer',
|
260 |
+
[
|
261 |
+
'label' => __( 'Reviewer Text', 'happy-elementor-addons' ),
|
262 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
263 |
+
]
|
264 |
+
);
|
265 |
+
|
266 |
+
$this->add_control(
|
267 |
+
'_heading_name',
|
268 |
+
[
|
269 |
+
'label' => __( 'Name', 'happy-elementor-addons' ),
|
270 |
+
'type' => Controls_Manager::HEADING,
|
271 |
+
]
|
272 |
+
);
|
273 |
+
|
274 |
+
$this->add_control(
|
275 |
+
'name_color',
|
276 |
+
[
|
277 |
+
'label' => __( 'Text Color', 'happy-elementor-addons' ),
|
278 |
+
'type' => Controls_Manager::COLOR,
|
279 |
+
'selectors' => [
|
280 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-name' => 'color: {{VALUE}}',
|
281 |
+
],
|
282 |
+
]
|
283 |
+
);
|
284 |
+
|
285 |
+
$this->add_group_control(
|
286 |
+
Group_Control_Typography::get_type(),
|
287 |
+
[
|
288 |
+
'name' => 'name_typography',
|
289 |
+
'label' => __( 'Typography', 'happy-elementor-addons' ),
|
290 |
+
'selector' => '{{WRAPPER}} .ha-testimonial__reviewer-name',
|
291 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_2,
|
292 |
+
]
|
293 |
+
);
|
294 |
+
|
295 |
+
$this->add_responsive_control(
|
296 |
+
'name_spacing',
|
297 |
+
[
|
298 |
+
'label' => __( 'Bottom Spacing', 'happy-elementor-addons' ),
|
299 |
+
'type' => Controls_Manager::SLIDER,
|
300 |
+
'size_units' => ['px'],
|
301 |
+
'default' => [
|
302 |
+
'unit' => 'px',
|
303 |
+
'size' => 20,
|
304 |
+
],
|
305 |
+
'selectors' => [
|
306 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-name' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
307 |
+
],
|
308 |
+
]
|
309 |
+
);
|
310 |
+
|
311 |
+
$this->add_control(
|
312 |
+
'_heading_title',
|
313 |
+
[
|
314 |
+
'label' => __( 'Title', 'happy-elementor-addons' ),
|
315 |
+
'type' => Controls_Manager::HEADING,
|
316 |
+
'separator' => 'before',
|
317 |
+
]
|
318 |
+
);
|
319 |
+
|
320 |
+
$this->add_control(
|
321 |
+
'title_color',
|
322 |
+
[
|
323 |
+
'label' => __( 'Text Color', 'happy-elementor-addons' ),
|
324 |
+
'type' => Controls_Manager::COLOR,
|
325 |
+
'selectors' => [
|
326 |
+
'{{WRAPPER}} .ha-testimonial__reviewer-title' => 'color: {{VALUE}}',
|
327 |
+
],
|
328 |
+
]
|
329 |
+
);
|
330 |
+
|
331 |
+
$this->add_group_control(
|
332 |
+
Group_Control_Typography::get_type(),
|
333 |
+
[
|
334 |
+
'name' => 'title_typography',
|
335 |
+
'label' => __( 'Typography', 'happy-elementor-addons' ),
|
336 |
+
'selector' => '{{WRAPPER}} .ha-testimonial__reviewer-title',
|
337 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_3,
|
338 |
+
]
|
339 |
+
);
|
340 |
+
|
341 |
+
$this->end_controls_section();
|
342 |
+
|
343 |
+
$this->start_controls_section(
|
344 |
+
'_section_style_testimonial',
|
345 |
+
[
|
346 |
+
'label' => __( 'Testimonial', 'happy-elementor-addons' ),
|
347 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
348 |
+
]
|
349 |
+
);
|
350 |
+
|
351 |
+
$this->add_responsive_control(
|
352 |
+
'testimonial_padding',
|
353 |
+
[
|
354 |
+
'label' => __( 'Padding', 'happy-elementor-addons' ),
|
355 |
+
'type' => Controls_Manager::DIMENSIONS,
|
356 |
+
'size_units' => [ 'px', 'em', '%' ],
|
357 |
+
'selectors' => [
|
358 |
+
'{{WRAPPER}} .ha-testimonial__content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
359 |
+
],
|
360 |
+
]
|
361 |
+
);
|
362 |
+
|
363 |
+
$this->add_responsive_control(
|
364 |
+
'description_spacing',
|
365 |
+
[
|
366 |
+
'label' => __( 'Bottom Spacing', 'happy-elementor-addons' ),
|
367 |
+
'type' => Controls_Manager::SLIDER,
|
368 |
+
'size_units' => ['px'],
|
369 |
+
'default' => [
|
370 |
+
'unit' => 'px',
|
371 |
+
'size' => 20,
|
372 |
+
],
|
373 |
+
'selectors' => [
|
374 |
+
'{{WRAPPER}} .ha-testimonial__content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
375 |
+
],
|
376 |
+
]
|
377 |
+
);
|
378 |
+
|
379 |
+
$this->add_control(
|
380 |
+
'testimonial_color',
|
381 |
+
[
|
382 |
+
'label' => __( 'Text Color', 'happy-elementor-addons' ),
|
383 |
+
'type' => Controls_Manager::COLOR,
|
384 |
+
'selectors' => [
|
385 |
+
'{{WRAPPER}} .ha-testimonial__content' => 'color: {{VALUE}}',
|
386 |
+
],
|
387 |
+
]
|
388 |
+
);
|
389 |
+
|
390 |
+
$this->add_control(
|
391 |
+
'testimonial_bg_color',
|
392 |
+
[
|
393 |
+
'label' => __( 'Background Color', 'happy-elementor-addons' ),
|
394 |
+
'type' => Controls_Manager::COLOR,
|
395 |
+
'selectors' => [
|
396 |
+
'{{WRAPPER}} .ha-testimonial__content' => 'background-color: {{VALUE}};',
|
397 |
+
'{{WRAPPER}} .ha-testimonial__content:after' => 'color: {{VALUE}};',
|
398 |
+
],
|
399 |
+
]
|
400 |
+
);
|
401 |
+
|
402 |
+
$this->add_group_control(
|
403 |
+
Group_Control_Typography::get_type(),
|
404 |
+
[
|
405 |
+
'name' => 'testimonial_typography',
|
406 |
+
'label' => __( 'Typography', 'happy-elementor-addons' ),
|
407 |
+
'selector' => '{{WRAPPER}} .ha-testimonial__content',
|
408 |
+
'scheme' => Scheme_Typography::TYPOGRAPHY_3,
|
409 |
+
]
|
410 |
+
);
|
411 |
+
|
412 |
+
$this->add_responsive_control(
|
413 |
+
'testimonial_border_radius',
|
414 |
+
[
|
415 |
+
'label' => __( 'Border Radius', 'happy-elementor-addons' ),
|
416 |
+
'type' => Controls_Manager::DIMENSIONS,
|
417 |
+
'size_units' => [ 'px', '%' ],
|
418 |
+
'selectors' => [
|
419 |
+
'{{WRAPPER}} .ha-testimonial__content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
420 |
+
],
|
421 |
+
]
|
422 |
+
);
|
423 |
+
|
424 |
+
$this->add_group_control(
|
425 |
+
Group_Control_Box_Shadow::get_type(),
|
426 |
+
[
|
427 |
+
'name' => 'testimonial_box_shadow',
|
428 |
+
'selector' => '{{WRAPPER}} .ha-testimonial__content',
|
429 |
+
]
|
430 |
+
);
|
431 |
+
|
432 |
+
$this->end_controls_section();
|
433 |
+
}
|
434 |
+
|
435 |
+
protected function render() {
|
436 |
+
$settings = $this->get_settings_for_display();
|
437 |
+
|
438 |
+
$this->add_inline_editing_attributes( 'testimonial', 'basic' );
|
439 |
+
$this->add_render_attribute( 'testimonial', 'class', 'ha-testimonial__content' );
|
440 |
+
|
441 |
+
$this->add_inline_editing_attributes( 'name', 'none' );
|
442 |
+
$this->add_render_attribute( 'name', 'class', 'ha-testimonial__reviewer-name' );
|
443 |
+
|
444 |
+
$this->add_inline_editing_attributes( 'title', 'none' );
|
445 |
+
$this->add_render_attribute( 'title', 'class', 'ha-testimonial__reviewer-title' );
|
446 |
+
?>
|
447 |
+
|
448 |
+
<div <?php echo $this->get_render_attribute_string( 'testimonial' ); ?>>
|
449 |
+
<?php echo $settings['testimonial']; ?>
|
450 |
+
</div>
|
451 |
+
<div class="ha-testimonial__reviewer">
|
452 |
+
<?php if ( ! empty( $settings['image']['url'] ) ) : ?>
|
453 |
+
<div class="ha-testimonial__reviewer-thumb">
|
454 |
+
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'thumbnail', 'image' ); ?>
|
455 |
+
</div>
|
456 |
+
<?php endif; ?>
|
457 |
+
|
458 |
+
<div class="ha-testimonial__reviewer-meta">
|
459 |
+
<div <?php echo $this->get_render_attribute_string( 'name' ); ?>><?php echo $settings['name']; ?></div>
|
460 |
+
<div <?php echo $this->get_render_attribute_string( 'title' ); ?>><?php echo $settings['title']; ?></div>
|
461 |
+
</div>
|
462 |
+
</div>
|
463 |
+
<?php
|
464 |
+
}
|
465 |
+
}
|
widgets/wpform/widget.php
CHANGED
@@ -110,6 +110,7 @@ class WPForm extends Base {
|
|
110 |
'size_units' => [ 'px', 'em', '%' ],
|
111 |
'selectors' => [
|
112 |
'{{WRAPPER}} .wpforms-field input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
113 |
],
|
114 |
]
|
115 |
);
|
@@ -122,6 +123,7 @@ class WPForm extends Base {
|
|
122 |
'size_units' => [ 'px', '%' ],
|
123 |
'selectors' => [
|
124 |
'{{WRAPPER}} .wpforms-field input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
|
|
125 |
],
|
126 |
]
|
127 |
);
|
@@ -496,7 +498,7 @@ class WPForm extends Base {
|
|
496 |
Group_Control_Border::get_type(),
|
497 |
[
|
498 |
'name' => 'submit_border',
|
499 |
-
'selector' => '{{WRAPPER}} .wpforms-submit',
|
500 |
]
|
501 |
);
|
502 |
|
110 |
'size_units' => [ 'px', 'em', '%' ],
|
111 |
'selectors' => [
|
112 |
'{{WRAPPER}} .wpforms-field input' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
113 |
+
'{{WRAPPER}} .wpforms-field textarea' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
114 |
],
|
115 |
]
|
116 |
);
|
123 |
'size_units' => [ 'px', '%' ],
|
124 |
'selectors' => [
|
125 |
'{{WRAPPER}} .wpforms-field input' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
126 |
+
'{{WRAPPER}} .wpforms-field textarea' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
127 |
],
|
128 |
]
|
129 |
);
|
498 |
Group_Control_Border::get_type(),
|
499 |
[
|
500 |
'name' => 'submit_border',
|
501 |
+
'selector' => '{{WRAPPER}} .wpforms-form .wpforms-submit-container button[type=submit]',
|
502 |
]
|
503 |
);
|
504 |
|