I'd leave as it and just defer the loading of the images until you know the
viewport size.

M

On Friday, 15 November 2013, David Vella wrote:

> In commercial/app/views/fragments/travelOffer.scala.html:
>
> > -                        <h3 class="offer__title">
> > -                            <a href="@offer.offerUrl?INTCMP=ILCTOFFTXT5263I">
> > -                                @offer.title
> > -                            </a>
> > -                        </h3>
> > -                        <p class="offer__price">£@offer.fromPrice</p>
> > +        <div class="commercial__promo">
> > +            @offers.take(1).map { offer =>
> > +                <a href="@offer.offerUrl?INTCMP=ILCTOFFTXT5263I" class="lineitem__image">
> > +                    <img src="@offer.imageUrl&amp;INTCMP=ILCTOFFTXT5263I" alt="@offer.title">
> > +                </a>
> > +            }
> > +        </div>
> > +
> > +        <ul class="items">
> > +            @offers.take(4).map { offer =>
>
> Yep, you reckon we'd let the JS decide how many items to request,
> depending on container size?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/guardian/frontend/pull/2294/files#r7684810>
> .
>

Please consider the environment before printing this email.
------------------------------------------------------------------
Visit theguardian.com   

On your mobile, download the Guardian iPhone app theguardian.com/iphone and our iPad edition theguardian.com/iPad   
Save up to 33% by subscribing to the Guardian and Observer - choose the papers you want and get full digital access.
Visit subscribe.theguardian.com

This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.
 
Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.
 
Guardian News & Media Limited
 
A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP
 
Registered in England Number 908396

--------------------------------------------------------------------------