Back to Frontend

@views.support.Title(page)

commercial/app/views/hosted/guardianAmpHostedGallery.scala.html

latest1.1 KB
Original Source

@import common.commercial.hosted.HostedGalleryPage @import model.ImageMedia @import model.ImageAsset @import com.gu.contentapi.client.model.v1.Asset @import com.gu.contentapi.client.model.v1.AssetType @import play.api.Mode @(page: HostedGalleryPage)(implicit request: RequestHeader, context: model.ApplicationContext) @import views.html.hosted._ @import conf.Configuration

@fragments.hostedContentsAMPMetaData(page, request, context) @views.support.Title(page) @fragments.amp.customStyles(page, page.images.headOption.map(_.url).getOrElse(""), page.cta.image, page.fontColour.hexCode) @* Baseline pageview confidence pixel. This, along with the corresponding pixels for GA/Ophan, are used to generate the confidence graphs on the frontend dashboard. *@ @guardianHostedHeader(if(page.fontColour.isDark) "hosted-gallery-page hosted-page--bright" else "hosted-gallery-page", page, isAMP = true) @for(i <- page.images.indices) { @guardianAmpHostedGalleryImage( ImageMedia.make(Seq(ImageAsset.make(Asset(AssetType.Image, Some("image/jpeg"), Some(page.images(i).url)), 0))), page.images(i), i, page) }