Implement Slick Slider to Tainacan Theme.
This commit is contained in:
parent
ff871d759d
commit
1f046109c2
8
build.sh
8
build.sh
|
@ -21,4 +21,10 @@ mkdir $destination/assets/vendor/bootstrap/css
|
|||
cp $destination/assets/vendor/bootstrap/scss/bootstrap.min.css $destination/assets/vendor/bootstrap/css/bootstrap.min.css
|
||||
rm -rf $destination/assets/vendor/bootstrap/scss
|
||||
|
||||
echo "Finish!!"
|
||||
##Slick
|
||||
mkdir $destination/assets/vendor/slick/css
|
||||
cp $destination/assets/vendor/slick/scss/slick.min.css $destination/assets/vendor/slick/css/slick.min.css
|
||||
cp $destination/assets/vendor/slick/scss/slick-theme.min.css $destination/assets/vendor/slick/css/slick-theme.min.css
|
||||
rm -rf $destination/assets/vendor/slick/scss
|
||||
|
||||
echo "Compilation Finish!!"
|
|
@ -16,8 +16,17 @@ echo "Compiling Sass..."
|
|||
#Style do Tema
|
||||
#cd ../../../../assets/scss
|
||||
cd src/assets/scss
|
||||
sass -E 'UTF-8' style.scss:../../style.css
|
||||
sass bootstrap_custom.scss:../vendor/bootstrap/scss/bootstrap.min.css
|
||||
sass -E 'UTF-8' style.scss:../../style.css --style compressed
|
||||
echo "Style of Tainacan Compiled";
|
||||
sass bootstrap_custom.scss:../vendor/bootstrap/scss/bootstrap.min.css --style compressed
|
||||
echo "Bootstrap Compiled";
|
||||
rm -rf .sass-cache
|
||||
cd ../vendor/slick/scss
|
||||
sass slick.scss:slick.min.css --style compressed
|
||||
sass slick-theme.scss:slick-theme.min.css --style compressed
|
||||
echo "Slick for slider carousel Compiled";
|
||||
rm -rf slick-theme.min.css.map slick.min.css.map .sass-cache/
|
||||
cd ../../../scss
|
||||
rm -rf ../../style.css.map
|
||||
|
||||
echo "Sass compilation Completed!"
|
||||
|
|
13
install.sh
13
install.sh
|
@ -12,7 +12,7 @@ if (!file_exists("src/assets/bootstrap")) {
|
|||
mkdir("src/assets/vendor/bootstrap/js", 0777, true);
|
||||
}
|
||||
|
||||
echo "\m Checking if file bootstrap navwalker exist ... \n\n";
|
||||
echo "\n Checking if file bootstrap navwalker exist ... \n\n";
|
||||
|
||||
if (!file_exists("src/vendor/class-wp-bootstrap-navwalker.php")) {
|
||||
echo "\m Copy Boostrap Navwalker ... \n\n";
|
||||
|
@ -27,8 +27,17 @@ echo "...Bootstrap\n";
|
|||
copy("vendor/twbs/bootstrap/dist/js/bootstrap.min.js", "src/assets/vendor/bootstrap/js/bootstrap.min.js");
|
||||
copy("vendor/twbs/bootstrap/assets/js/vendor/popper.min.js", "src/assets/vendor/bootstrap/js/popper.min.js");
|
||||
|
||||
echo "Copy Slick for Slider...\n\n";
|
||||
if (!file_exists("src/assets/vendor/slick")) {
|
||||
mkdir("src/assets/vendor/slick/", 0777, true);
|
||||
mkdir("src/assets/vendor/slick/scss", 0777, true);
|
||||
mkdir("src/assets/vendor/slick/js", 0777, true);
|
||||
}
|
||||
copy("vendor/kenwheeler/slick/slick/slick-theme.scss", "src/assets/vendor/slick/scss/slick-theme.scss");
|
||||
copy("vendor/kenwheeler/slick/slick/slick.scss", "src/assets/vendor/slick/scss/slick.scss");
|
||||
copy("vendor/kenwheeler/slick/slick/slick.min.js", "src/assets/vendor/slick/js/slick.min.js");
|
||||
|
||||
echo "Finish!\n\n";
|
||||
echo "Finish Copy files! \n\n";
|
||||
|
||||
function recurse_copy($src,$dst) {
|
||||
$dir = opendir($src);
|
||||
|
|
|
@ -18,18 +18,30 @@ if ( ! function_exists('tainacan_Enqueues') ) {
|
|||
wp_register_script('masonryJS', 'https://unpkg.com/masonry-layout@4.2.1/dist/masonry.pkgd.min.js', '', '4.2.1', true);
|
||||
wp_enqueue_script( 'masonryJS' );
|
||||
/**
|
||||
* Bootstrap 4
|
||||
* Bootstrap 4.1.1
|
||||
*/
|
||||
//Style
|
||||
wp_register_style('bootstrap4CSS', get_template_directory_uri() . '/assets/vendor/bootstrap/css/bootstrap.min.css', '', '4.0.0', '');
|
||||
wp_register_style('bootstrap4CSS', get_template_directory_uri() . '/assets/vendor/bootstrap/css/bootstrap.min.css', '', '4.1.1', '');
|
||||
wp_enqueue_style('bootstrap4CSS');
|
||||
//Javascript
|
||||
wp_register_script('bootstrap4JS', get_template_directory_uri() . '/assets/vendor/bootstrap/js/bootstrap.min.js', array('jquery'), '4.0.0', true);
|
||||
wp_register_script('bootstrap4JS', get_template_directory_uri() . '/assets/vendor/bootstrap/js/bootstrap.min.js', array('jquery'), '4.1.1', true);
|
||||
wp_enqueue_script('bootstrap4JS');
|
||||
//Popper
|
||||
wp_register_script('popper_bootstrap4', get_template_directory_uri() . '/assets/vendor/bootstrap/js/popper.min.js', '', '', true);
|
||||
wp_enqueue_script('popper_bootstrap4');
|
||||
|
||||
|
||||
/**
|
||||
* Slick Slider Carousel
|
||||
*/
|
||||
//Styles
|
||||
wp_register_style('SlickCss', get_template_directory_uri() . '/assets/vendor/slick/css/slick.min.css', '', '1.6.1', '');
|
||||
wp_register_style('SlickThemeCss', get_template_directory_uri() . '/assets/vendor/slick/css/slick-theme.min.css', '', '1.6.1', '');
|
||||
wp_enqueue_style('SlickCss');
|
||||
wp_enqueue_style('SlickThemeCss');
|
||||
//Javascript
|
||||
wp_register_script('SlickJS', get_template_directory_uri() . '/assets/vendor/slick/js/slick.min.js', array('jquery'), '1.6.1', true);
|
||||
wp_enqueue_script('SlickJS');
|
||||
|
||||
/**
|
||||
* Google
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue