swipebox
swipebox copied to clipboard
Captions on mobile
I'd also like to show captions on mobile. Preferably shown when you swipe in a new slide, and auto-hide after a configurable delay.
you can show the bars on IOS, if you comment out line 180. if ( isMobile ) { $( '#swipebox-bottom-bar' ).remove(); } will only show the top bar. On android they magically still disappear, though.
Yes, but I'd like to do this without patching it – simply by extending or configuring the plugin.
I remember that this was a built-in feature.
This (https://github.com/brutaldesign/swipebox/commit/793e645c596ff90449d60ae35ce7d0b7a2b52ea0#diff-5bfca3fe782d82657f626fdc9a4d9deeR184) is the commit where the option was added to decide if to hide them or not. Now is disappeared thanks to this commit: https://github.com/brutaldesign/swipebox/commit/fb316ae01b72a5e621b7b2d9ad86d88f442f1130#diff-5bfca3fe782d82657f626fdc9a4d9deeR174
Why?
Btw for a quick and not so dirty solution, to fix this you just have to add
#swipebox-action {
...
&.visible-bars {
...
display: block !important; // <-- this!
}
...
}
...
#swipebox-caption {
...
&.visible-bars {
...
display: block !important; // <-- this!
}
}
to the swipebox scss file.
I agree. Why this option was deleted? I think it's useful enough to have an option just for mobile
Any updates?
In my js file it looks like this:
if ( isMobile && plugin.settings.removeBarsOnMobile ) {
$( '#swipebox-bottom-bar, #swipebox-top-bar' ).remove();
}
removeBarsOnMobile: false
works fine for me.
I'm with Estamel. removeBarsOnMobile: false
works great. Thank goodness, because it's important to be able to show captions on mobile!
My fault, when I did the pull request that patch was also inside :) But I forgot to add it to the documentation.
@brutaldesign do you mind to add it please?
appearantly removeBarsOnMobile: false not longer works on android. Removing all the negative positioning from the top bar also doesnt seem to help. It´s like the bars are not even created for mobile from the start.