Last active
July 13, 2021 11:54
-
-
Save marklchaves/8cfd5fb9784250b537e8bb2c486fb433 to your computer and use it in GitHub Desktop.
Override Ashtabula Settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Keep the image and the text stacked for | |
* all display widths. | |
*/ | |
.swiper-slider-plugin__section { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
} | |
.swiper-slider-plugin-flex-card { | |
width: 90%; | |
display: flex; | |
flex-wrap: wrap; | |
align-items: center; | |
justify-content: space-evenly; | |
margin: 0 auto; /* Needed for Avada. */ | |
} | |
.swiper-slider-plugin-flex-card__text, .swiper-slider-plugin-flex-card__image { | |
width: 95%; | |
} | |
.swiper-slider-plugin-flex-card__text { | |
text-align: left; | |
padding: 1%; | |
} | |
.swiper-slider-plugin-flex-card__image { | |
background-size: contain; | |
background-repeat: no-repeat; | |
background-position: center; | |
height: 300px; | |
} | |
@media (min-width: 768px) { | |
.swiper-slider-plugin-flex-card__image { | |
height: 525px; | |
} | |
} | |
@media (min-width: 1024px) { | |
.swiper-slider-plugin-flex-card__image { | |
height: 800px; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Make the slides: | |
* 1. Slide horizontally. | |
* 2. Loop instead of rewind. | |
* 3. Manually swipe or click on nav arrows. | |
*/ | |
(function () { | |
const swiper = new Swiper(".swiper-container", { | |
direction: "horizontal", | |
loop: true, | |
// If we need pagination | |
pagination: { | |
el: ".swiper-pagination", | |
}, | |
// Navigation arrows | |
navigation: { | |
nextEl: ".swiper-button-next", | |
prevEl: ".swiper-button-prev", | |
}, | |
}); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Override Ashtabula Slider Plugin JS */ | |
function override_ashtabula_js() | |
{ | |
wp_dequeue_script('ashtabula'); | |
wp_enqueue_script('ashtabula-custom-js', get_stylesheet_directory_uri().'/js/ashtabula-custom.js', '', '1.0.0', true); | |
} | |
add_action('wp_enqueue_scripts', 'override_ashtabula_js', 100); | |
/** Override Ashtabula Slider Plugin CSS */ | |
function override_ashtabula_css() | |
{ | |
wp_dequeue_style('ashtabula-plugin'); | |
wp_enqueue_style('ashtabula-custom-css', get_stylesheet_directory_uri().'/css/ashtabula-custom.css', '', '1.0.0', 'all'); | |
} | |
add_action('wp_enqueue_scripts', 'override_ashtabula_css', 100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment