[Pro] Have a slideshow type image withing responsive layout

I’m trying to find an ‘easy’ way to have an image within my layout that changes between a few different images. Sort of like a slideshow, but I don’t want any controller or anything visible, just the image.

A long time ago, I’d have done that with the target show/hide layer and sequence timer actions, but can’t figure out how to use a similar technique within a responsive layout.

The image I want to change is within a wrapper HTML object, and moves depending on the breakpoints.

I’ve tried the demo of Exhibio, but don’t like it at all. The demo obviously uses the built in images and breaks my sites ‘responsiveness’ completely! And also, the exhibio slideshow makes the whole site feel slow and clunky when you resize. The moment I removed it, the site returned to being much smoother to resize.

So, what do you use when you just want a simple image to change in place without using layers?

Thanks :slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I tried WOWSlider but that stops the smooth scroll feature from working.

Fix one thing, break another! :wink:

I think I’ll stick with smooth scrolling for now.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’d be inclined to try NewsCycle for this. It’s very lightweight and format-agnostic, so the fact that you are cycling between images should not matter to it one bit. It’s also based on Scriptaculous, so it won’t conflict with the SmoothScroll Action. Pair both of these Actions with the Protaculous Update Action to get the very latest versions of these libraries – Prototype in particular has been updated recently for IE 11 and 10, and that’s a good thing!

If you haven’t used NewsCycle before, it’s a cross-fade animation between elements defined in a separate element. To wit: you draw an HTML box where you want the effect to appear, and put a single element inside that box as a placeholder. Then elsewhere on the same page, you make another box and populate that with a list of – anything. Any sort of element that you can put into a box, be it a stack of inline DIVs (what we will use here) or an HTML list of text (news items, hence the name), or images, or just a bunch of paragraphs, whatever the multiple content is in this source box, the Action will use as the items to iterate over. You apply the Action to the element that is placed in your layout where you want the effect to appear, and you use the Action interface to select the source element, which must be a layer elsewhere on the page.

As far as making a responsive image goes, the easiest* way I can imagine to do this would be as follows:

  1. Draw your NewsCycle “source” element off-screen somewhere, and double-click inside it to get a text cursor.
  2. From the main menu, choose Insert / HTML Item. Click once on the inline 100px square box to get its handles showing.
  3. Set its width to Fixed % (100%), and its height to some junk value (leave it at 100px, maybe).
  4. Apply your first photo as a background to that element, using the Inspector. Set the options to center/center no-repeat.
  5. While the inline element is still selected, choose Item / Extended from the main menu. Make sure the
    tab is selected. Add the following properties (whatever is left of the colon goes in Name, whatever is right of the colon goes in Value, the colon itself is here only to show you that split):
    • background-size: cover
    • height: 0
    • padding-top: 33%

A special note about that 33% above – it’s almost certainly not what you need here. You need to calculate the ratio between the width and the height of your photo, and use that instead. It also means that your images all need to be roughly the same proportions (but background-size: cover will make up for any variation). What this trick does is make a proportionally-scaling image that will always fill its container from left to right, and always maintain the same aspect ratio as it scales.

Now, because you have followed these steps, and thus have built up something that you can re-use, simply copy the inline box (make sure its handles are still showing when you do this) and then double-click in the parent (NewsCycle source box) so you get the text cursor again, and paste as many times as you have additional photos. After you’ve done this, you can click on each one in turn and change the background image source using the Inspector. So it takes you minutes to set up the first one, and seconds for each of the others.

Finally, in your layout, make sure that the element that you apply NewsCycle to is itself set up for all the responsive goodness that you need. You do not need to worry about the source element again (it’s off-screen and will be removed from the visible layout when you view it in a browser) and you don’t need to worry about your individual images – they will always scale correctly to fit their container. Your slideshow element needs to have the responsive breakpoints defined, and all you should need to do is change its width at each spot, and leave its height as flexible.

I don’t have Freeway in front of me at the moment, but off the top of my head, this should just work.

Walter

*Yes, I know: for certain definitions of “easy”.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

That sounds great, thank you.

I will try it when I get back to the office tomorrow morning!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Here’s an example of the auto-scaling image that I did a few months ago:

http://scripty.walterdavisstudio.com/image-scaling.html

Walter

On Sep 24, 2014, at 8:18 AM, waltd email@hidden wrote:

What this trick does is make a proportionally-scaling image that will always fill its container from left to right, and always maintain the same aspect ratio as it scales.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Many thanks.

I’ve been trying all morning, but can’t get it to work!

I’ve installed the protaculous update action.

I think I’ve followed your instructions, but have obviously done something stupid. THe element with the newscycle action applied to it is inside a responsive HTML box.

The pictures are all in a HTML container named “SlideshowItems” on the pasteboard.

I’ve uploaded it to:

The bit that doesn’t work is in the “Filters and parts” section. Next to the text there should be a slideshow with 8 images.

I’ve set the width to 320px and the height to flexible. I’ve also tried it with the height set to both fixed % and fixed px values to see what works.

Thanks again

John


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There’s a couple of different versions of Prototype in that page, which is usually a bad thing, but it’s not throwing any errors that I can see. The issue appears to be in how NewsCycle is written, and I’m now seeing that it’s not going to work for your usage. The issue is that the Action is trying to cycle the content of whatever is in the source boxes (which is nothing) rather than the boxes themselves. It’s not going to work in this case without a rewrite of the script. If I find some time this weekend, I will take a look at that. I really love the look of the page overall, you’ve done a great job with some very industrial content!

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you! I’m glad you like the site too.

Is there anything I can do to have just one prototype library? How do I find out what uploaded each one?

Thanks again.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Now I just need to find out what’s causing the CSS menu to be flaky!

On an iPhone it won’t work in portrait and in landscape it’s flaky. But if you rotate the phone back and forth it then will start working.

But it’s flaky at best!

I copied it from the Esperanto template but have made numerous tweaks!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Some of the Actions you are using on that page were written quite a few years ago, and they did not get the same updates as those that were written more recently.

NewsCycle is particularly old, also if you are using the original Carousel (shipped as part of the Protaculous Action) you should use Carousel 2, which is a stand-alone Action now, and uses the latest versions of Prototype and Script.aculo.us.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

you’ve done a great job

Totally agree - great site.

D


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

you’ve done a great job

Totally agree - great site.

Thank you :slight_smile:

I ended up using Exhibeo for the slideshows. It’s far from perfect, but I guess having it be responsive (as in feeling smooth and fast) whilst resizing isn’t a big deal really.

You only spend lots of time resizing when you’re testing the site. I’m guessing the intended targets of the site won’t bother resizing at all!


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ok testing the site on an iPhone, the slideshow generated by exhibeo messes up the layout in the 'parts and filters" section.

Does anybody know what I’m doing wrong? Is it down to the theme? The gallery below it in the ‘installations’ section works OK.

It works better on safari on the mac, but on The iPhone, The body content doesn’t stretch all the way across. It is set to 100% width.

You’d have thought that Softpress would have a solution built in for simple slideshows that worked with inline layouts.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I found a fix to using the NewsCycle in a responsive layout, but I need to make a new version of the Action (I just hand-coded a site that worked).

Walter

On Sep 26, 2014, at 9:55 AM, JohnC email@hidden wrote:

Ok testing the site on an iPhone, the slideshow generated by exhibeo messes up the layout in the 'parts and filters" section.

Does anybody know what I’m doing wrong? Is it down to the theme? The gallery below it in the ‘installations’ section works OK.

It works better on safari on the mac, but on The iPhone, The body content doesn’t stretch all the way across. It is set to 100% width.

You’d have thought that Softpress would have a solution built in for simple slideshows that worked with inline layouts.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Version 2.0 (completely different approach) is uploaded here: NewsCycle - ActionsForge

Walter

On Sep 26, 2014, at 11:12 PM, Walter Lee Davis email@hidden wrote:

I found a fix to using the NewsCycle in a responsive layout, but I need to make a new version of the Action (I just hand-coded a site that worked).

Walter

On Sep 26, 2014, at 9:55 AM, JohnC email@hidden wrote:

Ok testing the site on an iPhone, the slideshow generated by exhibeo messes up the layout in the 'parts and filters" section.

Does anybody know what I’m doing wrong? Is it down to the theme? The gallery below it in the ‘installations’ section works OK.

It works better on safari on the mac, but on The iPhone, The body content doesn’t stretch all the way across. It is set to 100% width.

You’d have thought that Softpress would have a solution built in for simple slideshows that worked with inline layouts.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You’d have thought that Softpress would have a solution built in for
simple slideshows that worked with inline layouts.

Did I mention that I’ve quite happily used the Exhibeo Slideshow theme to
make simple slideshows for my flexible inline layouts?

  1. The Berry Patch
  2. Bradford Hardware | Jewelry for Your Home

Sometimes requires extra work to get more of a ‘polished’ look, but hard to
get simpler, and totally made for Freeway.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 27 Sep 2014, 3:56 pm, waltd wrote:

Version 2.0 (completely different approach) is uploaded here: NewsCycle - ActionsForge

Walter

Wow, thanks Walter, that’s fantastic!

I’ve just tried it and it works perfectly now. Thanks again :slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Did I mention that I’ve quite happily used the Exhibeo Slideshow theme to
make simple slideshows for my flexible inline layouts?

Looks good on your site. On my site, I had trouble with the ‘SLIDE’ theme. It wouldn’t centre, no matte what I tried, and when viewed on an iPhone, it broke the layout (it made the main content wrapper smaller than the width of the page and it ‘stuck out’ of the side of the layout).

Using Walter’s newscycle fixed that. I have used another Exhibeo gallery on the same page without problems.

Perhaps it’s just the SLIDE theme, or something about my layout it didn’t like.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Ooops.

Spoke to soon; On the Mac the Newscycle item scales nicely, all the way to the smallest window you can make.

On the iPhone, however, the images are cropped not scaled.

I’ve tried manually setting the width of the container at the iPhone breakpoint but it still crops the image.

I’ve also tried turning hi-res on and off for the background images.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’ve fixed the issue above by using

background-size : contain

instead of : cover.

Seems to do the job!

Thank you Walter for all of your help.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options