start_controls_section( 'section_header', [ 'label' => esc_html__( 'Header', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'main_title', [ 'label' => esc_html__( 'Title', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => 'A place to display your masterpiece.', 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], ] ); $this->add_control( 'main_title_tag', [ 'label' => esc_html__( 'HTML Tag', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SELECT, 'options' => [ 'h1'=>'H1','h2'=>'H2','h3'=>'H3','h4'=>'H4','h5'=>'H5','h6'=>'H6','div'=>'div','span'=>'span','p'=>'p' ], 'default' => 'h2', ] ); $this->add_control( 'header_description', [ 'label' => esc_html__( 'Header Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => '', 'description' => esc_html__( 'Optional text below the main title.', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true ], ] ); $this->end_controls_section(); // ========================================== // CONTENT: Gallery // ========================================== $this->start_controls_section( 'section_gallery', [ 'label' => esc_html__( 'Gallery (Fan)', 'addronix-addons-for-elementor' ) ] ); $repeater = new Repeater(); $repeater->add_control( 'image', [ 'label' => esc_html__( 'Image', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::MEDIA, 'dynamic' => [ 'active' => true ], ] ); $repeater->add_control( 'label_text', [ 'label' => esc_html__( 'Floating Label Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'description' => esc_html__( 'Leave empty to hide label for this card.', 'addronix-addons-for-elementor' ), 'dynamic' => [ 'active' => true ], ] ); $repeater->add_control( 'label_bg_color', [ 'label' => esc_html__( 'Label Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}} .aafe-bounce-image-content__label' => 'background-color: {{VALUE}};', '{{WRAPPER}} {{CURRENT_ITEM}} .aafe-bounce-image-content__label::after' => 'border-top-color: {{VALUE}};' ], ] ); $repeater->add_control( 'label_text_color', [ 'label' => esc_html__( 'Label Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}} .aafe-bounce-image-content__label' => 'color: {{VALUE}};' ], ] ); $this->add_control( 'gallery_items', [ 'label' => esc_html__( 'Cards', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'label_text' => '' ], [ 'label_text' => '@coplin', 'label_bg_color' => '#1877F2', 'label_text_color' => '#ffffff' ], [ 'label_text' => '' ], [ 'label_text' => '' ], [ 'label_text' => '' ], [ 'label_text' => '@andrea', 'label_bg_color' => '#569E76', 'label_text_color' => '#ffffff' ], ], 'title_field' => '{{{ label_text ? label_text : "Card" }}}', ] ); $this->add_responsive_control( 'fan_spread', [ 'label' => esc_html__( 'Fan Spread Angle (deg)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1, 'max' => 30 ] ], 'default' => [ 'size' => 6 ], ] ); $this->end_controls_section(); // ========================================== // CONTENT: Description // ========================================== $this->start_controls_section( 'section_desc', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'description', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => 'Artists can display their masterpieces, and buyers can discover and purchase works that resonate with them.', 'dynamic' => [ 'active' => true, 'categories' => [ DynamicTagsModule::TEXT_CATEGORY ] ], ] ); $this->end_controls_section(); // ========================================== // CONTENT: Buttons // ========================================== $this->start_controls_section( 'section_buttons', [ 'label' => esc_html__( 'Buttons', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'btn1_text', [ 'label' => esc_html__( 'Button 1 Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'Join for $9.99/m', 'dynamic' => [ 'active' => true ], ] ); $this->add_control( 'btn1_link', [ 'label' => esc_html__( 'Button 1 Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true ], 'placeholder' => 'https://your-link.com', ] ); $this->add_control( 'btn2_text', [ 'label' => esc_html__( 'Button 2 Text', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'Read more', 'dynamic' => [ 'active' => true ], ] ); $this->add_control( 'btn2_link', [ 'label' => esc_html__( 'Button 2 Link', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::URL, 'dynamic' => [ 'active' => true ], 'placeholder' => 'https://your-link.com', ] ); $this->end_controls_section(); // ========================================== // STYLE: Header // ========================================== $this->start_controls_section( 'style_header', [ 'label' => esc_html__( 'Header', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_responsive_control( 'title_align', [ 'label' => esc_html__( 'Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => 'Left', 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => 'Right', 'icon' => 'eicon-text-align-right' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__title' => 'text-align: {{VALUE}};' ], ] ); $this->add_control( 'title_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__title' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'title_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__title', ] ); $this->add_responsive_control( 'title_margin', [ 'label' => esc_html__( 'Title Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__title' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_control( 'heading_header_desc', [ 'label' => esc_html__( 'Header Description', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING] ); $this->add_control( 'header_desc_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__header-desc' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'header_desc_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__header-desc', ] ); $this->add_responsive_control( 'header_desc_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__header-desc' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); // ========================================== // STYLE: Gallery // ========================================== $this->start_controls_section( 'style_gallery', [ 'label' => esc_html__( 'Gallery Cards', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_responsive_control( 'card_width', [ 'label' => esc_html__( 'Card Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%', 'vw', 'rem'], 'range' => ['px'=>['min'=>50,'max'=>500]], 'desktop_default' => ['size' => 160, 'unit' => 'px'], 'tablet_default' => ['size' => 120, 'unit' => 'px'], 'mobile_default' => ['size' => 80, 'unit' => 'px'], 'selectors' => ['{{WRAPPER}} .aafe-bounce-image-content__card' => 'width: {{SIZE}}{{UNIT}};'], ] ); $this->add_responsive_control( 'card_height', [ 'label' => esc_html__( 'Card Height', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', 'vh', 'rem'], 'range' => ['px'=>['min'=>50,'max'=>600]], 'desktop_default' => ['size' => 180, 'unit' => 'px'], 'tablet_default' => ['size' => 140, 'unit' => 'px'], 'mobile_default' => ['size' => 100, 'unit' => 'px'], 'selectors' => ['{{WRAPPER}} .aafe-bounce-image-content__card' => 'height: {{SIZE}}{{UNIT}};'], ] ); $this->add_responsive_control( 'card_overlap', [ 'label' => esc_html__( 'Overlap (Negative Margin)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => [ 'px', '%' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200 ] ], 'desktop_default' => [ 'size' => 40, 'unit' => 'px' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__card-wrapper + .aafe-bounce-image-content__card-wrapper' => 'margin-left: -{{SIZE}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'card_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__card' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'card_shadow', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__card', ] ); $this->add_responsive_control( 'gallery_margin', [ 'label' => esc_html__( 'Gallery Container Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__gallery' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_control( 'heading_label_style', [ 'label' => esc_html__( 'Floating Labels', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'label_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__label', ] ); $this->start_controls_tabs( 'tabs_label_style' ); // Normal Tab $this->start_controls_tab( 'tab_label_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ) ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'label_shadow', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__label', ] ); $this->end_controls_tab(); // Hover Tab $this->start_controls_tab( 'tab_label_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'label_hover_text_color', [ 'label' => esc_html__( 'Text Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__label:hover' => 'color: {{VALUE}} !important;' ], ] ); $this->add_control( 'label_hover_bg_color', [ 'label' => esc_html__( 'Background Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__label:hover' => 'background-color: {{VALUE}} !important;', '{{WRAPPER}} .aafe-bounce-image-content__label:hover::after' => 'border-top-color: {{VALUE}} !important;' ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'label_hover_shadow', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__label:hover', ] ); $this->add_control( 'label_hover_scale', [ 'label' => esc_html__( 'Hover Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.0, 'max' => 1.5, 'step' => 0.05 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__label:hover' => 'transform: scale({{SIZE}});' ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'label_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__label' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->add_responsive_control( 'label_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__label' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ], ] ); $this->end_controls_section(); // ========================================== // STYLE: Description // ========================================== $this->start_controls_section( 'style_desc', [ 'label' => esc_html__( 'Description', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_responsive_control( 'desc_align', [ 'label' => esc_html__( 'Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'left' => [ 'title' => 'Left', 'icon' => 'eicon-text-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-text-align-center' ], 'right' => [ 'title' => 'Right', 'icon' => 'eicon-text-align-right' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__desc' => 'text-align: {{VALUE}};' ], ] ); $this->add_control( 'desc_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__desc' => 'color: {{VALUE}};' ], ] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'desc_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__desc', ] ); $this->add_responsive_control( 'desc_width', [ 'label' => esc_html__( 'Max Width', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'size_units' => ['px', '%'], 'range' => ['px'=>['min'=>0,'max'=>1000]], 'selectors' => ['{{WRAPPER}} .aafe-bounce-image-content__desc' => 'max-width: {{SIZE}}{{UNIT}}; margin-left: auto; margin-right: auto;'], ] ); $this->add_responsive_control( 'desc_margin', [ 'label' => esc_html__( 'Margin', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__desc' => 'margin: {{TOP}}{{UNIT}} auto {{BOTTOM}}{{UNIT}} auto;' ], ] ); $this->end_controls_section(); // ========================================== // STYLE: Buttons // ========================================== $this->start_controls_section( 'style_buttons', [ 'label' => esc_html__( 'Buttons', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_responsive_control( 'btns_align', [ 'label' => esc_html__( 'Alignment', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::CHOOSE, 'options' => [ 'flex-start' => [ 'title' => 'Left', 'icon' => 'eicon-h-align-left' ], 'center' => [ 'title' => 'Center', 'icon' => 'eicon-h-align-center' ], 'flex-end' => [ 'title' => 'Right', 'icon' => 'eicon-h-align-right' ], ], 'default' => 'center', 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btns' => 'justify-content: {{VALUE}};' ], ] ); $this->add_responsive_control( 'btns_gap', [ 'label' => esc_html__( 'Gap Between Buttons', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btns' => 'gap: {{SIZE}}px;' ], ] ); // Button 1 $this->add_control( 'heading_btn1', [ 'label' => esc_html__( 'Button 1', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn1_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn1' ] ); $this->start_controls_tabs( 'tabs_btn1' ); $this->start_controls_tab( 'tab_btn1_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'btn1_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1' => 'color: {{VALUE}};' ] ] ); $this->add_control( 'btn1_bg', [ 'label' => esc_html__( 'Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1' => 'background-color: {{VALUE}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn1_border', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn1' ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn1_shadow', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn1' ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_btn1_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'btn1_color_hover', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' => 'color: {{VALUE}};' ] ] ); $this->add_control( 'btn1_bg_hover', [ 'label' => esc_html__( 'Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' => 'background-color: {{VALUE}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn1_border_hover', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn1_shadow_hover', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' ] ); $this->add_control( 'btn1_hover_lift', [ 'label' => esc_html__( 'Hover Lift (px)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -20, 'max' => 20 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' => 'transform: translateY(-{{SIZE}}px);' ], ] ); $this->add_control( 'btn1_hover_scale', [ 'label' => esc_html__( 'Hover Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.5, 'max' => 1.5, 'step' => 0.05 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1:hover' => 'transform: scale({{SIZE}});' ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'btn1_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'btn1_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn1' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); // Button 2 $this->add_control( 'heading_btn2', [ 'label' => esc_html__( 'Button 2', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING] ); $this->add_group_control( Group_Control_Typography::get_type(), [ 'name' => 'btn2_typography', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn2' ] ); $this->start_controls_tabs( 'tabs_btn2' ); $this->start_controls_tab( 'tab_btn2_normal', [ 'label' => esc_html__( 'Normal', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'btn2_color', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2' => 'color: {{VALUE}};' ] ] ); $this->add_control( 'btn2_bg', [ 'label' => esc_html__( 'Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2' => 'background-color: {{VALUE}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn2_border', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn2' ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn2_shadow', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn2' ] ); $this->end_controls_tab(); $this->start_controls_tab( 'tab_btn2_hover', [ 'label' => esc_html__( 'Hover', 'addronix-addons-for-elementor' ) ] ); $this->add_control( 'btn2_color_hover', [ 'label' => esc_html__( 'Color', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' => 'color: {{VALUE}};' ] ] ); $this->add_control( 'btn2_bg_hover', [ 'label' => esc_html__( 'Background', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' => 'background-color: {{VALUE}};' ] ] ); $this->add_group_control( Group_Control_Border::get_type(), [ 'name' => 'btn2_border_hover', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'btn2_shadow_hover', 'selector' => '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' ] ); $this->add_control( 'btn2_hover_lift', [ 'label' => esc_html__( 'Hover Lift (px)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -20, 'max' => 20 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' => 'transform: translateY(-{{SIZE}}px);' ], ] ); $this->add_control( 'btn2_hover_scale', [ 'label' => esc_html__( 'Hover Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.5, 'max' => 1.5, 'step' => 0.05 ] ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2:hover' => 'transform: scale({{SIZE}});' ], ] ); $this->end_controls_tab(); $this->end_controls_tabs(); $this->add_responsive_control( 'btn2_padding', [ 'label' => esc_html__( 'Padding', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->add_responsive_control( 'btn2_radius', [ 'label' => esc_html__( 'Border Radius', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%' ], 'selectors' => [ '{{WRAPPER}} .aafe-bounce-image-content__btn2' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};' ] ] ); $this->end_controls_section(); // ========================================== // STYLE: Hover Effects // ========================================== $this->start_controls_section( 'style_hover_effects', [ 'label' => esc_html__( 'Hover Effects', 'addronix-addons-for-elementor' ), 'tab' => Controls_Manager::TAB_STYLE ] ); $this->add_control( 'hover_duration', [ 'label' => esc_html__( 'Transition Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 100, 'max' => 800 ] ], 'default' => [ 'size' => 400 ], ] ); $this->add_control( 'hover_lift', [ 'label' => esc_html__( 'Lift Amount (Y-Axis)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0, 'max' => 100 ] ], 'default' => [ 'size' => 20 ], ] ); $this->add_control( 'hover_scale', [ 'label' => esc_html__( 'Scale Amount', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 1.00, 'max' => 1.50, 'step' => 0.01 ] ], 'default' => [ 'size' => 1.05 ], ] ); $this->add_group_control( Group_Control_Box_Shadow::get_type(), [ 'name' => 'card_hover_shadow', 'label' => esc_html__( 'Hover Shadow', 'addronix-addons-for-elementor' ), 'selector' => '{{WRAPPER}} .aafe-bounce-image-content-wrapper .aafe-bounce-image-content__card-wrapper:hover .aafe-bounce-image-content__card', ] ); $this->add_control( 'heading_label_popup', [ 'label' => esc_html__( 'Label Popup Animation', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::HEADING, ] ); $this->add_control( 'label_popup_duration', [ 'label' => esc_html__( 'Popup Duration (ms)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 100, 'max' => 1500 ] ], 'default' => [ 'size' => 500 ], ] ); $this->add_control( 'label_popup_y', [ 'label' => esc_html__( 'Starting Y Offset (px)', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => -50, 'max' => 100 ] ], 'default' => [ 'size' => 20 ], ] ); $this->add_control( 'label_popup_scale', [ 'label' => esc_html__( 'Starting Scale', 'addronix-addons-for-elementor' ), 'type' => Controls_Manager::SLIDER, 'range' => [ 'px' => [ 'min' => 0.1, 'max' => 1.5, 'step' => 0.05 ] ], 'default' => [ 'size' => 0.7 ], ] ); $this->end_controls_section(); } protected function render() { $s = $this->get_settings_for_display(); $hover_scale = ! empty( $s['hover_scale']['size'] ) ? $s['hover_scale']['size'] : 1.05; $hover_lift = isset( $s['hover_lift']['size'] ) && is_numeric( $s['hover_lift']['size'] ) ? $s['hover_lift']['size'] : 20; $hover_dur = ! empty( $s['hover_duration']['size'] ) ? $s['hover_duration']['size'] : 400; $spread_d = ! empty( $s['fan_spread']['size'] ) ? $s['fan_spread']['size'] : 6; $spread_t = isset( $s['fan_spread_tablet']['size'] ) && is_numeric( $s['fan_spread_tablet']['size'] ) ? $s['fan_spread_tablet']['size'] : $spread_d; $spread_m = isset( $s['fan_spread_mobile']['size'] ) && is_numeric( $s['fan_spread_mobile']['size'] ) ? $s['fan_spread_mobile']['size'] : $spread_t; $lbl_dur = ! empty( $s['label_popup_duration']['size'] ) ? $s['label_popup_duration']['size'] : 500; $lbl_y = isset( $s['label_popup_y']['size'] ) && is_numeric( $s['label_popup_y']['size'] ) ? $s['label_popup_y']['size'] : 20; $lbl_s = isset( $s['label_popup_scale']['size'] ) && is_numeric( $s['label_popup_scale']['size'] ) ? $s['label_popup_scale']['size'] : 0.7; $this->add_render_attribute( 'wrapper', [ 'class' => 'aafe-bounce-image-content-wrapper', 'style' => '--aafe-hover-scale:' . $hover_scale . '; --aafe-hover-lift:-' . $hover_lift . 'px; --aafe-transition:' . $hover_dur . 'ms; --aafe-lbl-dur:' . $lbl_dur . 'ms; --aafe-lbl-y:' . $lbl_y . 'px; --aafe-lbl-s:' . $lbl_s . ';', ] ); $main_title_tag = ! empty( $s['main_title_tag'] ) ? $s['main_title_tag'] : 'h2'; ?>
print_render_attribute_string( 'wrapper' ); ?>> < class="aafe-bounce-image-content__title"> >
add_render_attribute( 'btn1', 'class', 'aafe-bounce-image-content__btn1' ); if ( ! empty( $s['btn1_link']['url'] ) ) { $btn1_tag = 'a'; $this->add_link_attributes( 'btn1', $s['btn1_link'] ); } ?> < print_render_attribute_string( 'btn1' ); ?>> > add_render_attribute( 'btn2', 'class', 'aafe-bounce-image-content__btn2' ); if ( ! empty( $s['btn2_link']['url'] ) ) { $btn2_tag = 'a'; $this->add_link_attributes( 'btn2', $s['btn2_link'] ); } ?> < print_render_attribute_string( 'btn2' ); ?>> >
<# var hoverScale = settings.hover_scale && settings.hover_scale.size ? settings.hover_scale.size : 1.05; var hoverLift = settings.hover_lift && settings.hover_lift.size !== '' ? settings.hover_lift.size : 20; var hoverDur = settings.hover_duration && settings.hover_duration.size ? settings.hover_duration.size : 400; var spreadD = settings.fan_spread && settings.fan_spread.size ? settings.fan_spread.size : 6; var spreadT = settings.fan_spread_tablet && settings.fan_spread_tablet.size !== '' ? settings.fan_spread_tablet.size : spreadD; var spreadM = settings.fan_spread_mobile && settings.fan_spread_mobile.size !== '' ? settings.fan_spread_mobile.size : spreadT; var lblDur = settings.label_popup_duration && settings.label_popup_duration.size ? settings.label_popup_duration.size : 500; var lblY = settings.label_popup_y && settings.label_popup_y.size !== '' ? settings.label_popup_y.size : 20; var lblS = settings.label_popup_scale && settings.label_popup_scale.size !== '' ? settings.label_popup_scale.size : 0.7; var wrapperAttrs = 'class="aafe-bounce-image-content-wrapper"'; wrapperAttrs += ' style="--aafe-hover-scale:' + hoverScale + '; --aafe-hover-lift:-' + hoverLift + 'px; --aafe-transition:' + hoverDur + 'ms; --aafe-lbl-dur:' + lblDur + 'ms; --aafe-lbl-y:' + lblY + 'px; --aafe-lbl-s:' + lblS + ';"'; var mainTitleTag = settings.main_title_tag ? settings.main_title_tag : 'h2'; #>
<# if ( settings.main_title ) { #> <{{{ mainTitleTag }}} class="aafe-bounce-image-content__title"> {{{ settings.main_title }}} <# } #> <# if ( settings.header_description ) { #>
{{{ settings.header_description }}}
<# } #> <# if ( settings.description ) { #>
{{{ settings.description }}}
<# } #>
<# if ( settings.btn1_text ) { var btn1Tag = ( settings.btn1_link && settings.btn1_link.url ) ? 'a' : 'div'; var btn1Attrs = 'class="aafe-bounce-image-content__btn1"'; if ( btn1Tag === 'a' ) btn1Attrs += ' href="' + settings.btn1_link.url + '"'; #> <{{{ btn1Tag }}} {{{ btn1Attrs }}}>{{{ settings.btn1_text }}} <# } #> <# if ( settings.btn2_text ) { var btn2Tag = ( settings.btn2_link && settings.btn2_link.url ) ? 'a' : 'div'; var btn2Attrs = 'class="aafe-bounce-image-content__btn2"'; if ( btn2Tag === 'a' ) btn2Attrs += ' href="' + settings.btn2_link.url + '"'; #> <{{{ btn2Tag }}} {{{ btn2Attrs }}}>{{{ settings.btn2_text }}} <# } #>