swipebox icon indicating copy to clipboard operation
swipebox copied to clipboard

Captions on mobile

Open xim opened this issue 9 years ago • 10 comments

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.

xim avatar Oct 05 '14 15:10 xim

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.

Cranke avatar Oct 07 '14 08:10 Cranke

Yes, but I'd like to do this without patching it – simply by extending or configuring the plugin.

xim avatar Oct 08 '14 06:10 xim

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?

julianxhokaxhiu avatar Nov 10 '14 10:11 julianxhokaxhiu

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.

julianxhokaxhiu avatar Nov 10 '14 10:11 julianxhokaxhiu

I agree. Why this option was deleted? I think it's useful enough to have an option just for mobile

fernandojsg avatar Nov 22 '14 20:11 fernandojsg

Any updates?

animaonline avatar May 27 '15 16:05 animaonline

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.

tkwe avatar May 28 '15 10:05 tkwe

I'm with Estamel. removeBarsOnMobile: false works great. Thank goodness, because it's important to be able to show captions on mobile!

martynchamberlin avatar Jun 19 '15 23:06 martynchamberlin

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?

julianxhokaxhiu avatar Jun 20 '15 10:06 julianxhokaxhiu

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.

intsfanatic avatar Apr 25 '18 11:04 intsfanatic