correcting swiperjs handle bugs
This commit is contained in:
parent
412e71633f
commit
ca72a6d8d4
|
|
@ -41,6 +41,9 @@ function tailpress_setup()
|
||||||
add_editor_style('css/editor-style.css');
|
add_editor_style('css/editor-style.css');
|
||||||
add_theme_support('widgets');
|
add_theme_support('widgets');
|
||||||
add_post_type_support('page', 'excerpt');
|
add_post_type_support('page', 'excerpt');
|
||||||
|
|
||||||
|
// add_theme_support('disable-custom-colors');
|
||||||
|
// add_theme_support('disable-custom-font-sizes');
|
||||||
}
|
}
|
||||||
|
|
||||||
add_action('after_setup_theme', 'tailpress_setup');
|
add_action('after_setup_theme', 'tailpress_setup');
|
||||||
|
|
@ -51,18 +54,22 @@ add_action('after_setup_theme', 'tailpress_setup');
|
||||||
Enqueue Theme assets 🡒 Front
|
Enqueue Theme assets 🡒 Front
|
||||||
-----------------------------------------------------------*/
|
-----------------------------------------------------------*/
|
||||||
|
|
||||||
function tailpress_enqueue_scripts()
|
function homegrade_enqueue_scripts()
|
||||||
{
|
{
|
||||||
$theme = wp_get_theme();
|
$theme = wp_get_theme();
|
||||||
|
|
||||||
wp_enqueue_script('gsap', get_template_directory_uri() . '/assets/gsap/gsap.min.js', array(), $theme->get('Version'));
|
wp_enqueue_script('gsap', get_template_directory_uri() . '/assets/gsap/gsap.min.js', array(), $theme->get('Version'));
|
||||||
|
// wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.js', array(), $theme->get('Version'));
|
||||||
|
wp_enqueue_script('swiperjssss', get_template_directory_uri() . '/assets/swiper/swiper-bundle_11.min.js', array(), $theme->get('Version'));
|
||||||
wp_enqueue_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
wp_enqueue_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
||||||
wp_enqueue_style('tailpress', tailpress_asset('css/app.css'), array(), $theme->get('Version'));
|
wp_enqueue_style('tailpress', tailpress_asset('css/app.css'), array(), $theme->get('Version'));
|
||||||
|
|
||||||
// wp_enqueue_script('tailpress', tailpress_asset('js/app.js'), array('gsap', 'jquery'), $theme->get('Version'));
|
// wp_enqueue_script('tailpress', tailpress_asset('js/app.js'), array('gsap', 'jquery'), $theme->get('Version'));
|
||||||
// wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs', 'swipercss'), $theme->get('Version'));
|
// wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs', 'swipercss'), $theme->get('Version'));
|
||||||
|
|
||||||
// #PASSING TRANSLATIONS
|
// #PASSING TRANSLATIONS
|
||||||
wp_register_script('main-app-js', tailpress_asset('js/app.js'), array('gsap', 'jquery'), $theme->get('Version'));
|
// wp_register_script('main-app-js', tailpress_asset('js/app.js'), array('gsap', 'jquery'), $theme->get('Version'));
|
||||||
|
wp_register_script('main-app-js', get_template_directory_uri() . '/js/app.js', array('gsap', 'jquery'), $theme->get('Version'));
|
||||||
|
|
||||||
$main_app_js_dynamic_datas = array(
|
$main_app_js_dynamic_datas = array(
|
||||||
'yes' => __('Oui', 'homegrade-theme__texte-fonctionnel'),
|
'yes' => __('Oui', 'homegrade-theme__texte-fonctionnel'),
|
||||||
|
|
@ -80,7 +87,8 @@ function tailpress_enqueue_scripts()
|
||||||
|
|
||||||
|
|
||||||
// SHOW THEMATIQUE
|
// SHOW THEMATIQUE
|
||||||
wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('swiperjs'), $theme->get('Version'));
|
// wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js');
|
||||||
|
wp_register_script('showthematiquejs', get_template_directory_uri() . '/template-blocks/home/show-thematiques/show-thematiques.js', array('main-app-js', 'swiperjssss'));
|
||||||
|
|
||||||
$translation_array = array(
|
$translation_array = array(
|
||||||
'previousSlide' => __('Carte précédente', 'homegrade-theme__texte-fonctionnel'),
|
'previousSlide' => __('Carte précédente', 'homegrade-theme__texte-fonctionnel'),
|
||||||
|
|
@ -94,14 +102,14 @@ function tailpress_enqueue_scripts()
|
||||||
// wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.js', array('tailpress'), $theme->get('Version'), true);
|
// wp_enqueue_script('swiperjs', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.js', array('tailpress'), $theme->get('Version'), true);
|
||||||
// wp_register_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
// wp_register_style('swipercss', get_template_directory_uri() . '/assets/swiper/swiper-bundle.min.css', array(), $theme->get('Version'));
|
||||||
}
|
}
|
||||||
add_action('wp_enqueue_scripts', 'tailpress_enqueue_scripts');
|
add_action('wp_enqueue_scripts', 'homegrade_enqueue_scripts');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -----------------------------------------------------------
|
/* -----------------------------------------------------------
|
||||||
Enqueue Theme assets 🡒 Back
|
Enqueue Theme assets 🡒 Back
|
||||||
-----------------------------------------------------------*/
|
-----------------------------------------------------------*/
|
||||||
add_action('enqueue_block_editor_assets', 'tailpress_enqueue_scripts');
|
add_action('enqueue_block_editor_assets', 'homegrade_enqueue_scripts');
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user