Update Splide placeholder base
Requires further updates.
This commit is contained in:
parent
081c2c77cb
commit
8ed224ba02
File diff suppressed because one or more lines are too long
@ -452,7 +452,7 @@ function fictioneer_shortcode_showcase( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -475,7 +475,7 @@ function fictioneer_shortcode_showcase( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
@ -548,7 +548,7 @@ function fictioneer_shortcode_latest_chapters( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -580,7 +580,7 @@ function fictioneer_shortcode_latest_chapters( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
@ -656,7 +656,7 @@ function fictioneer_shortcode_latest_stories( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -687,7 +687,7 @@ function fictioneer_shortcode_latest_stories( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
@ -766,7 +766,7 @@ function fictioneer_shortcode_latest_story_updates( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder ';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -797,7 +797,7 @@ function fictioneer_shortcode_latest_story_updates( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
@ -862,7 +862,7 @@ function fictioneer_shortcode_latest_recommendations( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -890,7 +890,7 @@ function fictioneer_shortcode_latest_recommendations( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
@ -1743,7 +1743,7 @@ function fictioneer_shortcode_article_cards( $attr ) {
|
||||
|
||||
// Extra classes
|
||||
if ( $args['splide'] ?? 0 ) {
|
||||
$args['classes'] .= ' splide';
|
||||
$args['classes'] .= ' splide _splide-placeholder';
|
||||
}
|
||||
|
||||
// Transient?
|
||||
@ -1765,7 +1765,7 @@ function fictioneer_shortcode_article_cards( $attr ) {
|
||||
$html = fictioneer_minify_html( ob_get_clean() );
|
||||
|
||||
if ( ( $args['splide'] ?? 0 ) && strpos( $args['classes'], 'no-auto-splide' ) === false ) {
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded", () => {document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&new Splide(e).mount()}),document.querySelector(".temp-script").remove();});</script>';
|
||||
$html .= '<script class="temp-script">document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".splide:not(.no-auto-splide, .is-initialized)").forEach(e=>{e.querySelector(".splide__list")&&"undefined"!=typeof Splide&&(e.classList.remove("_splide-placeholder"),new Splide(e).mount())}),document.querySelector(".temp-script").remove();});</script>';
|
||||
}
|
||||
|
||||
if ( FICTIONEER_SHORTCODE_TRANSIENTS_ENABLED && $args['cache'] ) {
|
||||
|
2
js/application.min.js
vendored
2
js/application.min.js
vendored
File diff suppressed because one or more lines are too long
6
js/complete.min.js
vendored
6
js/complete.min.js
vendored
File diff suppressed because one or more lines are too long
@ -2290,6 +2290,7 @@ function fcn_showAgeConfirmationModal() {
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
_$$('.splide:not(.no-auto-splide, .is-initialized)').forEach(slider => {
|
||||
if (slider.querySelector('.splide__list') && typeof Splide !== 'undefined') {
|
||||
slider.classList.remove('_splide-placeholder');
|
||||
new Splide(slider).mount();
|
||||
}
|
||||
});
|
||||
|
@ -16,7 +16,7 @@
|
||||
padding-bottom: var(--this-arrow-vertical-padding, 0px);
|
||||
padding-right: calc(var(--this-arrow-horizontal-padding, 0px) + var(--this-pagination-side-padding, 0px));
|
||||
|
||||
&:not(.is-initialized) {
|
||||
&._splide-placeholder {
|
||||
visibility: visible;
|
||||
|
||||
.splide__slide:first-child {
|
||||
|
Loading…
x
Reference in New Issue
Block a user