Skip to content

Commit 196331d

Browse files
committed
Bug Fixes
1 parent 6170ed2 commit 196331d

File tree

11 files changed

+96
-48
lines changed

11 files changed

+96
-48
lines changed

assets/css/before-after.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.mighty-before-after {
2+
text-align: center;
3+
}
4+
15
.mighty-before-after img {
26
width: 100%;
37
}
@@ -34,7 +38,7 @@
3438

3539
.mighty-before-after.show-label-hover .inverted-overlay:hover .twentytwenty-before-label,
3640
.mighty-before-after.show-label-hover .inverted-overlay:hover .twentytwenty-after-label {
37-
opacity: 1;
41+
opacity: 0;
3842
}
3943

4044
/* Horizontal Label Alignment */
@@ -62,7 +66,6 @@
6266
.twentytwenty-vertical .label-v-center .twentytwenty-before-label:before,
6367
.twentytwenty-vertical .label-v-center .twentytwenty-after-label:before {
6468
left: 50%;
65-
transform: translateX(-50%);
6669
}
6770

6871
.twentytwenty-vertical .label-v-right .twentytwenty-before-label:before,
@@ -94,4 +97,21 @@
9497
color: white;
9598
vertical-align: -webkit-baseline-middle;
9699
padding: 0 5px;
97-
}
100+
}
101+
102+
.mighty-before-after .twentytwenty-vertical .mighty-before-after .twentytwenty-handle {
103+
display: flex;
104+
border-color: #fff;
105+
flex-direction: column;
106+
justify-content: space-evenly;
107+
}
108+
109+
.mighty-before-after .twentytwenty-vertical .mighty-before-after .twentytwenty-handle i {
110+
transform: rotate(90deg);
111+
}
112+
113+
.mighty-before-after .twentytwenty-handle:before,
114+
.mighty-before-after .twentytwenty-handle:after {
115+
background: #fff;
116+
box-shadow: 0 3px 0 #fff, 0px 0px 12px rgba(51, 51, 51, 0.5);
117+
}

assets/css/counter.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,4 @@
1818

1919
.mighty-counter .mtcounter-content .counter-title {
2020
font-size: 22px;
21-
/* line-height: 0.2em; */
2221
}

assets/css/flip-box.css

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/progressbar.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949

5050
.mighty-progressbar .progressbar-percentage {
5151
float: right;
52+
margin-left: auto;
5253
}
5354

54-
.progressbar-title {
55-
margin: 0 5px;
56-
}
57-
58-
.progressbar-percentage {
55+
.mighty-progressbar .progressbar-details .progressbar-title,
56+
.mighty-progressbar .progressbar-details .progressbar-percentage {
5957
margin: 0 5px;
60-
margin-left: auto;
58+
line-height: 2;
59+
font-weight: 400;
60+
font-size: 2.1rem;
6161
}
6262

6363
.mighty-progressbar .progress-bar .progressbar {

assets/css/team.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
.mighty-team .social-icons-wrapper {
2727
list-style: none;
2828
padding: 0;
29-
margin-top: 5px;
29+
margin: 5px 0 0 0;
3030
}
3131

3232
.mighty-team .social-icons-wrapper li {

widgets/before-after.php

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,6 @@ protected function _register_controls() {
6565
]
6666
);
6767

68-
$this->add_control(
69-
'before_alt_text',
70-
[
71-
'label' => __( 'Alt Text', 'mighty' ),
72-
'type' => \Elementor\Controls_Manager::TEXT,
73-
'default' => __( 'Before', 'mighty' ),
74-
'placeholder' => __( 'Type your title here', 'mighty' ),
75-
]
76-
);
77-
7868
$this->add_group_control(
7969
Group_Control_Image_Size::get_type(),
8070
[
@@ -115,16 +105,6 @@ protected function _register_controls() {
115105
]
116106
);
117107

118-
$this->add_control(
119-
'after_alt_text',
120-
[
121-
'label' => __( 'Alt Text', 'mighty' ),
122-
'type' => \Elementor\Controls_Manager::TEXT,
123-
'default' => __( 'After', 'mighty' ),
124-
'placeholder' => __( 'Type your title here', 'mighty' ),
125-
]
126-
);
127-
128108
$this->add_group_control(
129109
Group_Control_Image_Size::get_type(),
130110
[
@@ -276,10 +256,12 @@ protected function _register_controls() {
276256
'type' => \Elementor\Scheme_Color::get_type(),
277257
'value' => \Elementor\Scheme_Color::COLOR_1,
278258
],
259+
'default' => '#fff',
279260
'selectors' => [
280261
'{{WRAPPER}} .mighty-before-after .twentytwenty-handle' => 'border-color: {{VALUE}}',
281262
'{{WRAPPER}} .mighty-before-after .twentytwenty-handle:before' => 'background: {{VALUE}}; box-shadow: 0 3px 0 {{VALUE}}, 0px 0px 12px rgba(51, 51, 51, 0.5);',
282263
'{{WRAPPER}} .mighty-before-after .twentytwenty-handle:after' => 'background: {{VALUE}}; box-shadow: 0 3px 0 {{VALUE}}, 0px 0px 12px rgba(51, 51, 51, 0.5);',
264+
'{{WRAPPER}} .mighty-before-after .twentytwenty-handle i' => 'color: {{VALUE}};',
283265
],
284266
]
285267
);
@@ -489,15 +471,26 @@ protected function render() {
489471
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'before_image_size', 'before_image' ); ?>
490472
<?php echo Group_Control_Image_Size::get_attachment_image_html( $settings, 'after_image_size', 'after_image' ); ?>
491473

492-
<?php if ( $settings['enable_overlay'] == false) { ?>
474+
<?php if ( $settings['enable_overlay'] == false ) { ?>
493475
<div class="inverted-overlay">
494476
<div class="twentytwenty-before-label" data-content="Before"></div>
495477
<div class="twentytwenty-after-label" data-content="After"></div>
496-
</div
478+
</div>
497479
<?php } ?>
498480

499481
</div>
500-
<?php
482+
483+
<?php if ( $settings['enable_overlay'] == false ) { ?>
484+
<style>
485+
.elementor-widget-mt-before-after .mighty-before-after .twentytwenty-overlay:hover {
486+
background: transparent !important;
487+
}
488+
489+
.elementor-widget-mt-before-after .mighty-before-after .inverted-overlay:hover {
490+
background: transparent !important;
491+
}
492+
</style>
493+
<?php }
501494
}
502495

503496
protected function _content_template() {

widgets/buttongroup.php

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -362,16 +362,9 @@ protected function _register_controls() {
362362
'range' => [
363363
'px' => [
364364
'min' => 0,
365-
'max' => 50,
365+
'max' => 100,
366366
],
367367
],
368-
'default' => [
369-
'unit' => 'px',
370-
'size' => 10,
371-
],
372-
'selectors' => [
373-
'{{WRAPPER}} .mighty-buttongroup .mt-button:not(:last-child)' => 'margin-right: {{SIZE}}{{UNIT}}',
374-
],
375368
]
376369
);
377370

@@ -445,8 +438,46 @@ protected function render() {
445438
endforeach;
446439

447440
echo '</div>'; // .mighty-buttongroup
441+
?>
442+
443+
444+
<?php
448445

446+
$margin = $settings['space_between_buttons']['size'] ? $settings['space_between_buttons']['size'] : '10';
447+
$margin .= $settings['space_between_buttons']['unit'];
448+
$stacking = strip_tags($settings['buttongroup_stack_on']);
449+
450+
if( strcmp("stack-on-desktop", $stacking) == 0 ) { ?>
451+
<style>
452+
.mighty-buttongroup .mt-button:not(:last-child) {
453+
margin-bottom: <?php echo $margin; ?>;
454+
}
455+
</style>
456+
<?php } elseif( strcmp("stack-on-tablet", $stacking) == 0 ) { ?>
457+
<style>
458+
@media only screen and (max-width: 991px) {
459+
.mighty-buttongroup .mt-button:not(:last-child) {
460+
margin-bottom: <?php echo $margin; ?>;
461+
}
462+
}
463+
</style>
464+
<?php } elseif( strcmp("stack-on-mobile", $stacking) == 0 ) { ?>
465+
<style>
466+
@media only screen and (max-width: 767px) {
467+
.mighty-buttongroup .mt-button:not(:last-child) {
468+
margin-bottom: <?php echo $margin; ?>;
469+
}
470+
}
471+
</style>
472+
<?php } elseif( strcmp($stacking, "none") == 0 ) { ?>
473+
<style>
474+
.mighty-buttongroup .mt-button:not(:last-child) {
475+
margin-right: <?php echo $margin; ?>;
476+
}
477+
</style>
478+
<?php } ?>
449479

480+
<?php
450481
}
451482

452483
protected function _content_template() {

widgets/counter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ protected function _register_controls() {
365365
protected function render() {
366366
$settings = $this->get_settings_for_display();
367367

368-
$counter = '<div class="counter"> ' .
368+
$counter = '<div class="counter"> ' .
369369
( !empty($settings['number_prefix']) ? '<span class="count-prefix">'. $settings['number_prefix'] .'</span>' : '') .
370370

371371
'<span class="count" data-num-separator="'. $settings['number_separator'] .'" data-start-number="'. $settings['starting_number'] .'" data-end-number="'. $settings['ending_number'] .'" data-animation="'. $settings['mtanimation_duration'] .'">'. $settings['ending_number'] .'</span>' .
@@ -389,7 +389,7 @@ protected function render() {
389389
echo $counter;
390390
}
391391

392-
echo '<h2 class="counter-title">'. $settings['counter_title'] .'</h2>';
392+
echo '<div class="counter-title">'. $settings['counter_title'] .'</div>';
393393

394394
// For counter position below title
395395
if ( 'below' === $settings['counter_position'] ) {

widgets/flip-box.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ protected function _register_controls() {
203203
'label' => __( 'Description', 'mighty' ),
204204
'type' => Controls_Manager::WYSIWYG,
205205
'placeholder' => __( 'Type your description here', 'mighty' ),
206-
'default' => __( 'A sacred food gifted to mankind by the gods. <br>Very delicious and cheesy with tomato sauce and toppings of your choice. Commonly consumed recreationally or at parties.', 'mighty'),
206+
'default' => __( 'A sacred food gifted to mankind by the gods. <br>Very delicious and cheesy with tomato sauce and toppings of your choice.', 'mighty'),
207207
]
208208
);
209209

@@ -299,7 +299,7 @@ protected function _register_controls() {
299299
],
300300
'default' => [
301301
'unit' => 'px',
302-
'size' => 200,
302+
'size' => 250,
303303
],
304304
'selectors' => [
305305
'{{WRAPPER}} .mt-flipbox-card' => 'height: {{SIZE}}{{UNIT}};',

widgets/progressbar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ protected function _register_controls() {
223223
],
224224
'default' => [
225225
'unit' => 'px',
226-
'size' => 10,
226+
'size' => 11,
227227
],
228228
'selectors' => [
229229
'{{WRAPPER}} .mighty-progressbar .progress-bar:not(:last-child)' => 'margin-bottom: {{SIZE}}{{UNIT}}',

0 commit comments

Comments
 (0)