| 1 |
<?php |
| 2 |
|
| 3 |
namespace Borderless\Widgets; |
| 4 |
|
| 5 |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 6 |
|
| 7 |
use Elementor\Widget_Base; |
| 8 |
use Elementor\Controls_Manager; |
| 9 |
use Elementor\Group_Control_Border; |
| 10 |
use Elementor\Group_Control_Box_Shadow; |
| 11 |
use Elementor\Group_Control_Image_Size; |
| 12 |
use \Elementor\Group_Control_Typography; |
| 13 |
use \Elementor\Group_Control_Background; |
| 14 |
use \Elementor\Group_Control_Text_Stroke; |
| 15 |
use \Elementor\Group_Control_Text_Shadow; |
| 16 |
use \Elementor\Group_Control_Css_Filter; |
| 17 |
use Elementor\Icons_Manager; |
| 18 |
use \Elementor\Repeater; |
| 19 |
use Elementor\Utils; |
| 20 |
|
| 21 |
class Hero extends Widget_Base { |
| 22 |
|
| 23 |
public function get_name() { |
| 24 |
return 'borderless-elementor-hero'; |
| 25 |
} |
| 26 |
|
| 27 |
public function get_title() { |
| 28 |
return 'Hero'; |
| 29 |
} |
| 30 |
|
| 31 |
public function get_icon() { |
| 32 |
return 'borderless-icon-hero'; |
| 33 |
} |
| 34 |
|
| 35 |
public function get_categories() { |
| 36 |
return [ 'borderless' ]; |
| 37 |
} |
| 38 |
|
| 39 |
public function get_keywords() |
| 40 |
{ |
| 41 |
return [ |
| 42 |
'hero', |
| 43 |
'title', |
| 44 |
'title hero', |
| 45 |
'borderless' |
| 46 |
]; |
| 47 |
} |
| 48 |
|
| 49 |
public function get_style_depends() { |
| 50 |
return |
| 51 |
[ |
| 52 |
'borderless-elementor-style', |
| 53 |
'elementor-widget-hero' |
| 54 |
]; |
| 55 |
} |
| 56 |
|
| 57 |
public function get_custom_help_url() |
| 58 |
{ |
| 59 |
return 'https://visualmodo.com/'; |
| 60 |
} |
| 61 |
|
| 62 |
protected function _register_controls() { |
| 63 |
|
| 64 |
/*-----------------------------------------------------------------------------------*/ |
| 65 |
/* *. Hero - Content |
| 66 |
/*-----------------------------------------------------------------------------------*/ |
| 67 |
|
| 68 |
$this->start_controls_section( |
| 69 |
'borderless_elementor_section_hero_content', |
| 70 |
[ |
| 71 |
'label' => esc_html__( 'Content', 'borderless' ), |
| 72 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 73 |
] |
| 74 |
); |
| 75 |
|
| 76 |
$this->add_control( |
| 77 |
'borderless_elementor_hero_title', |
| 78 |
[ |
| 79 |
'label' => esc_html__( 'Title', 'borderless'), |
| 80 |
'type' => Controls_Manager::TEXT, |
| 81 |
'default' => esc_html__( 'Enter Your Title', 'borderless' ), |
| 82 |
'label_block' => true, |
| 83 |
'dynamic' => [ 'active' => true ] |
| 84 |
] |
| 85 |
); |
| 86 |
|
| 87 |
$this->add_control( |
| 88 |
'borderless_elementor_hero_subtitle', |
| 89 |
[ |
| 90 |
'label' => esc_html__( 'Subtitle', 'borderless'), |
| 91 |
'type' => Controls_Manager::TEXT, |
| 92 |
'default' => esc_html__( 'Enter Your Subtitle', 'borderless' ), |
| 93 |
'label_block' => true, |
| 94 |
'dynamic' => [ 'active' => true ] |
| 95 |
] |
| 96 |
); |
| 97 |
|
| 98 |
$repeater = new Repeater(); |
| 99 |
|
| 100 |
$repeater->start_controls_tabs( 'borderless_elementor_tabs_hero_button_repeater' ); |
| 101 |
|
| 102 |
$repeater->start_controls_tab( 'borderless_elementor_tab_hero_button_content', [ 'label' => __( 'Content', 'borderless' ) ] ); |
| 103 |
|
| 104 |
$repeater->add_control( |
| 105 |
'borderless_elementor_hero_button_item_text', |
| 106 |
[ |
| 107 |
'label' => esc_html__( 'Button Text', 'borderless'), |
| 108 |
'type' => Controls_Manager::TEXT, |
| 109 |
'dynamic' => [ 'active' => true ] |
| 110 |
] |
| 111 |
); |
| 112 |
|
| 113 |
$repeater->add_control( |
| 114 |
'borderless_elementor_hero_button_item_link', |
| 115 |
array( |
| 116 |
'label' => esc_html__( 'Button Link', 'borderless' ), |
| 117 |
'type' => Controls_Manager::URL, |
| 118 |
'default' => array( 'url' => '#' ), |
| 119 |
'dynamic' => array( 'active' => true ), |
| 120 |
) |
| 121 |
); |
| 122 |
|
| 123 |
$repeater->add_control( |
| 124 |
'borderless_elementor_hero_button_item_icon', |
| 125 |
[ |
| 126 |
'label' => esc_html__( 'Icon', 'borderless' ), |
| 127 |
'type' => Controls_Manager::ICONS, |
| 128 |
'fa4compatibility' => 'icon', |
| 129 |
'skin' => 'inline', |
| 130 |
'label_block' => false, |
| 131 |
] |
| 132 |
); |
| 133 |
|
| 134 |
$repeater->add_control( |
| 135 |
'borderless_elementor_hero_button_item_icon_align', |
| 136 |
[ |
| 137 |
'label' => esc_html__( 'Icon Position', 'borderless' ), |
| 138 |
'type' => Controls_Manager::SELECT, |
| 139 |
'default' => 'left', |
| 140 |
'options' => [ |
| 141 |
'left' => esc_html__( 'Before', 'borderless' ), |
| 142 |
'right' => esc_html__( 'After', 'borderless' ), |
| 143 |
], |
| 144 |
] |
| 145 |
); |
| 146 |
|
| 147 |
$repeater->add_responsive_control( |
| 148 |
'borderless_elementor_hero_button_item_icon_indent', |
| 149 |
[ |
| 150 |
'label' => __( 'Icon Spacing', 'borderless' ), |
| 151 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 152 |
'min' => 0, |
| 153 |
'max' => 100, |
| 154 |
'step' => 1, |
| 155 |
'default' => 10, |
| 156 |
'selectors' => [ |
| 157 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}' => 'gap: {{VALUE}}px', |
| 158 |
], |
| 159 |
] |
| 160 |
); |
| 161 |
|
| 162 |
$repeater->end_controls_tab(); |
| 163 |
|
| 164 |
$repeater->start_controls_tab( 'borderless_elementor_tab_hero_button_style', [ 'label' => __( 'Style', 'borderless' ) ] ); |
| 165 |
|
| 166 |
$repeater->add_control( |
| 167 |
'borderless_elementor_hero_button_custom_style', |
| 168 |
[ |
| 169 |
'label' => __( 'Custom', 'borderless' ), |
| 170 |
'type' => Controls_Manager::SWITCHER, |
| 171 |
'description' => __( 'Set custom style that will only affect this specific button.', 'borderless' ), |
| 172 |
] |
| 173 |
); |
| 174 |
|
| 175 |
$repeater->add_group_control( |
| 176 |
Group_Control_Typography::get_type(), |
| 177 |
[ |
| 178 |
'name' => 'borderless_elementor_hero_button_typography_custom', |
| 179 |
'label' => __('Typography', 'borderless'), |
| 180 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}', |
| 181 |
'conditions' => [ |
| 182 |
'terms' => [ |
| 183 |
[ |
| 184 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 185 |
'value' => 'yes', |
| 186 |
], |
| 187 |
], |
| 188 |
], |
| 189 |
] |
| 190 |
); |
| 191 |
|
| 192 |
$repeater->add_group_control( |
| 193 |
Group_Control_Text_Shadow::get_type(), |
| 194 |
[ |
| 195 |
'name' => 'borderless_elementor_hero_button_text_shadow_custom', |
| 196 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}', |
| 197 |
'conditions' => [ |
| 198 |
'terms' => [ |
| 199 |
[ |
| 200 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 201 |
'value' => 'yes', |
| 202 |
], |
| 203 |
], |
| 204 |
], |
| 205 |
] |
| 206 |
); |
| 207 |
|
| 208 |
$repeater->add_control( |
| 209 |
'borderless_elementor_hero_button_heading_normal_custom', |
| 210 |
[ |
| 211 |
'label' => esc_html__( 'Normal', 'borderless' ), |
| 212 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 213 |
'separator' => 'before', |
| 214 |
'conditions' => [ |
| 215 |
'terms' => [ |
| 216 |
[ |
| 217 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 218 |
'value' => 'yes', |
| 219 |
], |
| 220 |
], |
| 221 |
], |
| 222 |
] |
| 223 |
); |
| 224 |
|
| 225 |
$repeater->add_control( |
| 226 |
'borderless_elementor_hero_button_text_color_custom', |
| 227 |
[ |
| 228 |
'label' => __( 'Text Color', 'borderless' ), |
| 229 |
'type' => Controls_Manager::COLOR, |
| 230 |
'selectors' => [ |
| 231 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}' => 'color: {{VALUE}};', |
| 232 |
], |
| 233 |
'conditions' => [ |
| 234 |
'terms' => [ |
| 235 |
[ |
| 236 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 237 |
'value' => 'yes', |
| 238 |
], |
| 239 |
], |
| 240 |
], |
| 241 |
] |
| 242 |
); |
| 243 |
|
| 244 |
$repeater->add_group_control( |
| 245 |
Group_Control_Background::get_type(), |
| 246 |
[ |
| 247 |
'name' => 'borderless_elementor_hero_button_background_custom', |
| 248 |
'label' => __( 'Background', 'borderless' ), |
| 249 |
'types' => [ 'classic', 'gradient' ], |
| 250 |
'exclude' => [ 'image' ], |
| 251 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}', |
| 252 |
'conditions' => [ |
| 253 |
'terms' => [ |
| 254 |
[ |
| 255 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 256 |
'value' => 'yes', |
| 257 |
], |
| 258 |
], |
| 259 |
], |
| 260 |
] |
| 261 |
); |
| 262 |
|
| 263 |
$repeater->add_control( |
| 264 |
'borderless_elementor_hero_button_heading_hover_custom', |
| 265 |
[ |
| 266 |
'label' => esc_html__( 'Hover', 'borderless' ), |
| 267 |
'type' => \Elementor\Controls_Manager::HEADING, |
| 268 |
'separator' => 'before', |
| 269 |
'conditions' => [ |
| 270 |
'terms' => [ |
| 271 |
[ |
| 272 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 273 |
'value' => 'yes', |
| 274 |
], |
| 275 |
], |
| 276 |
], |
| 277 |
] |
| 278 |
); |
| 279 |
|
| 280 |
$repeater->add_control( |
| 281 |
'borderless_elementor_hero_button_text_color_hover_custom', |
| 282 |
[ |
| 283 |
'label' => __( 'Hover Text Color', 'borderless' ), |
| 284 |
'type' => Controls_Manager::COLOR, |
| 285 |
'selectors' => [ |
| 286 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}:hover' => 'color: {{VALUE}};', |
| 287 |
], |
| 288 |
'conditions' => [ |
| 289 |
'terms' => [ |
| 290 |
[ |
| 291 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 292 |
'value' => 'yes', |
| 293 |
], |
| 294 |
], |
| 295 |
], |
| 296 |
] |
| 297 |
); |
| 298 |
|
| 299 |
$repeater->add_group_control( |
| 300 |
Group_Control_Background::get_type(), |
| 301 |
[ |
| 302 |
'name' => 'borderless_elementor_hero_button_background_hover_custom', |
| 303 |
'label' => __( 'Hover Background', 'borderless' ), |
| 304 |
'types' => [ 'classic', 'gradient' ], |
| 305 |
'exclude' => [ 'image' ], |
| 306 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}:hover', |
| 307 |
'conditions' => [ |
| 308 |
'terms' => [ |
| 309 |
[ |
| 310 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 311 |
'value' => 'yes', |
| 312 |
], |
| 313 |
], |
| 314 |
], |
| 315 |
] |
| 316 |
); |
| 317 |
|
| 318 |
$repeater->add_control( |
| 319 |
'borderless_elementor_hero_button_border_color_hover_custom', |
| 320 |
[ |
| 321 |
'label' => __( 'Hover Border Color', 'borderless' ), |
| 322 |
'type' => Controls_Manager::COLOR, |
| 323 |
'selectors' => [ |
| 324 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}:hover' => 'border-color: {{VALUE}};', |
| 325 |
], |
| 326 |
'conditions' => [ |
| 327 |
'terms' => [ |
| 328 |
[ |
| 329 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 330 |
'value' => 'yes', |
| 331 |
], |
| 332 |
], |
| 333 |
], |
| 334 |
] |
| 335 |
); |
| 336 |
|
| 337 |
$repeater->add_group_control( |
| 338 |
Group_Control_Border::get_type(), |
| 339 |
[ |
| 340 |
'name' => 'borderless_elementor_hero_button_border_custom', |
| 341 |
'label' => esc_html__( 'Border', 'borderless'), |
| 342 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}', |
| 343 |
'separator' => 'before', |
| 344 |
'conditions' => [ |
| 345 |
'terms' => [ |
| 346 |
[ |
| 347 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 348 |
'value' => 'yes', |
| 349 |
], |
| 350 |
], |
| 351 |
], |
| 352 |
] |
| 353 |
); |
| 354 |
|
| 355 |
$repeater->add_control( |
| 356 |
'borderless_elementor_hero_button_border_radius_custom', |
| 357 |
[ |
| 358 |
'label' => esc_html__( 'Border Radius', 'borderless'), |
| 359 |
'type' => Controls_Manager::DIMENSIONS, |
| 360 |
'size_units' => [ 'px', '%', 'em' ], |
| 361 |
'selectors' => [ |
| 362 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 363 |
], |
| 364 |
'conditions' => [ |
| 365 |
'terms' => [ |
| 366 |
[ |
| 367 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 368 |
'value' => 'yes', |
| 369 |
], |
| 370 |
], |
| 371 |
], |
| 372 |
] |
| 373 |
); |
| 374 |
|
| 375 |
$repeater->add_group_control( |
| 376 |
Group_Control_Box_Shadow::get_type(), |
| 377 |
[ |
| 378 |
'name' => 'borderless_elementor_hero_button_box_shadow_custom', |
| 379 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}', |
| 380 |
'conditions' => [ |
| 381 |
'terms' => [ |
| 382 |
[ |
| 383 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 384 |
'value' => 'yes', |
| 385 |
], |
| 386 |
], |
| 387 |
], |
| 388 |
] |
| 389 |
); |
| 390 |
|
| 391 |
$repeater->add_responsive_control( |
| 392 |
'borderless_elementor_hero_button_padding_custom', |
| 393 |
[ |
| 394 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 395 |
'type' => Controls_Manager::DIMENSIONS, |
| 396 |
'separator' => 'before', |
| 397 |
'size_units' => [ 'px', 'em', '%' ], |
| 398 |
'selectors' => [ |
| 399 |
'{{WRAPPER}} .borderless-elementor-hero {{CURRENT_ITEM}}' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 400 |
], |
| 401 |
'conditions' => [ |
| 402 |
'terms' => [ |
| 403 |
[ |
| 404 |
'name' => 'borderless_elementor_hero_button_custom_style', |
| 405 |
'value' => 'yes', |
| 406 |
], |
| 407 |
], |
| 408 |
], |
| 409 |
] |
| 410 |
); |
| 411 |
|
| 412 |
$repeater->end_controls_tab(); |
| 413 |
|
| 414 |
$repeater->end_controls_tabs(); |
| 415 |
|
| 416 |
$this->add_control( |
| 417 |
'borderless_elementor_hero_button_item_strings', |
| 418 |
[ |
| 419 |
'type' => Controls_Manager::REPEATER, |
| 420 |
'show_label' => true, |
| 421 |
'fields' => $repeater->get_controls(), |
| 422 |
'title_field' => '{{ borderless_elementor_hero_button_item_text }}', |
| 423 |
'default' => [ |
| 424 |
['borderless_elementor_hero_button_item_text' => esc_html__('Button', 'borderless')], |
| 425 |
], |
| 426 |
] |
| 427 |
); |
| 428 |
|
| 429 |
$this->end_controls_section(); |
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
/*-----------------------------------------------------------------------------------*/ |
| 434 |
/* *. Hero/Settings - Content |
| 435 |
/*-----------------------------------------------------------------------------------*/ |
| 436 |
|
| 437 |
$this->start_controls_section( |
| 438 |
'borderless_elementor_section_hero_settings', |
| 439 |
[ |
| 440 |
'label' => esc_html__( 'Settings', 'borderless' ), |
| 441 |
'tab' => Controls_Manager::TAB_CONTENT, |
| 442 |
] |
| 443 |
); |
| 444 |
|
| 445 |
$this->add_control( |
| 446 |
'borderless_elementor_hero_show_title', |
| 447 |
[ |
| 448 |
'label' => __( 'Show Title', 'borderless' ), |
| 449 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 450 |
'return_value' => 'true', |
| 451 |
'default' => 'true', |
| 452 |
] |
| 453 |
); |
| 454 |
|
| 455 |
$this->add_control( |
| 456 |
'borderless_elementor_hero_show_subtitle', |
| 457 |
[ |
| 458 |
'label' => __( 'Show Subtitle', 'borderless' ), |
| 459 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 460 |
'return_value' => 'true', |
| 461 |
'default' => 'true', |
| 462 |
] |
| 463 |
); |
| 464 |
|
| 465 |
$this->add_control( |
| 466 |
'borderless_elementor_hero_show_buttons', |
| 467 |
[ |
| 468 |
'label' => __( 'Show Buttons', 'borderless' ), |
| 469 |
'type' => \Elementor\Controls_Manager::SWITCHER, |
| 470 |
'return_value' => 'true', |
| 471 |
'default' => '', |
| 472 |
] |
| 473 |
); |
| 474 |
|
| 475 |
$this->add_control( |
| 476 |
'borderless_elementor_hero_title_html_tag', |
| 477 |
[ |
| 478 |
'label' => esc_html__( 'Title HTML Tag', 'borderless' ), |
| 479 |
'type' => Controls_Manager::SELECT, |
| 480 |
'options' => [ |
| 481 |
'h1' => 'H1', |
| 482 |
'h2' => 'H2', |
| 483 |
'h3' => 'H3', |
| 484 |
'h4' => 'H4', |
| 485 |
'h5' => 'H5', |
| 486 |
'h6' => 'H6', |
| 487 |
'div' => 'div', |
| 488 |
'span' => 'span', |
| 489 |
'p' => 'p', |
| 490 |
], |
| 491 |
'default' => 'h1', |
| 492 |
'condition' => array( |
| 493 |
'borderless_elementor_hero_show_title' => 'true', |
| 494 |
), |
| 495 |
] |
| 496 |
); |
| 497 |
|
| 498 |
$this->add_control( |
| 499 |
'borderless_elementor_hero_subtitle_html_tag', |
| 500 |
[ |
| 501 |
'label' => esc_html__( 'Subtitle HTML Tag', 'borderless' ), |
| 502 |
'type' => Controls_Manager::SELECT, |
| 503 |
'options' => [ |
| 504 |
'h1' => 'H1', |
| 505 |
'h2' => 'H2', |
| 506 |
'h3' => 'H3', |
| 507 |
'h4' => 'H4', |
| 508 |
'h5' => 'H5', |
| 509 |
'h6' => 'H6', |
| 510 |
'div' => 'div', |
| 511 |
'span' => 'span', |
| 512 |
'p' => 'p', |
| 513 |
], |
| 514 |
'default' => 'span', |
| 515 |
'condition' => array( |
| 516 |
'borderless_elementor_hero_show_subtitle' => 'true', |
| 517 |
), |
| 518 |
] |
| 519 |
); |
| 520 |
|
| 521 |
$this->add_control( |
| 522 |
'borderless_elementor_hero_animation', |
| 523 |
[ |
| 524 |
'label' => esc_html__( 'Hero Animation', 'borderless' ), |
| 525 |
'type' => \Elementor\Controls_Manager::ANIMATION, |
| 526 |
'prefix_class' => 'animated ', |
| 527 |
'separator' => 'before', |
| 528 |
] |
| 529 |
); |
| 530 |
|
| 531 |
$this->add_control( |
| 532 |
'borderless_elementor_hero_content_width_layout', |
| 533 |
[ |
| 534 |
'label' => esc_html__( 'Content Width', 'borderless' ), |
| 535 |
'type' => Controls_Manager::SELECT, |
| 536 |
'options' => [ |
| 537 |
'boxed' => 'Boxed', |
| 538 |
'full' => 'Full Width', |
| 539 |
], |
| 540 |
'default' => 'full', |
| 541 |
] |
| 542 |
); |
| 543 |
|
| 544 |
$this->add_responsive_control( |
| 545 |
'borderless_elementor_hero_content_width', |
| 546 |
[ |
| 547 |
'label' => esc_html__( 'Width', 'borderless' ), |
| 548 |
'type' => Controls_Manager::SLIDER, |
| 549 |
'range' => [ |
| 550 |
'px' => [ |
| 551 |
'min' => 500, |
| 552 |
'max' => 1600, |
| 553 |
], |
| 554 |
], |
| 555 |
'default' => [ |
| 556 |
'unit' => 'px', |
| 557 |
'size' => '1200' |
| 558 |
], |
| 559 |
'selectors' => [ |
| 560 |
'{{WRAPPER}} .borderless-elementor-hero__container' => 'max-width: {{SIZE}}{{UNIT}};' |
| 561 |
], |
| 562 |
'condition' => array( |
| 563 |
'borderless_elementor_hero_content_width_layout' => 'boxed', |
| 564 |
), |
| 565 |
] |
| 566 |
); |
| 567 |
|
| 568 |
$this->end_controls_section(); |
| 569 |
|
| 570 |
/*-----------------------------------------------------------------------------------*/ |
| 571 |
/* *. Hero/Hero - Style |
| 572 |
/*-----------------------------------------------------------------------------------*/ |
| 573 |
|
| 574 |
$this->start_controls_section( |
| 575 |
'borderless_elementor_section_hero_style', |
| 576 |
[ |
| 577 |
'label' => esc_html__( 'Hero', 'borderless'), |
| 578 |
'tab' => Controls_Manager::TAB_STYLE |
| 579 |
] |
| 580 |
); |
| 581 |
|
| 582 |
$this->add_responsive_control( |
| 583 |
'borderless_elementor_hero_height', |
| 584 |
[ |
| 585 |
'label' => esc_html__( 'Height', 'borderless'), |
| 586 |
'type' => Controls_Manager::SLIDER, |
| 587 |
'size_units' => [ 'px', 'vh' ], |
| 588 |
'range' => [ |
| 589 |
'px' => [ |
| 590 |
'min' => 100, |
| 591 |
'max' => 9999, |
| 592 |
], |
| 593 |
'vh' => [ |
| 594 |
'min' => 10, |
| 595 |
'max' => 100, |
| 596 |
], |
| 597 |
], |
| 598 |
'default' => [ |
| 599 |
'unit' => 'vh', |
| 600 |
'size' => '100' |
| 601 |
], |
| 602 |
'selectors' => [ |
| 603 |
'{{WRAPPER}} .borderless-elementor-hero__container-inner' => 'min-height: {{SIZE}}{{UNIT}};', |
| 604 |
], |
| 605 |
] |
| 606 |
); |
| 607 |
|
| 608 |
$this->add_responsive_control( |
| 609 |
'borderless_elementor_hero_width', |
| 610 |
[ |
| 611 |
'label' => esc_html__( 'Width', 'borderless'), |
| 612 |
'type' => Controls_Manager::SLIDER, |
| 613 |
'size_units' => [ '%' ], |
| 614 |
'range' => [ |
| 615 |
'%' => [ |
| 616 |
'min' => 20, |
| 617 |
'max' => 100, |
| 618 |
], |
| 619 |
], |
| 620 |
'default' => [ |
| 621 |
'unit' => '%', |
| 622 |
'size' => '80' |
| 623 |
], |
| 624 |
'selectors' => [ |
| 625 |
'{{WRAPPER}} .borderless-elementor-hero__content' => 'width: {{SIZE}}{{UNIT}};', |
| 626 |
], |
| 627 |
] |
| 628 |
); |
| 629 |
|
| 630 |
$this->add_control( |
| 631 |
'borderless_elementor_hero_vertical_position', |
| 632 |
[ |
| 633 |
'label' => __( 'Vertical Position', 'borderless' ), |
| 634 |
'type' => Controls_Manager::CHOOSE, |
| 635 |
'default' => 'center', |
| 636 |
'options' => [ |
| 637 |
'flex-start' => [ |
| 638 |
'title' => __( 'Top', 'borderless' ), |
| 639 |
'icon' => 'eicon-v-align-top', |
| 640 |
], |
| 641 |
'center' => [ |
| 642 |
'title' => __( 'Center', 'borderless' ), |
| 643 |
'icon' => 'eicon-v-align-middle', |
| 644 |
], |
| 645 |
'flex-end' => [ |
| 646 |
'title' => __( 'Bottom', 'borderless' ), |
| 647 |
'icon' => 'eicon-v-align-bottom', |
| 648 |
], |
| 649 |
], |
| 650 |
'default' => 'center', |
| 651 |
'selectors' => [ |
| 652 |
'{{WRAPPER}} .borderless-elementor-hero__container-inner' => 'align-items: {{VALUE}}', |
| 653 |
], |
| 654 |
] |
| 655 |
); |
| 656 |
|
| 657 |
$this->add_control( |
| 658 |
'borderless_elementor_hero_horizontal_position', |
| 659 |
[ |
| 660 |
'label' => __( 'Horizontal Position', 'borderless' ), |
| 661 |
'type' => Controls_Manager::CHOOSE, |
| 662 |
'default' => 'center', |
| 663 |
'options' => [ |
| 664 |
'flex-start' => [ |
| 665 |
'title' => __( 'Left', 'borderless' ), |
| 666 |
'icon' => 'eicon-h-align-left', |
| 667 |
], |
| 668 |
'center' => [ |
| 669 |
'title' => __( 'Center', 'borderless' ), |
| 670 |
'icon' => 'eicon-h-align-center', |
| 671 |
], |
| 672 |
'flex-end' => [ |
| 673 |
'title' => __( 'Right', 'borderless' ), |
| 674 |
'icon' => 'eicon-h-align-right', |
| 675 |
], |
| 676 |
], |
| 677 |
'default' => 'center', |
| 678 |
'selectors' => [ |
| 679 |
'{{WRAPPER}} .borderless-elementor-hero__container-inner' => 'justify-content: {{VALUE}}', |
| 680 |
], |
| 681 |
] |
| 682 |
); |
| 683 |
|
| 684 |
$this->add_control( |
| 685 |
'borderless_elementor_hero_title_align', |
| 686 |
[ |
| 687 |
'label' => __( 'Title Align', 'borderless' ), |
| 688 |
'type' => Controls_Manager::CHOOSE, |
| 689 |
'options' => [ |
| 690 |
'start' => [ |
| 691 |
'title' => __( 'Left', 'borderless' ), |
| 692 |
'icon' => 'eicon-text-align-left', |
| 693 |
], |
| 694 |
'center' => [ |
| 695 |
'title' => __( 'Center', 'borderless' ), |
| 696 |
'icon' => 'eicon-text-align-center', |
| 697 |
], |
| 698 |
'end' => [ |
| 699 |
'title' => __( 'Right', 'borderless' ), |
| 700 |
'icon' => 'eicon-text-align-right', |
| 701 |
], |
| 702 |
], |
| 703 |
'default' => 'center', |
| 704 |
'selectors' => [ |
| 705 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'text-align: {{VALUE}}', |
| 706 |
], |
| 707 |
] |
| 708 |
); |
| 709 |
|
| 710 |
$this->add_control( |
| 711 |
'borderless_elementor_hero_subtitle_align', |
| 712 |
[ |
| 713 |
'label' => __( 'Subtitle Align', 'borderless' ), |
| 714 |
'type' => Controls_Manager::CHOOSE, |
| 715 |
'options' => [ |
| 716 |
'start' => [ |
| 717 |
'title' => __( 'Left', 'borderless' ), |
| 718 |
'icon' => 'eicon-text-align-left', |
| 719 |
], |
| 720 |
'center' => [ |
| 721 |
'title' => __( 'Center', 'borderless' ), |
| 722 |
'icon' => 'eicon-text-align-center', |
| 723 |
], |
| 724 |
'end' => [ |
| 725 |
'title' => __( 'Right', 'borderless' ), |
| 726 |
'icon' => 'eicon-text-align-right', |
| 727 |
], |
| 728 |
], |
| 729 |
'default' => 'center', |
| 730 |
'selectors' => [ |
| 731 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'text-align: {{VALUE}}', |
| 732 |
], |
| 733 |
] |
| 734 |
); |
| 735 |
|
| 736 |
$this->add_control( |
| 737 |
'borderless_elementor_hero_button_align', |
| 738 |
[ |
| 739 |
'label' => __( 'Button Align', 'borderless' ), |
| 740 |
'type' => Controls_Manager::CHOOSE, |
| 741 |
'options' => [ |
| 742 |
'flex-start' => [ |
| 743 |
'title' => __( 'Left', 'borderless' ), |
| 744 |
'icon' => 'eicon-text-align-left', |
| 745 |
], |
| 746 |
'center' => [ |
| 747 |
'title' => __( 'Center', 'borderless' ), |
| 748 |
'icon' => 'eicon-text-align-center', |
| 749 |
], |
| 750 |
'flex-end' => [ |
| 751 |
'title' => __( 'Right', 'borderless' ), |
| 752 |
'icon' => 'eicon-text-align-right', |
| 753 |
], |
| 754 |
], |
| 755 |
'default' => 'center', |
| 756 |
'selectors' => [ |
| 757 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'justify-content: {{VALUE}}', |
| 758 |
], |
| 759 |
] |
| 760 |
); |
| 761 |
|
| 762 |
$this->add_responsive_control( |
| 763 |
'borderless_elementor_hero_padding', |
| 764 |
[ |
| 765 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 766 |
'type' => Controls_Manager::DIMENSIONS, |
| 767 |
'separator' => 'before', |
| 768 |
'size_units' => [ 'px', 'em', '%', 'rem' ], |
| 769 |
'selectors' => [ |
| 770 |
'{{WRAPPER}} .borderless-elementor-hero__container-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 771 |
], |
| 772 |
] |
| 773 |
); |
| 774 |
|
| 775 |
$this->end_controls_section(); |
| 776 |
|
| 777 |
|
| 778 |
/*-----------------------------------------------------------------------------------*/ |
| 779 |
/* *. Hero/Hero Background - Style |
| 780 |
/*-----------------------------------------------------------------------------------*/ |
| 781 |
|
| 782 |
$this->start_controls_section( |
| 783 |
'borderless_elementor_section_hero_background_style', |
| 784 |
[ |
| 785 |
'label' => esc_html__( 'Hero Background', 'borderless'), |
| 786 |
'tab' => Controls_Manager::TAB_STYLE |
| 787 |
] |
| 788 |
); |
| 789 |
|
| 790 |
$this->start_controls_tabs( 'borderless_elementor_tabs_hero_background_style' ); |
| 791 |
|
| 792 |
$this->start_controls_tab( 'borderless_elementor_tab_normal_hero_background_style', |
| 793 |
[ |
| 794 |
'label' => __( 'Normal', 'borderless' ), |
| 795 |
] |
| 796 |
); |
| 797 |
|
| 798 |
$this->add_group_control( |
| 799 |
Group_Control_Background::get_type(), |
| 800 |
[ |
| 801 |
'name' => 'borderless_elementor_hero_background', |
| 802 |
'label' => __( 'Background', 'borderless' ), |
| 803 |
'types' => [ 'classic', 'gradient' ], |
| 804 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero', |
| 805 |
'fields_options' => [ |
| 806 |
'background' => [ |
| 807 |
'default' => 'classic', |
| 808 |
], |
| 809 |
'color' => [ |
| 810 |
'default' => '#000000', |
| 811 |
], |
| 812 |
], |
| 813 |
] |
| 814 |
); |
| 815 |
|
| 816 |
$this->end_controls_tab(); |
| 817 |
|
| 818 |
$this->start_controls_tab( 'borderless_elementor_tab_hover_hero_background_style', |
| 819 |
[ |
| 820 |
'label' => __( 'Hover', 'borderless' ), |
| 821 |
] |
| 822 |
); |
| 823 |
|
| 824 |
$this->add_group_control( |
| 825 |
Group_Control_Background::get_type(), |
| 826 |
[ |
| 827 |
'name' => 'borderless_elementor_hero_background_hover', |
| 828 |
'label' => __( 'Background', 'borderless' ), |
| 829 |
'types' => [ 'classic', 'gradient' ], |
| 830 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero:hover', |
| 831 |
] |
| 832 |
); |
| 833 |
|
| 834 |
$this->add_control( |
| 835 |
'borderless_elementor_hero_background_hover_transition', |
| 836 |
[ |
| 837 |
'label' => __( 'Transition Duration', 'borderless' ), |
| 838 |
'type' => Controls_Manager::SLIDER, |
| 839 |
'separator' => 'before', |
| 840 |
'range' => [ |
| 841 |
'px' => [ |
| 842 |
'max' => 3, |
| 843 |
'step' => 0.1, |
| 844 |
], |
| 845 |
], |
| 846 |
'default' => [ |
| 847 |
'size' => 0.3, |
| 848 |
], |
| 849 |
'selectors' => [ |
| 850 |
'{{WRAPPER}} .borderless-elementor-hero:hover' => 'transition-duration: {{SIZE}}s', |
| 851 |
], |
| 852 |
] |
| 853 |
); |
| 854 |
|
| 855 |
$this->end_controls_tab(); |
| 856 |
|
| 857 |
$this->end_controls_tabs(); |
| 858 |
|
| 859 |
$this->end_controls_section(); |
| 860 |
|
| 861 |
|
| 862 |
/*-----------------------------------------------------------------------------------*/ |
| 863 |
/* *. Hero/Hero Background Overlay - Style |
| 864 |
/*-----------------------------------------------------------------------------------*/ |
| 865 |
|
| 866 |
$this->start_controls_section( |
| 867 |
'borderless_elementor_section_hero_background_overlay_style', |
| 868 |
[ |
| 869 |
'label' => esc_html__( 'Hero Background Overlay', 'borderless'), |
| 870 |
'tab' => Controls_Manager::TAB_STYLE |
| 871 |
] |
| 872 |
); |
| 873 |
|
| 874 |
$this->start_controls_tabs( 'borderless_elementor_tabs_hero_background_overlay_style' ); |
| 875 |
|
| 876 |
$this->start_controls_tab( 'borderless_elementor_tab_normal_hero_background_overlay_style', |
| 877 |
[ |
| 878 |
'label' => __( 'Normal', 'borderless' ), |
| 879 |
] |
| 880 |
); |
| 881 |
|
| 882 |
$this->add_group_control( |
| 883 |
Group_Control_Background::get_type(), |
| 884 |
[ |
| 885 |
'name' => 'borderless_elementor_hero_background_overlay', |
| 886 |
'label' => __( 'Background', 'borderless' ), |
| 887 |
'types' => [ 'classic', 'gradient' ], |
| 888 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__overlay', |
| 889 |
] |
| 890 |
); |
| 891 |
|
| 892 |
$this->add_control( |
| 893 |
'borderless_elementor_hero_background_overlay_opacity', |
| 894 |
[ |
| 895 |
'label' => __( 'Opacity', 'borderless' ), |
| 896 |
'type' => Controls_Manager::SLIDER, |
| 897 |
'range' => [ |
| 898 |
'px' => [ |
| 899 |
'max' => 1, |
| 900 |
'min' => 0.10, |
| 901 |
'step' => 0.01, |
| 902 |
], |
| 903 |
], |
| 904 |
'selectors' => [ |
| 905 |
'{{WRAPPER}} .borderless-elementor-hero__overlay' => 'opacity: {{SIZE}};', |
| 906 |
], |
| 907 |
] |
| 908 |
); |
| 909 |
|
| 910 |
$this->add_group_control( |
| 911 |
Group_Control_Css_Filter::get_type(), |
| 912 |
[ |
| 913 |
'name' => 'borderless_elementor_hero_background_overlay_css_filter', |
| 914 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__overlay', |
| 915 |
] |
| 916 |
); |
| 917 |
|
| 918 |
$this->end_controls_tab(); |
| 919 |
|
| 920 |
$this->start_controls_tab( 'borderless_elementor_tab_hover_hero_background_overlay_style', |
| 921 |
[ |
| 922 |
'label' => __( 'Hover', 'borderless' ), |
| 923 |
] |
| 924 |
); |
| 925 |
|
| 926 |
$this->add_group_control( |
| 927 |
Group_Control_Background::get_type(), |
| 928 |
[ |
| 929 |
'name' => 'borderless_elementor_hero_background_overlay_hover', |
| 930 |
'label' => __( 'Background', 'borderless' ), |
| 931 |
'types' => [ 'classic', 'gradient' ], |
| 932 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero:hover .borderless-elementor-hero__overlay', |
| 933 |
] |
| 934 |
); |
| 935 |
|
| 936 |
$this->add_control( |
| 937 |
'borderless_elementor_hero_background_overlay_hover_opacity', |
| 938 |
[ |
| 939 |
'label' => __( 'Opacity', 'borderless' ), |
| 940 |
'type' => Controls_Manager::SLIDER, |
| 941 |
'range' => [ |
| 942 |
'px' => [ |
| 943 |
'max' => 1, |
| 944 |
'min' => 0.10, |
| 945 |
'step' => 0.01, |
| 946 |
], |
| 947 |
], |
| 948 |
'selectors' => [ |
| 949 |
'{{WRAPPER}} .borderless-elementor-hero:hover .borderless-elementor-hero__overlay' => 'opacity: {{SIZE}};', |
| 950 |
], |
| 951 |
] |
| 952 |
); |
| 953 |
|
| 954 |
$this->add_group_control( |
| 955 |
Group_Control_Css_Filter::get_type(), |
| 956 |
[ |
| 957 |
'name' => 'borderless_elementor_hero_background_overlay_hover_css_filter', |
| 958 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero:hover .borderless-elementor-hero__overlay', |
| 959 |
] |
| 960 |
); |
| 961 |
|
| 962 |
$this->add_control( |
| 963 |
'borderless_elementor_hero_background_overlay_hover_transition', |
| 964 |
[ |
| 965 |
'label' => __( 'Transition Duration', 'borderless' ), |
| 966 |
'type' => Controls_Manager::SLIDER, |
| 967 |
'separator' => 'before', |
| 968 |
'range' => [ |
| 969 |
'px' => [ |
| 970 |
'max' => 3, |
| 971 |
'step' => 0.1, |
| 972 |
], |
| 973 |
], |
| 974 |
'default' => [ |
| 975 |
'size' => 0.3, |
| 976 |
], |
| 977 |
'selectors' => [ |
| 978 |
'{{WRAPPER}} .borderless-elementor-hero:hover .borderless-elementor-hero__overlay' => 'transition-duration: {{SIZE}}s', |
| 979 |
], |
| 980 |
] |
| 981 |
); |
| 982 |
|
| 983 |
$this->end_controls_tab(); |
| 984 |
|
| 985 |
$this->end_controls_tabs(); |
| 986 |
|
| 987 |
$this->end_controls_section(); |
| 988 |
|
| 989 |
|
| 990 |
/*-----------------------------------------------------------------------------------*/ |
| 991 |
/* *. Hero/Title - Style |
| 992 |
/*-----------------------------------------------------------------------------------*/ |
| 993 |
|
| 994 |
$this->start_controls_section( |
| 995 |
'borderless_elementor_section_hero_title_style', |
| 996 |
[ |
| 997 |
'label' => esc_html__( 'Title', 'borderless'), |
| 998 |
'tab' => Controls_Manager::TAB_STYLE |
| 999 |
] |
| 1000 |
); |
| 1001 |
|
| 1002 |
$this->add_responsive_control( |
| 1003 |
'borderless_elementor_hero_title_color', |
| 1004 |
[ |
| 1005 |
'label' => __( 'Text Color', 'borderless' ), |
| 1006 |
'type' => Controls_Manager::COLOR, |
| 1007 |
'selectors' => [ |
| 1008 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'color: {{VALUE}};', |
| 1009 |
], |
| 1010 |
] |
| 1011 |
); |
| 1012 |
|
| 1013 |
$this->add_group_control( |
| 1014 |
Group_Control_Typography::get_type(), |
| 1015 |
[ |
| 1016 |
'name' => 'borderless_elementor_hero_title_typography', |
| 1017 |
'label' => __('Typography', 'borderless'), |
| 1018 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__title', |
| 1019 |
] |
| 1020 |
); |
| 1021 |
|
| 1022 |
$this->add_group_control( |
| 1023 |
Group_Control_Text_Stroke::get_type(), |
| 1024 |
[ |
| 1025 |
'name' => 'borderless_elementor_hero_title_text_stroke', |
| 1026 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__title', |
| 1027 |
] |
| 1028 |
); |
| 1029 |
|
| 1030 |
$this->add_group_control( |
| 1031 |
Group_Control_Text_Shadow::get_type(), |
| 1032 |
[ |
| 1033 |
'name' => 'borderless_elementor_hero_title_text_shadow', |
| 1034 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__title', |
| 1035 |
] |
| 1036 |
); |
| 1037 |
|
| 1038 |
$this->add_control( |
| 1039 |
'borderless_elementor_hero_title_blend_mode', |
| 1040 |
[ |
| 1041 |
'label' => esc_html__( 'Blend Mode', 'borderless' ), |
| 1042 |
'type' => Controls_Manager::SELECT, |
| 1043 |
'options' => [ |
| 1044 |
'' => esc_html__( 'Normal', 'borderless' ), |
| 1045 |
'multiply' => 'Multiply', |
| 1046 |
'screen' => 'Screen', |
| 1047 |
'overlay' => 'Overlay', |
| 1048 |
'darken' => 'Darken', |
| 1049 |
'lighten' => 'Lighten', |
| 1050 |
'color-dodge' => 'Color Dodge', |
| 1051 |
'saturation' => 'Saturation', |
| 1052 |
'color' => 'Color', |
| 1053 |
'difference' => 'Difference', |
| 1054 |
'exclusion' => 'Exclusion', |
| 1055 |
'hue' => 'Hue', |
| 1056 |
'luminosity' => 'Luminosity', |
| 1057 |
], |
| 1058 |
'selectors' => [ |
| 1059 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'mix-blend-mode: {{VALUE}}', |
| 1060 |
], |
| 1061 |
'separator' => 'none', |
| 1062 |
] |
| 1063 |
); |
| 1064 |
|
| 1065 |
$this->add_responsive_control( |
| 1066 |
'borderless_elementor_hero_title_padding', |
| 1067 |
[ |
| 1068 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 1069 |
'type' => Controls_Manager::DIMENSIONS, |
| 1070 |
'separator' => 'before', |
| 1071 |
'size_units' => [ 'px', 'em', '%', 'rem' ], |
| 1072 |
'selectors' => [ |
| 1073 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1074 |
], |
| 1075 |
] |
| 1076 |
); |
| 1077 |
|
| 1078 |
$this->add_responsive_control( |
| 1079 |
'borderless_elementor_hero_title_margin', |
| 1080 |
[ |
| 1081 |
'label' => esc_html__( 'Margin', 'borderless'), |
| 1082 |
'type' => Controls_Manager::DIMENSIONS, |
| 1083 |
'size_units' => [ 'px', 'em', '%', 'rem' ], |
| 1084 |
'selectors' => [ |
| 1085 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1086 |
], |
| 1087 |
] |
| 1088 |
); |
| 1089 |
|
| 1090 |
$this->add_group_control( |
| 1091 |
Group_Control_Border::get_type(), |
| 1092 |
[ |
| 1093 |
'name' => 'borderless_elementor_hero_title_border', |
| 1094 |
'label' => esc_html__( 'Border', 'borderless'), |
| 1095 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__title', |
| 1096 |
] |
| 1097 |
); |
| 1098 |
|
| 1099 |
$this->add_responsive_control( |
| 1100 |
'borderless_elementor_hero_title_radius', |
| 1101 |
[ |
| 1102 |
'label' => esc_html__( 'Border Radius', 'borderless'), |
| 1103 |
'type' => Controls_Manager::DIMENSIONS, |
| 1104 |
'selectors' => [ |
| 1105 |
'{{WRAPPER}} .borderless-elementor-hero__title' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', |
| 1106 |
], |
| 1107 |
] |
| 1108 |
); |
| 1109 |
|
| 1110 |
$this->add_group_control( |
| 1111 |
Group_Control_Box_Shadow::get_type(), |
| 1112 |
[ |
| 1113 |
'name' => 'borderless_elementor_hero_title_box_shadow', |
| 1114 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__title', |
| 1115 |
] |
| 1116 |
); |
| 1117 |
|
| 1118 |
$this->end_controls_section(); |
| 1119 |
|
| 1120 |
|
| 1121 |
/*-----------------------------------------------------------------------------------*/ |
| 1122 |
/* *. Hero/Subtitle - Style |
| 1123 |
/*-----------------------------------------------------------------------------------*/ |
| 1124 |
|
| 1125 |
$this->start_controls_section( |
| 1126 |
'borderless_elementor_section_hero_subtitle_style', |
| 1127 |
[ |
| 1128 |
'label' => esc_html__( 'Subtitle', 'borderless'), |
| 1129 |
'tab' => Controls_Manager::TAB_STYLE |
| 1130 |
] |
| 1131 |
); |
| 1132 |
|
| 1133 |
$this->add_responsive_control( |
| 1134 |
'borderless_elementor_hero_subtitle_color', |
| 1135 |
[ |
| 1136 |
'label' => __( 'Text Color', 'borderless' ), |
| 1137 |
'type' => Controls_Manager::COLOR, |
| 1138 |
'selectors' => [ |
| 1139 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'color: {{VALUE}};', |
| 1140 |
], |
| 1141 |
] |
| 1142 |
); |
| 1143 |
|
| 1144 |
$this->add_group_control( |
| 1145 |
Group_Control_Typography::get_type(), |
| 1146 |
[ |
| 1147 |
'name' => 'borderless_elementor_hero_subtitle_typography', |
| 1148 |
'label' => __('Typography', 'borderless'), |
| 1149 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__subtitle', |
| 1150 |
] |
| 1151 |
); |
| 1152 |
|
| 1153 |
$this->add_group_control( |
| 1154 |
Group_Control_Text_Stroke::get_type(), |
| 1155 |
[ |
| 1156 |
'name' => 'borderless_elementor_hero_subtitle_text_stroke', |
| 1157 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__subtitle', |
| 1158 |
] |
| 1159 |
); |
| 1160 |
|
| 1161 |
$this->add_group_control( |
| 1162 |
Group_Control_Text_Shadow::get_type(), |
| 1163 |
[ |
| 1164 |
'name' => 'borderless_elementor_hero_subtitle_text_shadow', |
| 1165 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__subtitle', |
| 1166 |
] |
| 1167 |
); |
| 1168 |
|
| 1169 |
$this->add_control( |
| 1170 |
'borderless_elementor_hero_subtitle_blend_mode', |
| 1171 |
[ |
| 1172 |
'label' => esc_html__( 'Blend Mode', 'borderless' ), |
| 1173 |
'type' => Controls_Manager::SELECT, |
| 1174 |
'options' => [ |
| 1175 |
'' => esc_html__( 'Normal', 'borderless' ), |
| 1176 |
'multiply' => 'Multiply', |
| 1177 |
'screen' => 'Screen', |
| 1178 |
'overlay' => 'Overlay', |
| 1179 |
'darken' => 'Darken', |
| 1180 |
'lighten' => 'Lighten', |
| 1181 |
'color-dodge' => 'Color Dodge', |
| 1182 |
'saturation' => 'Saturation', |
| 1183 |
'color' => 'Color', |
| 1184 |
'difference' => 'Difference', |
| 1185 |
'exclusion' => 'Exclusion', |
| 1186 |
'hue' => 'Hue', |
| 1187 |
'luminosity' => 'Luminosity', |
| 1188 |
], |
| 1189 |
'selectors' => [ |
| 1190 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'mix-blend-mode: {{VALUE}}', |
| 1191 |
], |
| 1192 |
'separator' => 'none', |
| 1193 |
] |
| 1194 |
); |
| 1195 |
|
| 1196 |
$this->add_responsive_control( |
| 1197 |
'borderless_elementor_hero_subtitle_padding', |
| 1198 |
[ |
| 1199 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 1200 |
'type' => Controls_Manager::DIMENSIONS, |
| 1201 |
'separator' => 'before', |
| 1202 |
'size_units' => [ 'px', 'em', '%', 'rem' ], |
| 1203 |
'selectors' => [ |
| 1204 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1205 |
], |
| 1206 |
] |
| 1207 |
); |
| 1208 |
|
| 1209 |
$this->add_responsive_control( |
| 1210 |
'borderless_elementor_hero_subtitle_margin', |
| 1211 |
[ |
| 1212 |
'label' => esc_html__( 'Margin', 'borderless'), |
| 1213 |
'type' => Controls_Manager::DIMENSIONS, |
| 1214 |
'size_units' => [ 'px', 'em', '%', 'rem' ], |
| 1215 |
'selectors' => [ |
| 1216 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1217 |
], |
| 1218 |
] |
| 1219 |
); |
| 1220 |
|
| 1221 |
$this->add_group_control( |
| 1222 |
Group_Control_Border::get_type(), |
| 1223 |
[ |
| 1224 |
'name' => 'borderless_elementor_hero_subtitle_border', |
| 1225 |
'label' => esc_html__( 'Border', 'borderless'), |
| 1226 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__subtitle', |
| 1227 |
] |
| 1228 |
); |
| 1229 |
|
| 1230 |
$this->add_responsive_control( |
| 1231 |
'borderless_elementor_hero_subtitle_radius', |
| 1232 |
[ |
| 1233 |
'label' => esc_html__( 'Border Radius', 'borderless'), |
| 1234 |
'type' => Controls_Manager::DIMENSIONS, |
| 1235 |
'selectors' => [ |
| 1236 |
'{{WRAPPER}} .borderless-elementor-hero__subtitle' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;', |
| 1237 |
], |
| 1238 |
] |
| 1239 |
); |
| 1240 |
|
| 1241 |
$this->add_group_control( |
| 1242 |
Group_Control_Box_Shadow::get_type(), |
| 1243 |
[ |
| 1244 |
'name' => 'borderless_elementor_hero_subtitle_box_shadow', |
| 1245 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__subtitle', |
| 1246 |
] |
| 1247 |
); |
| 1248 |
|
| 1249 |
$this->end_controls_section(); |
| 1250 |
|
| 1251 |
|
| 1252 |
/*-----------------------------------------------------------------------------------*/ |
| 1253 |
/* *. Hero/Buttons - Style |
| 1254 |
/*-----------------------------------------------------------------------------------*/ |
| 1255 |
|
| 1256 |
$this->start_controls_section( |
| 1257 |
'borderless_elementor_section_hero_buttons_style', |
| 1258 |
[ |
| 1259 |
'label' => esc_html__( 'Buttons', 'borderless'), |
| 1260 |
'tab' => Controls_Manager::TAB_STYLE |
| 1261 |
] |
| 1262 |
); |
| 1263 |
|
| 1264 |
$this->add_responsive_control( |
| 1265 |
'borderless_elementor_hero_buttons_direction', |
| 1266 |
[ |
| 1267 |
'label' => __( 'Direction', 'borderless' ), |
| 1268 |
'type' => Controls_Manager::CHOOSE, |
| 1269 |
'default' => 'row', |
| 1270 |
'options' => [ |
| 1271 |
'row' => [ |
| 1272 |
'title' => __( 'Row', 'borderless' ), |
| 1273 |
'icon' => 'eicon-h-align-center', |
| 1274 |
], |
| 1275 |
'column' => [ |
| 1276 |
'title' => __( 'Column', 'borderless' ), |
| 1277 |
'icon' => 'eicon-v-align-middle', |
| 1278 |
], |
| 1279 |
], |
| 1280 |
'default' => 'center', |
| 1281 |
'selectors' => [ |
| 1282 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'flex-direction: {{VALUE}}', |
| 1283 |
], |
| 1284 |
] |
| 1285 |
); |
| 1286 |
|
| 1287 |
$this->add_responsive_control( |
| 1288 |
'borderless_elementor_buttons_gap', |
| 1289 |
[ |
| 1290 |
'label' => __( 'Gap', 'borderless' ), |
| 1291 |
'type' => \Elementor\Controls_Manager::NUMBER, |
| 1292 |
'min' => 0, |
| 1293 |
'max' => 99999, |
| 1294 |
'step' => 1, |
| 1295 |
'default' => 50, |
| 1296 |
'selectors' => [ |
| 1297 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'gap: {{VALUE}}px', |
| 1298 |
], |
| 1299 |
] |
| 1300 |
); |
| 1301 |
|
| 1302 |
$this->add_responsive_control( |
| 1303 |
'borderless_elementor_buttons_padding', |
| 1304 |
[ |
| 1305 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 1306 |
'type' => Controls_Manager::DIMENSIONS, |
| 1307 |
'separator' => 'before', |
| 1308 |
'size_units' => [ 'px', 'em', '%' ], |
| 1309 |
'selectors' => [ |
| 1310 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1311 |
], |
| 1312 |
] |
| 1313 |
); |
| 1314 |
|
| 1315 |
$this->add_responsive_control( |
| 1316 |
'borderless_elementor_buttons_margin', |
| 1317 |
[ |
| 1318 |
'label' => esc_html__( 'Margin', 'borderless'), |
| 1319 |
'type' => Controls_Manager::DIMENSIONS, |
| 1320 |
'size_units' => [ 'px', 'em', '%' ], |
| 1321 |
'selectors' => [ |
| 1322 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1323 |
], |
| 1324 |
] |
| 1325 |
); |
| 1326 |
|
| 1327 |
$this->add_group_control( |
| 1328 |
Group_Control_Border::get_type(), |
| 1329 |
[ |
| 1330 |
'name' => 'borderless_elementor_buttons_border', |
| 1331 |
'label' => esc_html__( 'Border', 'borderless'), |
| 1332 |
'separator' => 'before', |
| 1333 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__buttons', |
| 1334 |
] |
| 1335 |
); |
| 1336 |
|
| 1337 |
$this->add_control( |
| 1338 |
'borderless_elementor_hero_buttons_border_radius', |
| 1339 |
[ |
| 1340 |
'label' => esc_html__( 'Border Radius', 'borderless'), |
| 1341 |
'type' => Controls_Manager::DIMENSIONS, |
| 1342 |
'size_units' => [ 'px', '%', 'em' ], |
| 1343 |
'selectors' => [ |
| 1344 |
'{{WRAPPER}} .borderless-elementor-hero__buttons' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1345 |
], |
| 1346 |
] |
| 1347 |
); |
| 1348 |
|
| 1349 |
$this->end_controls_section(); |
| 1350 |
|
| 1351 |
|
| 1352 |
/*-----------------------------------------------------------------------------------*/ |
| 1353 |
/* *. Hero/Button - Style |
| 1354 |
/*-----------------------------------------------------------------------------------*/ |
| 1355 |
|
| 1356 |
$this->start_controls_section( |
| 1357 |
'borderless_elementor_section_hero_button_style', |
| 1358 |
[ |
| 1359 |
'label' => esc_html__( 'Button', 'borderless'), |
| 1360 |
'tab' => Controls_Manager::TAB_STYLE |
| 1361 |
] |
| 1362 |
); |
| 1363 |
|
| 1364 |
$this->add_group_control( |
| 1365 |
Group_Control_Typography::get_type(), |
| 1366 |
[ |
| 1367 |
'name' => 'borderless_elementor_hero_button_typography', |
| 1368 |
'label' => __('Typography', 'borderless'), |
| 1369 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button', |
| 1370 |
] |
| 1371 |
); |
| 1372 |
|
| 1373 |
$this->add_group_control( |
| 1374 |
Group_Control_Text_Shadow::get_type(), |
| 1375 |
[ |
| 1376 |
'name' => 'borderless_elementor_hero_button_text_shadow', |
| 1377 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button', |
| 1378 |
] |
| 1379 |
); |
| 1380 |
|
| 1381 |
$this->start_controls_tabs( 'borderless_elementor_tabs_hero_button_style' ); |
| 1382 |
|
| 1383 |
$this->start_controls_tab( 'borderless_elementor_tab_normal_hero_button_style', |
| 1384 |
[ |
| 1385 |
'label' => __( 'Normal', 'borderless' ), |
| 1386 |
] |
| 1387 |
); |
| 1388 |
|
| 1389 |
$this->add_control( |
| 1390 |
'borderless_elementor_hero_button_text_color', |
| 1391 |
[ |
| 1392 |
'label' => __( 'Text Color', 'borderless' ), |
| 1393 |
'type' => Controls_Manager::COLOR, |
| 1394 |
'selectors' => [ |
| 1395 |
'{{WRAPPER}} .borderless-elementor-hero__button' => 'color: {{VALUE}};', |
| 1396 |
], |
| 1397 |
] |
| 1398 |
); |
| 1399 |
|
| 1400 |
$this->add_group_control( |
| 1401 |
Group_Control_Background::get_type(), |
| 1402 |
[ |
| 1403 |
'name' => 'borderless_elementor_hero_button_background', |
| 1404 |
'label' => __( 'Background', 'borderless' ), |
| 1405 |
'types' => [ 'classic', 'gradient' ], |
| 1406 |
'exclude' => [ 'image' ], |
| 1407 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button', |
| 1408 |
] |
| 1409 |
); |
| 1410 |
|
| 1411 |
$this->end_controls_tab(); |
| 1412 |
|
| 1413 |
$this->start_controls_tab( 'borderless_elementor_tab_hover_hero_button_style', |
| 1414 |
[ |
| 1415 |
'label' => __( 'Hover', 'borderless' ), |
| 1416 |
] |
| 1417 |
); |
| 1418 |
|
| 1419 |
$this->add_control( |
| 1420 |
'borderless_elementor_hero_button_text_color_hover', |
| 1421 |
[ |
| 1422 |
'label' => __( 'Text Color', 'borderless' ), |
| 1423 |
'type' => Controls_Manager::COLOR, |
| 1424 |
'selectors' => [ |
| 1425 |
'{{WRAPPER}} .borderless-elementor-hero__button:hover' => 'color: {{VALUE}};', |
| 1426 |
], |
| 1427 |
] |
| 1428 |
); |
| 1429 |
|
| 1430 |
$this->add_group_control( |
| 1431 |
Group_Control_Background::get_type(), |
| 1432 |
[ |
| 1433 |
'name' => 'borderless_elementor_hero_button_background_hover', |
| 1434 |
'label' => __( 'Background', 'borderless' ), |
| 1435 |
'types' => [ 'classic', 'gradient' ], |
| 1436 |
'exclude' => [ 'image' ], |
| 1437 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button:hover', |
| 1438 |
] |
| 1439 |
); |
| 1440 |
|
| 1441 |
$this->add_control( |
| 1442 |
'borderless_elementor_hero_button_border_color_hover', |
| 1443 |
[ |
| 1444 |
'label' => __( 'Border Color', 'borderless' ), |
| 1445 |
'type' => Controls_Manager::COLOR, |
| 1446 |
'selectors' => [ |
| 1447 |
'{{WRAPPER}} .borderless-elementor-hero__button:hover' => 'border-color: {{VALUE}};', |
| 1448 |
], |
| 1449 |
] |
| 1450 |
); |
| 1451 |
|
| 1452 |
$this->end_controls_tab(); |
| 1453 |
|
| 1454 |
$this->end_controls_tabs(); |
| 1455 |
|
| 1456 |
$this->add_group_control( |
| 1457 |
Group_Control_Border::get_type(), |
| 1458 |
[ |
| 1459 |
'name' => 'borderless_elementor_hero_button_border', |
| 1460 |
'label' => esc_html__( 'Border', 'borderless'), |
| 1461 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button', |
| 1462 |
'separator' => 'before', |
| 1463 |
] |
| 1464 |
); |
| 1465 |
|
| 1466 |
$this->add_control( |
| 1467 |
'borderless_elementor_hero_button_border_radius', |
| 1468 |
[ |
| 1469 |
'label' => esc_html__( 'Border Radius', 'borderless'), |
| 1470 |
'type' => Controls_Manager::DIMENSIONS, |
| 1471 |
'size_units' => [ 'px', '%', 'em' ], |
| 1472 |
'selectors' => [ |
| 1473 |
'{{WRAPPER}} .borderless-elementor-hero__button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1474 |
], |
| 1475 |
] |
| 1476 |
); |
| 1477 |
|
| 1478 |
$this->add_group_control( |
| 1479 |
Group_Control_Box_Shadow::get_type(), |
| 1480 |
[ |
| 1481 |
'name' => 'borderless_elementor_hero_button_box_shadow', |
| 1482 |
'selector' => '{{WRAPPER}} .borderless-elementor-hero__button', |
| 1483 |
] |
| 1484 |
); |
| 1485 |
|
| 1486 |
$this->add_responsive_control( |
| 1487 |
'borderless_elementor_hero_button_padding', |
| 1488 |
[ |
| 1489 |
'label' => esc_html__( 'Padding', 'borderless'), |
| 1490 |
'type' => Controls_Manager::DIMENSIONS, |
| 1491 |
'separator' => 'before', |
| 1492 |
'size_units' => [ 'px', 'em', '%' ], |
| 1493 |
'selectors' => [ |
| 1494 |
'{{WRAPPER}} .borderless-elementor-hero__button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', |
| 1495 |
], |
| 1496 |
] |
| 1497 |
); |
| 1498 |
|
| 1499 |
$this->end_controls_section(); |
| 1500 |
|
| 1501 |
} |
| 1502 |
|
| 1503 |
protected function render() { |
| 1504 |
|
| 1505 |
$settings = $this->get_settings_for_display(); |
| 1506 |
|
| 1507 |
?> |
| 1508 |
|
| 1509 |
<div class="borderless-elementor-hero-widget <?php echo esc_attr( $settings['borderless_elementor_hero_animation'] ); ?>"> |
| 1510 |
<div class="borderless-elementor-hero"> |
| 1511 |
<div class="borderless-elementor-hero__overlay"></div> |
| 1512 |
<div class="borderless-elementor-hero__container"> |
| 1513 |
<div class="borderless-elementor-hero__container-inner"> |
| 1514 |
<div class="borderless-elementor-hero__content"> |
| 1515 |
|
| 1516 |
<?php if ( $settings['borderless_elementor_hero_show_title'] ) { ?> |
| 1517 |
<<?php echo wp_kses( ( $settings['borderless_elementor_hero_title_html_tag'] ), true ); ?> class="borderless-elementor-hero__title"> |
| 1518 |
<?php echo wp_kses( ( $settings['borderless_elementor_hero_title'] ), true ); ?> |
| 1519 |
</<?php echo wp_kses( ( $settings['borderless_elementor_hero_title_html_tag'] ), true ); ?>> |
| 1520 |
<?php } ?> |
| 1521 |
|
| 1522 |
<?php if ( $settings['borderless_elementor_hero_show_subtitle'] ) { ?> |
| 1523 |
<<?php echo wp_kses( ( $settings['borderless_elementor_hero_subtitle_html_tag'] ), true ); ?> class="borderless-elementor-hero__subtitle"> |
| 1524 |
<?php echo wp_kses( ( $settings['borderless_elementor_hero_subtitle'] ), true ); ?> |
| 1525 |
</<?php echo wp_kses( ( $settings['borderless_elementor_hero_subtitle_html_tag'] ), true ); ?>> |
| 1526 |
<?php } ?> |
| 1527 |
|
| 1528 |
<?php if ( $settings['borderless_elementor_hero_show_buttons'] ) { ?> |
| 1529 |
<div class="borderless-elementor-hero__buttons"> |
| 1530 |
<?php foreach ( $settings['borderless_elementor_hero_button_item_strings'] as $hero_string ) { ?> |
| 1531 |
<a class="borderless-elementor-hero__button elementor-repeater-item-<?php echo $hero_string['_id']; ?>"> |
| 1532 |
|
| 1533 |
<?php if ( $hero_string['borderless_elementor_hero_button_item_icon_align'] == 'left' ) { ?> |
| 1534 |
<?php Icons_Manager::render_icon( $hero_string['borderless_elementor_hero_button_item_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 1535 |
<?php } ?> |
| 1536 |
|
| 1537 |
<?php echo wp_kses( ( $hero_string['borderless_elementor_hero_button_item_text'] ), true ); ?> |
| 1538 |
|
| 1539 |
<?php if ( $hero_string['borderless_elementor_hero_button_item_icon_align'] == 'right' ) { ?> |
| 1540 |
<?php Icons_Manager::render_icon( $hero_string['borderless_elementor_hero_button_item_icon'], [ 'aria-hidden' => 'true' ] ); ?> |
| 1541 |
<?php } ?> |
| 1542 |
</a> |
| 1543 |
<?php } ?> |
| 1544 |
</div> |
| 1545 |
<?php } ?> |
| 1546 |
|
| 1547 |
</div> |
| 1548 |
</div> |
| 1549 |
</div> |
| 1550 |
</div> |
| 1551 |
</div> |
| 1552 |
|
| 1553 |
<?php |
| 1554 |
|
| 1555 |
} |
| 1556 |
|
| 1557 |
protected function _content_template() { |
| 1558 |
|
| 1559 |
} |
| 1560 |
|
| 1561 |
|
| 1562 |
} |