Version Description
- Fix: Card widget responsive issue
- Fix: Review widget responsive 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.0.4 |
Comparing to | |
See all releases |
Code changes from version 1.0.3 to 1.0.4
- assets/admin/js/happy-addons.js +0 -28
- assets/admin/js/happy-addons.min.js +1 -1
- assets/js/happy-addons.js +0 -1
- base.php +2 -2
- classes/asset-manager.php +3 -3
- plugin.php +1 -1
- readme.txt +9 -2
- widgets/card/widget.php +19 -28
- widgets/review/widget.php +9 -27
assets/admin/js/happy-addons.js
CHANGED
@@ -9,32 +9,4 @@
|
|
9 |
.addClass('happy-addons-addon');
|
10 |
}, 100));
|
11 |
});
|
12 |
-
|
13 |
-
elementor.hooks.addAction( 'panel/open_editor/widget', function( panel, model, view ) {
|
14 |
-
if (model.get('widgetType').indexOf('ha-') === -1) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
var controller = panel.currentPageView.$childViewContainer.find('[data-setting="_preset"]');
|
18 |
-
controller.on('change.haPresetChange', function(e) {
|
19 |
-
e.stopPropagation();
|
20 |
-
|
21 |
-
view.copy();
|
22 |
-
|
23 |
-
var d = elementorCommon.storage.get('transfer');
|
24 |
-
|
25 |
-
console.log(d);
|
26 |
-
// $.get(
|
27 |
-
// happy.ajax_url,
|
28 |
-
// {
|
29 |
-
// 'action': 'ha_get_preset',
|
30 |
-
// 'name': $(this).val(),
|
31 |
-
// 'widget': model.get('widgetType'),
|
32 |
-
// 'nonce': happy.nonce
|
33 |
-
// }
|
34 |
-
// ).done(function(res) {
|
35 |
-
// console.log(res);
|
36 |
-
// model.setSetting(JSON.parse(res.data));
|
37 |
-
// });
|
38 |
-
});
|
39 |
-
} );
|
40 |
}(jQuery, window.elementor));
|
9 |
.addClass('happy-addons-addon');
|
10 |
}, 100));
|
11 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}(jQuery, window.elementor));
|
assets/admin/js/happy-addons.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e,n){"use strict";n.on("panel:init",function(){e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("happy-addons-addon")},100))})
|
1 |
+
!function(e,n){"use strict";n.on("panel:init",function(){e("#elementor-panel-elements-search-input").on("keyup",_.debounce(function(){e("#elementor-panel-elements").find(".hm").parents(".elementor-element").addClass("happy-addons-addon")},100))})}(jQuery,window.elementor);
|
assets/js/happy-addons.js
CHANGED
@@ -136,5 +136,4 @@ window.Happy = window.Happy || {};
|
|
136 |
}
|
137 |
);
|
138 |
});
|
139 |
-
|
140 |
} (jQuery, Happy));
|
136 |
}
|
137 |
);
|
138 |
});
|
|
|
139 |
} (jQuery, Happy));
|
base.php
CHANGED
@@ -10,9 +10,9 @@ defined( 'ABSPATH' ) || die();
|
|
10 |
|
11 |
class Base {
|
12 |
|
13 |
-
const VERSION = '1.0.
|
14 |
|
15 |
-
const MINIMUM_ELEMENTOR_VERSION = '2.
|
16 |
|
17 |
const MINIMUM_PHP_VERSION = '5.4';
|
18 |
|
10 |
|
11 |
class Base {
|
12 |
|
13 |
+
const VERSION = '1.0.4';
|
14 |
|
15 |
+
const MINIMUM_ELEMENTOR_VERSION = '2.5.0';
|
16 |
|
17 |
const MINIMUM_PHP_VERSION = '5.4';
|
18 |
|
classes/asset-manager.php
CHANGED
@@ -117,7 +117,7 @@ class Asset_Manager {
|
|
117 |
}
|
118 |
|
119 |
public function enqueue_preview_style() {
|
120 |
-
if
|
121 |
wp_enqueue_style(
|
122 |
'happy-elementor-weform-preview',
|
123 |
plugins_url( '/weforms/assets/wpuf/css/frontend-forms.css', 'weforms' ),
|
@@ -125,7 +125,7 @@ class Asset_Manager {
|
|
125 |
Base::VERSION
|
126 |
);
|
127 |
}
|
128 |
-
if
|
129 |
wp_enqueue_style(
|
130 |
'happy-elementor-wpform-preview',
|
131 |
plugins_url( '/wpforms-lite/assets/css/wpforms-full.css', 'wpforms-lite' ),
|
@@ -133,7 +133,7 @@ class Asset_Manager {
|
|
133 |
Base::VERSION
|
134 |
);
|
135 |
}
|
136 |
-
if
|
137 |
wp_enqueue_style(
|
138 |
'happy-elementor-caldera-preview',
|
139 |
plugins_url( '/caldera-forms/assets/css/caldera-forms-front.css', 'caldera-forms' ),
|
117 |
}
|
118 |
|
119 |
public function enqueue_preview_style() {
|
120 |
+
if( class_exists( 'WeForms' ) ) {
|
121 |
wp_enqueue_style(
|
122 |
'happy-elementor-weform-preview',
|
123 |
plugins_url( '/weforms/assets/wpuf/css/frontend-forms.css', 'weforms' ),
|
125 |
Base::VERSION
|
126 |
);
|
127 |
}
|
128 |
+
if( class_exists( 'WPForms_Lite' ) ) {
|
129 |
wp_enqueue_style(
|
130 |
'happy-elementor-wpform-preview',
|
131 |
plugins_url( '/wpforms-lite/assets/css/wpforms-full.css', 'wpforms-lite' ),
|
133 |
Base::VERSION
|
134 |
);
|
135 |
}
|
136 |
+
if( class_exists( 'Caldera_Forms' ) ) {
|
137 |
wp_enqueue_style(
|
138 |
'happy-elementor-caldera-preview',
|
139 |
plugins_url( '/caldera-forms/assets/css/caldera-forms-front.css', 'caldera-forms' ),
|
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.0.
|
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.0.4
|
7 |
* Author: HappyMonster
|
8 |
* Author URI: https://happymonster.me/
|
9 |
* License: GPLv2
|
readme.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
=== Happy Elementor Addons ===
|
2 |
Plugin Name: Happy Elementor Addons
|
3 |
-
Version: 1.0.
|
4 |
Author: HappyMonster
|
5 |
Author URI: http://happymonster.me/
|
6 |
Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
|
@@ -8,7 +8,7 @@ Tags: elementor, form, page builder, widget, addon
|
|
8 |
Requires at least: 4.5
|
9 |
Tested up to: 5.2.2
|
10 |
Requires PHP: 5.4
|
11 |
-
Stable tag: 1.0.
|
12 |
License: GPLv2
|
13 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
@@ -18,6 +18,8 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
|
18 |
|
19 |
[HappyAddons](https://happyaddons.com/) 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. [HappyAddons](https://happyaddons.com/) is free, rapidly growing and comes with great support.
|
20 |
|
|
|
|
|
21 |
### Included Free Widgets
|
22 |
|
23 |
1. **[Card](https://happyaddons.com/elementor-card-widget-demo/)** - Incredibly powerful widget to demonstrate your products, articles, news, creative posts using a beautiful combination of texts, links, badge and image. Using built in positioning and offset feature you can create eye-candy designs in a twist. [Check demo](https://happyaddons.com/elementor-card-widget-demo/)
|
@@ -64,6 +66,11 @@ It's really easy and super simple to install **Happy Elementor Addons** plugin b
|
|
64 |
|
65 |
== Changelog ==
|
66 |
|
|
|
|
|
|
|
|
|
|
|
67 |
= 1.0.3 =
|
68 |
|
69 |
* Update: Offset settings
|
1 |
=== Happy Elementor Addons ===
|
2 |
Plugin Name: Happy Elementor Addons
|
3 |
+
Version: 1.0.4
|
4 |
Author: HappyMonster
|
5 |
Author URI: http://happymonster.me/
|
6 |
Contributors: thehappymonster, happyaddons, hasinhayder, obiplabon, sourav926
|
8 |
Requires at least: 4.5
|
9 |
Tested up to: 5.2.2
|
10 |
Requires PHP: 5.4
|
11 |
+
Stable tag: 1.0.4
|
12 |
License: GPLv2
|
13 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
14 |
|
18 |
|
19 |
[HappyAddons](https://happyaddons.com/) 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. [HappyAddons](https://happyaddons.com/) is free, rapidly growing and comes with great support.
|
20 |
|
21 |
+
**[Get Support](https://happyaddons.com/happy-support/)** | **[Report an Issue](https://github.com/project-mmxix/happyaddons-issues/issues)**
|
22 |
+
|
23 |
### Included Free Widgets
|
24 |
|
25 |
1. **[Card](https://happyaddons.com/elementor-card-widget-demo/)** - Incredibly powerful widget to demonstrate your products, articles, news, creative posts using a beautiful combination of texts, links, badge and image. Using built in positioning and offset feature you can create eye-candy designs in a twist. [Check demo](https://happyaddons.com/elementor-card-widget-demo/)
|
66 |
|
67 |
== Changelog ==
|
68 |
|
69 |
+
= 1.0.4 =
|
70 |
+
|
71 |
+
* Fix: Card widget responsive issue
|
72 |
+
* Fix: Review widget responsive issue
|
73 |
+
|
74 |
= 1.0.3 =
|
75 |
|
76 |
* Update: Offset settings
|
widgets/card/widget.php
CHANGED
@@ -316,7 +316,16 @@ class Card extends Base {
|
|
316 |
[
|
317 |
'label' => __( 'Width', 'happy_addons' ),
|
318 |
'type' => Controls_Manager::SLIDER,
|
319 |
-
'size_units' => [ '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
'range' => [
|
321 |
'%' => [
|
322 |
'min' => 1,
|
@@ -329,7 +338,7 @@ class Card extends Base {
|
|
329 |
],
|
330 |
'selectors' => [
|
331 |
'{{WRAPPER}} .ha-card-figure' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
332 |
-
'{{WRAPPER}}.ha-card--right .ha-card-body, {{WRAPPER}}.ha-card--left .ha-card-body' => 'flex: 0 0 calc(100% - {{SIZE}}{{UNIT}}); max-width: calc(100% - {{SIZE}}{{UNIT}});',
|
333 |
],
|
334 |
]
|
335 |
);
|
@@ -400,38 +409,20 @@ class Card extends Base {
|
|
400 |
],
|
401 |
],
|
402 |
'selectors' => [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
403 |
// Image translate styles
|
404 |
'(desktop){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
|
405 |
'(tablet){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
|
406 |
'(mobile){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
|
407 |
// Card body styles
|
408 |
'{{WRAPPER}}.ha-card--top .ha-card-body' => 'margin-top: {{SIZE}}{{UNIT}};',
|
409 |
-
// Left image position styles
|
410 |
-
'(desktop){{WRAPPER}}.ha-card--left .ha-card-body' =>
|
411 |
-
'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}};'
|
412 |
-
. 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));'
|
413 |
-
. 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
|
414 |
-
'(tablet){{WRAPPER}}.ha-card--left .ha-card-body' =>
|
415 |
-
'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}};'
|
416 |
-
. 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));'
|
417 |
-
. 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
|
418 |
-
'(mobile){{WRAPPER}}.ha-card--left .ha-card-body' =>
|
419 |
-
'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}};'
|
420 |
-
. 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));'
|
421 |
-
. 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
|
422 |
-
// Image right position styles
|
423 |
-
'(desktop){{WRAPPER}}.ha-card--right .ha-card-body' =>
|
424 |
-
'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}});'
|
425 |
-
. 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});'
|
426 |
-
. 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
|
427 |
-
'(tablet){{WRAPPER}}.ha-card--right .ha-card-body' =>
|
428 |
-
'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
|
429 |
-
. 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
|
430 |
-
. 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
|
431 |
-
'(mobile){{WRAPPER}}.ha-card--right .ha-card-body' =>
|
432 |
-
'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
|
433 |
-
. 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
|
434 |
-
. 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
|
435 |
],
|
436 |
]
|
437 |
);
|
316 |
[
|
317 |
'label' => __( 'Width', 'happy_addons' ),
|
318 |
'type' => Controls_Manager::SLIDER,
|
319 |
+
'size_units' => [ '%', 'px' ],
|
320 |
+
'desktop_default' => [
|
321 |
+
'unit' => '%',
|
322 |
+
],
|
323 |
+
'tablet_default' => [
|
324 |
+
'unit' => '%',
|
325 |
+
],
|
326 |
+
'mobile_default' => [
|
327 |
+
'unit' => '%',
|
328 |
+
],
|
329 |
'range' => [
|
330 |
'%' => [
|
331 |
'min' => 1,
|
338 |
],
|
339 |
'selectors' => [
|
340 |
'{{WRAPPER}} .ha-card-figure' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
341 |
+
'{{WRAPPER}}.ha-card--right .ha-card-body, {{WRAPPER}}.ha-card--left .ha-card-body' => 'flex: 0 0 calc(100% - {{SIZE || 50}}{{UNIT}}); max-width: calc(100% - {{SIZE || 50}}{{UNIT}});',
|
342 |
],
|
343 |
]
|
344 |
);
|
409 |
],
|
410 |
],
|
411 |
'selectors' => [
|
412 |
+
// Left image position styles
|
413 |
+
'(desktop){{WRAPPER}}.ha-card--left .ha-card-body' => 'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width.SIZE || 50}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width.SIZE || 50}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
|
414 |
+
'(tablet){{WRAPPER}}.ha-card--left .ha-card-body' => 'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width_tablet.SIZE || 50}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width_tablet.SIZE || 50}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
|
415 |
+
'(mobile){{WRAPPER}}.ha-card--left .ha-card-body' => 'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width_mobile.SIZE || 50}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width_mobile.SIZE || 50}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
|
416 |
+
// Image right position styles
|
417 |
+
'(desktop){{WRAPPER}}.ha-card--right .ha-card-body' => 'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width.SIZE || 50}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width.SIZE || 50}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
|
418 |
+
'(tablet){{WRAPPER}}.ha-card--right .ha-card-body' => 'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width_tablet.SIZE || 50}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width_tablet.SIZE || 50}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
|
419 |
+
'(mobile){{WRAPPER}}.ha-card--right .ha-card-body' => 'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width_mobile.SIZE || 50}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width_mobile.SIZE || 50}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
|
420 |
// Image translate styles
|
421 |
'(desktop){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
|
422 |
'(tablet){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
|
423 |
'(mobile){{WRAPPER}} .ha-card-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
|
424 |
// Card body styles
|
425 |
'{{WRAPPER}}.ha-card--top .ha-card-body' => 'margin-top: {{SIZE}}{{UNIT}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
426 |
],
|
427 |
]
|
428 |
);
|
widgets/review/widget.php
CHANGED
@@ -293,7 +293,7 @@ class Review extends Base {
|
|
293 |
],
|
294 |
'selectors' => [
|
295 |
'{{WRAPPER}} .ha-review-figure' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
296 |
-
'{{WRAPPER}}.ha-review--right .ha-review-body, {{WRAPPER}}.ha-review--left .ha-review-body' => 'flex: 0 0 calc(100% - {{SIZE}}{{UNIT}}); max-width: calc(100% - {{SIZE}}{{UNIT}});',
|
297 |
],
|
298 |
]
|
299 |
);
|
@@ -364,38 +364,20 @@ class Review extends Base {
|
|
364 |
],
|
365 |
],
|
366 |
'selectors' => [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
// Image translate styles
|
368 |
'(desktop){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
|
369 |
'(tablet){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
|
370 |
'(mobile){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
|
371 |
// Review body styles
|
372 |
'{{WRAPPER}}.ha-review--top .ha-review-body' => 'margin-top: {{SIZE}}{{UNIT}};',
|
373 |
-
// Left image position styles
|
374 |
-
'(desktop){{WRAPPER}}.ha-review--left .ha-review-body' =>
|
375 |
-
'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}};'
|
376 |
-
. 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));'
|
377 |
-
. 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
|
378 |
-
'(tablet){{WRAPPER}}.ha-review--left .ha-review-body' =>
|
379 |
-
'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}};'
|
380 |
-
. 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));'
|
381 |
-
. 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
|
382 |
-
'(mobile){{WRAPPER}}.ha-review--left .ha-review-body' =>
|
383 |
-
'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}};'
|
384 |
-
. 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));'
|
385 |
-
. 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
|
386 |
-
// Image right position styles
|
387 |
-
'(desktop){{WRAPPER}}.ha-review--right .ha-review-body' =>
|
388 |
-
'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}});'
|
389 |
-
. 'flex: 0 0 calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});'
|
390 |
-
. 'max-width: calc((100% - {{image_width.SIZE}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
|
391 |
-
'(tablet){{WRAPPER}}.ha-review--right .ha-review-body' =>
|
392 |
-
'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
|
393 |
-
. 'flex: 0 0 calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});'
|
394 |
-
. 'max-width: calc((100% - {{image_width_tablet.SIZE}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
|
395 |
-
'(mobile){{WRAPPER}}.ha-review--right .ha-review-body' =>
|
396 |
-
'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
|
397 |
-
. 'flex: 0 0 calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});'
|
398 |
-
. 'max-width: calc((100% - {{image_width_mobile.SIZE}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
|
399 |
],
|
400 |
]
|
401 |
);
|
293 |
],
|
294 |
'selectors' => [
|
295 |
'{{WRAPPER}} .ha-review-figure' => 'flex: 0 0 {{SIZE}}{{UNIT}}; max-width: {{SIZE}}{{UNIT}};',
|
296 |
+
'{{WRAPPER}}.ha-review--right .ha-review-body, {{WRAPPER}}.ha-review--left .ha-review-body' => 'flex: 0 0 calc(100% - {{SIZE || 150}}{{UNIT}}); max-width: calc(100% - {{SIZE || 150}}{{UNIT}});',
|
297 |
],
|
298 |
]
|
299 |
);
|
364 |
],
|
365 |
],
|
366 |
'selectors' => [
|
367 |
+
// Left image position styles
|
368 |
+
'(desktop){{WRAPPER}}.ha-review--left .ha-review-body' => 'margin-left: {{image_offset_x.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width.SIZE || 150}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width.SIZE || 150}}{{image_width.UNIT}}) + (-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}));',
|
369 |
+
'(tablet){{WRAPPER}}.ha-review--left .ha-review-body' => 'margin-left: {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width_tablet.SIZE || 150}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width_tablet.SIZE || 150}}{{image_width_tablet.UNIT}}) + (-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}));',
|
370 |
+
'(mobile){{WRAPPER}}.ha-review--left .ha-review-body' => 'margin-left: {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}; flex: 0 0 calc((100% - {{image_width_mobile.SIZE || 150}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}})); max-width: calc((100% - {{image_width_mobile.SIZE || 150}}{{image_width_mobile.UNIT}}) + (-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}));',
|
371 |
+
// Image right position styles
|
372 |
+
'(desktop){{WRAPPER}}.ha-review--right .ha-review-body' => 'margin-right: calc(-1 * {{image_offset_x.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width.SIZE || 150}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width.SIZE || 150}}{{image_width.UNIT}}) + {{image_offset_x.SIZE || 0}}{{UNIT}});',
|
373 |
+
'(tablet){{WRAPPER}}.ha-review--right .ha-review-body' => 'margin-right: calc(-1 * {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width_tablet.SIZE || 150}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width_tablet.SIZE || 150}}{{image_width_tablet.UNIT}}) + {{image_offset_x_tablet.SIZE || 0}}{{UNIT}});',
|
374 |
+
'(mobile){{WRAPPER}}.ha-review--right .ha-review-body' => 'margin-right: calc(-1 * {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}); flex: 0 0 calc((100% - {{image_width_mobile.SIZE || 150}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}}); max-width: calc((100% - {{image_width_mobile.SIZE || 150}}{{image_width_mobile.UNIT}}) + {{image_offset_x_mobile.SIZE || 0}}{{UNIT}});',
|
375 |
// Image translate styles
|
376 |
'(desktop){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x.SIZE || 0}}{{UNIT}}, {{image_offset_y.SIZE || 0}}{{UNIT}});',
|
377 |
'(tablet){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_tablet.SIZE || 0}}{{UNIT}}, {{image_offset_y_tablet.SIZE || 0}}{{UNIT}});',
|
378 |
'(mobile){{WRAPPER}} .ha-review-figure' => '-ms-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); -webkit-transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}}); transform: translate({{image_offset_x_mobile.SIZE || 0}}{{UNIT}}, {{image_offset_y_mobile.SIZE || 0}}{{UNIT}});',
|
379 |
// Review body styles
|
380 |
'{{WRAPPER}}.ha-review--top .ha-review-body' => 'margin-top: {{SIZE}}{{UNIT}};',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
],
|
382 |
]
|
383 |
);
|