start_controls_section(
‘section_content’,
[
‘label’ => esc_html__( ‘Scroll Settings’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
‘icon_style’,
[
‘label’ => esc_html__( ‘Icon Style’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SELECT,
‘default’ => ‘mouse’,
‘options’ => [
‘mouse’ => esc_html__( ‘Mouse Outline’, ‘angie-snippets’ ),
‘chevron’ => esc_html__( ‘Chevron (Single)’, ‘angie-snippets’ ),
‘chevrons’ => esc_html__( ‘Chevron (Double)’, ‘angie-snippets’ ),
‘arrow’ => esc_html__( ‘Arrow’, ‘angie-snippets’ ),
‘line’ => esc_html__( ‘Line’, ‘angie-snippets’ ),
],
]
);
$this->add_control(
‘animation_style’,
[
‘label’ => esc_html__( ‘Animation’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SELECT,
‘default’ => ‘bounce’,
‘options’ => [
‘bounce’ => esc_html__( ‘Bounce’, ‘angie-snippets’ ),
‘pulse’ => esc_html__( ‘Pulse’, ‘angie-snippets’ ),
‘fade’ => esc_html__( ‘Fade Loop’, ‘angie-snippets’ ),
‘slide’ => esc_html__( ‘Slide Down Loop’, ‘angie-snippets’ ),
‘none’ => esc_html__( ‘None’, ‘angie-snippets’ ),
],
]
);
$this->add_control(
‘animation_speed’,
[
‘label’ => esc_html__( ‘Animation Speed’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SELECT,
‘default’ => ‘medium’,
‘options’ => [
‘slow’ => esc_html__( ‘Slow’, ‘angie-snippets’ ),
‘medium’ => esc_html__( ‘Medium’, ‘angie-snippets’ ),
‘fast’ => esc_html__( ‘Fast’, ‘angie-snippets’ ),
],
]
);
$this->add_control(
‘show_label’,
[
‘label’ => esc_html__( ‘Show Label’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SWITCHER,
‘default’ => ‘yes’,
‘return_value’ => ‘yes’,
]
);
$this->add_control(
‘label_text’,
[
‘label’ => esc_html__( ‘Label Text’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::TEXT,
‘default’ => esc_html__( ‘Scroll’, ‘angie-snippets’ ),
‘condition’ => [ ‘show_label’ => ‘yes’ ],
]
);
$this->add_control(
‘label_position’,
[
‘label’ => esc_html__( ‘Label Position’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SELECT,
‘default’ => ‘below’,
‘options’ => [
‘above’ => esc_html__( ‘Above Icon’, ‘angie-snippets’ ),
‘below’ => esc_html__( ‘Below Icon’, ‘angie-snippets’ ),
],
‘condition’ => [ ‘show_label’ => ‘yes’ ],
]
);
$this->end_controls_section();
$this->start_controls_section(
‘section_style_indicator’,
[
‘label’ => esc_html__( ‘Style’, ‘angie-snippets’ ),
‘tab’ => \Elementor\Controls_Manager::TAB_STYLE,
]
);
$this->add_control(
‘indicator_color’,
[
‘label’ => esc_html__( ‘Color’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::COLOR,
‘default’ => ‘#000000’,
‘selectors’ => [
‘{{WRAPPER}} .scroll-indicator-17c0cff5’ => ‘color: {{VALUE}};’,
‘{{WRAPPER}} .scroll-indicator-17c0cff5 svg’ => ‘fill: {{VALUE}}; stroke: {{VALUE}};’,
‘{{WRAPPER}} .scroll-indicator-17c0cff5 path’ => ‘fill: {{VALUE}}; stroke: {{VALUE}};’,
],
]
);
$this->add_control(
‘indicator_size’,
[
‘label’ => esc_html__( ‘Size’, ‘angie-snippets’ ),
‘type’ => \Elementor\Controls_Manager::SLIDER,
‘size_units’ => [ ‘px’ ],
‘range’ => [
‘px’ => [ ‘min’ => 16, ‘max’ => 100 ],
],
‘default’ => [ ‘unit’ => ‘px’, ‘size’ => 36 ],
‘selectors’ => [
‘{{WRAPPER}} .scroll-indicator-17c0cff5-icon’ => ‘width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};’,
‘{{WRAPPER}} .scroll-indicator-17c0cff5-icon svg’ => ‘width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};’,
],
]
);
$this->add_group_control(
\Elementor\Group_Control_Typography::get_type(),
[
‘name’ => ‘label_typography’,
‘selector’ => ‘{{WRAPPER}} .scroll-indicator-17c0cff5-label’,
‘condition’ => [ ‘show_label’ => ‘yes’ ],
]
);
$this->end_controls_section();
}
protected function render() {
$settings = $this->get_settings_for_display();
$class_name = ‘scroll-indicator-17c0cff5 anim-‘ . esc_attr( $settings[‘animation_style’] ) . ‘ speed-‘ . esc_attr( $settings[‘animation_speed’] ) . ‘ pos-‘ . esc_attr( $settings[‘label_position’] );
?>