start_controls_section( 'section_content', [ 'label' => esc_html__( 'Content', 'nighty' ), ] ); $repeater = new \Elementor\Repeater(); $repeater->add_control( 'text', [ 'label' => esc_html__( 'Text', 'nighty' ), 'type' => \Elementor\Controls_Manager::TEXTAREA, 'default' => esc_html__( 'Your Text' , 'nighty' ), 'show_label' => true, ] ); $repeater->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'typography_content', 'selector' => '{{WRAPPER}} {{CURRENT_ITEM}}', ] ); $repeater->add_control( 'color', [ 'label' => esc_html__( 'Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} {{CURRENT_ITEM}}' => 'color: {{VALUE}}', ], ] ); $this->add_control( 'items', [ 'label' => esc_html__( 'Items', 'nighty' ), 'type' => \Elementor\Controls_Manager::REPEATER, 'fields' => $repeater->get_controls(), 'default' => [ [ 'text' => esc_html__( 'Marketing','nighty' ), ], [ 'text' => esc_html__( 'Bar', 'nighty' ), ], [ 'text' => esc_html__( 'Singing', 'nighty' ), ], [ 'text' => esc_html__( 'Song', 'nighty' ), ], [ 'text' => esc_html__( 'Arewa', 'nighty' ), ], ], ] ); $this->end_controls_section(); $this->start_controls_section( 'line_decoration_section_style', [ 'label' => esc_html__( 'Line Decoration', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_responsive_control( 'line_decoration_width', [ 'label' => esc_html__( 'Width', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 200, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-text-marquee-3 .content .line-decoration' => 'width: {{SIZE}}{{UNIT}};', ], ] ); $this->add_responsive_control( 'line_decoration_height', [ 'label' => esc_html__( 'Height', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'range' => [ 'px' => [ 'min' => 0, 'max' => 100, 'step' => 1, ], '%' => [ 'min' => 0, 'max' => 100, ], ], 'selectors' => [ '{{WRAPPER}} .ova-text-marquee-3 .content .line-decoration' => 'height: {{SIZE}}{{UNIT}};', ], ] ); $this->add_control( 'line_decoration_color', [ 'label' => esc_html__( 'Background Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::COLOR, 'selectors' => [ '{{WRAPPER}} .ova-text-marquee-3 .content .line-decoration' => 'background-color: {{VALUE}}', ], ] ); $this->add_control( 'line_decoration_margin', [ 'label' => esc_html__( 'Margin', 'nighty' ), 'type' => \Elementor\Controls_Manager::DIMENSIONS, 'size_units' => [ 'px', '%', 'em', 'rem' ], 'selectors' => [ '{{WRAPPER}} .ova-text-marquee-3 .content .line-decoration' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};', ], ] ); $this->add_group_control( \Elementor\Group_Control_Border::get_type(), [ 'name' => 'line_decoration_border', 'selector' => '{{WRAPPER}} .ova-text-marquee-3 .content .line-decoration', ] ); $this->end_controls_section(); $this->start_controls_section( 'text_section_style', [ 'label' => esc_html__( 'Text', 'nighty' ), 'tab' => \Elementor\Controls_Manager::TAB_STYLE, ] ); $this->add_group_control( \Elementor\Group_Control_Typography::get_type(), [ 'name' => 'content_typography', 'selector' => '{{WRAPPER}} .ova-text-marquee-3 .content .text', ] ); $this->add_control( 'stroke_color', [ 'label' => esc_html__( 'Stroke Color', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'white', 'options' => [ 'white' => esc_html__( 'White', 'nighty' ), 'black' => esc_html__( 'Black', 'nighty' ), ], ] ); $this->add_control( 'opacity', [ 'label' => esc_html__( 'Opacity', 'nighty' ), 'type' => \Elementor\Controls_Manager::SLIDER, 'size_units' => [ 'px'], 'range' => [ 'px' => [ 'min' => 0, 'max' => 1, 'step' => 0.01, ], ], 'selectors' => [ '{{WRAPPER}} .ova-text-marquee-3 ' => 'opacity: {{SIZE}};', ], ] ); $this->add_control( 'time_duration', [ 'label' => esc_html__( 'Time Duration', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'normal', 'options' => [ 'slow' => esc_html__( 'Slow', 'nighty' ), 'normal' => esc_html__( 'Normal', 'nighty' ), 'fast' => esc_html__( 'Fast', 'nighty' ), ], ] ); $this->add_control( 'direction', [ 'label' => esc_html__( 'Direction', 'nighty' ), 'type' => \Elementor\Controls_Manager::SELECT, 'default' => 'rtl', 'options' => [ 'ltr' => esc_html__( 'Left to Right', 'nighty' ), 'rtl' => esc_html__( 'Right to Left', 'nighty' ), ], ] ); $this->end_controls_section(); } // Render Template Here protected function render() { $settings = $this->get_settings(); $items = $settings['items']; $direction = $settings['direction']; $time_duration = $settings['time_duration']; $stroke_color = $settings['stroke_color']; ?>