From dc78b37c87450b822e1304e11d0e1cbe8509706e Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 10 May 2023 16:45:51 +0200 Subject: [PATCH] wip #5874 @5:00 --- wp-content/mu-plugins/cube/Init.php | 1 + .../cube/Widgets/CarouselSelection.php | 52 +++++++++ .../mu-plugins/cube/Widgets/StickyNav.php | 8 +- .../resources/images/Ellipse 7.svg | 3 + .../resources/images/Groupe 33.png | Bin 0 -> 1759 bytes .../resources/images/Groupe 33.svg | 12 ++ .../resources/images/Groupe 34.png | Bin 0 -> 2321 bytes .../resources/images/Groupe 38.png | Bin 0 -> 2426 bytes .../resources/images/Groupe 39.png | Bin 0 -> 2349 bytes .../resources/images/Groupe 76.png | Bin 0 -> 1812 bytes .../resources/images/Groupe 77.png | Bin 0 -> 2257 bytes .../resources/images/Groupe 92.png | Bin 0 -> 2620 bytes .../resources/images/Groupe de masques 7.png | Bin 0 -> 51195 bytes .../resources/images/Groupe de masques 7.svg | 108 ++++++++++++++++++ .../resources/images/Trac\303\251 134.png" | Bin 0 -> 607 bytes .../resources/images/arrow-left.svg | 6 + .../resources/images/arrow-right.svg | 6 + .../resources/scripts/carousel.js | 10 -- .../resources/scripts/elementor/carousel.js | 0 .../resources/scripts/elementor/swiper.min.js | 14 +++ .../resources/styles/common/global.sass | 6 +- .../resources/styles/swiper.min.css | 13 +++ .../styles/widgets/CarouselSelection.sass | 51 +++++++++ .../resources/styles/widgets/stickyNav.sass | 3 +- .../widgets/carousel-selection.blade.php | 25 ++++ 25 files changed, 304 insertions(+), 14 deletions(-) create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Ellipse 7.svg create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 33.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 33.svg create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 34.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 38.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 39.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 76.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 77.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe 92.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe de masques 7.png create mode 100644 wp-content/themes/sycomore-fondation/resources/images/Groupe de masques 7.svg create mode 100644 "wp-content/themes/sycomore-fondation/resources/images/Trac\303\251 134.png" create mode 100644 wp-content/themes/sycomore-fondation/resources/images/arrow-left.svg create mode 100644 wp-content/themes/sycomore-fondation/resources/images/arrow-right.svg delete mode 100644 wp-content/themes/sycomore-fondation/resources/scripts/carousel.js create mode 100644 wp-content/themes/sycomore-fondation/resources/scripts/elementor/carousel.js create mode 100644 wp-content/themes/sycomore-fondation/resources/scripts/elementor/swiper.min.js create mode 100644 wp-content/themes/sycomore-fondation/resources/styles/swiper.min.css create mode 100644 wp-content/themes/sycomore-fondation/resources/styles/widgets/CarouselSelection.sass create mode 100644 wp-content/themes/sycomore-fondation/resources/views/widgets/carousel-selection.blade.php diff --git a/wp-content/mu-plugins/cube/Init.php b/wp-content/mu-plugins/cube/Init.php index 05b0489..5b7a177 100644 --- a/wp-content/mu-plugins/cube/Init.php +++ b/wp-content/mu-plugins/cube/Init.php @@ -34,6 +34,7 @@ class Setup { $widgets_manager->register(new Widgets\BlockOrganisation()); $widgets_manager->register(new Widgets\CarouselHome()); $widgets_manager->register(new Widgets\StickyNav()); + $widgets_manager->register(new Widgets\CarouselSelection()); } public function register_widgets_category($elements_manager) { diff --git a/wp-content/mu-plugins/cube/Widgets/CarouselSelection.php b/wp-content/mu-plugins/cube/Widgets/CarouselSelection.php index bde9573..cab467f 100644 --- a/wp-content/mu-plugins/cube/Widgets/CarouselSelection.php +++ b/wp-content/mu-plugins/cube/Widgets/CarouselSelection.php @@ -31,6 +31,58 @@ class CarouselSelection extends _Base 'tab' => Controls_Manager::TAB_CONTENT, ] ); + + $this->add_control( + 'title', + [ + 'label' => __( 'Title', 'elementor' ), + 'type' => Controls_Manager::TEXTAREA, + 'placeholder' => __( 'Enter your title', 'elementor' ), + 'default' => 'Lorem ipsum dolor', + ] + ); + + $repeater = new \Elementor\Repeater(); + + $repeater->add_control( + 'text', + [ + 'label' => esc_html__( 'Text content', 'cube' ), + 'type' => Controls_Manager::TEXTAREA, + 'placeholder' => esc_html__( 'Your text content', 'cube' ), + 'default' => esc_html__( 'Lorem ipsum dolor', 'cube' ), + 'label_block' => true, + 'dynamic' => [ + 'active' => true, + ], + ] + ); + + $repeater->add_control( + 'icon', + [ + 'label' => esc_html__( 'Icon', 'cube' ), + 'type' => Controls_Manager::MEDIA + ] + ); + + /* End repeater */ + $this->add_control( + 'slides', + [ + 'label' => esc_html__( 'Slides', 'cube' ), + 'type' => Controls_Manager::REPEATER, + 'fields' => $repeater->get_controls(), /* Use our repeater */ + 'default' => [], + 'title_field' => '{{{ text }}}', + ] + ); + + $this->end_controls_section(); } + public function render() { + $settings = $this->get_settings_for_display(); + echo view('widgets/carousel-selection', compact('settings')); + } } \ No newline at end of file diff --git a/wp-content/mu-plugins/cube/Widgets/StickyNav.php b/wp-content/mu-plugins/cube/Widgets/StickyNav.php index cfb768c..8c85a53 100644 --- a/wp-content/mu-plugins/cube/Widgets/StickyNav.php +++ b/wp-content/mu-plugins/cube/Widgets/StickyNav.php @@ -28,9 +28,13 @@ class StickyNav extends CarouselHome if ( $settings['slides'] ) { echo '