Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/guardian/frontend into jd…
…r-garnett-fixes
- Loading branch information
joshua-david
committed
Dec 12, 2017
1 parent
064a3df
commit e510193
Showing
26 changed files
with
282 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package pages | ||
|
||
import html.HtmlPageHelpers._ | ||
import html.Styles | ||
import model.{ApplicationContext, Page} | ||
import play.api.mvc.RequestHeader | ||
import play.twirl.api.Html | ||
import views.html.fragments.{_} | ||
import views.html.fragments.page._ | ||
import views.html.fragments.page.body._ | ||
import views.html.fragments.page.head.stylesheets.{criticalStyleInline, criticalStyleLink, styles} | ||
import views.html.fragments.page.head.{fixIEReferenceErrors, headTag, titleTag, weAreHiring} | ||
import html.HtmlPageHelpers.ContentCSSFile | ||
|
||
object JourneyHtmlPage { | ||
|
||
def allStyles(implicit applicationContext: ApplicationContext, request: RequestHeader): Styles = new Styles { | ||
override def criticalCssLink: Html = criticalStyleLink("identity") | ||
override def criticalCssInline: Html = criticalStyleInline(Html(common.Assets.css.head(None))) | ||
override def linkCss: Html = stylesheetLink(s"stylesheets/$ContentCSSFile.css") | ||
override def oldIECriticalCss: Html = stylesheetLink(s"stylesheets/old-ie.head.$ContentCSSFile.css") | ||
override def oldIELinkCss: Html = stylesheetLink(s"stylesheets/old-ie.$ContentCSSFile.css") | ||
override def IE9LinkCss: Html = stylesheetLink(s"stylesheets/ie9.head.$ContentCSSFile.css") | ||
override def IE9CriticalCss: Html = stylesheetLink(s"stylesheets/ie9.$ContentCSSFile.css") | ||
} | ||
|
||
def html( | ||
content: Html, | ||
maybeHeadContent: Option[Html] = None | ||
)(implicit page: Page, request: RequestHeader, applicationContext: ApplicationContext): Html = { | ||
|
||
val head: Html = maybeHeadContent.getOrElse(Html("")) | ||
val bodyClasses: Map[String, Boolean] = defaultBodyClasses() | ||
|
||
htmlTag( | ||
headTag( | ||
titleTag(), | ||
metaData(), | ||
head, | ||
styles(allStyles), | ||
fixIEReferenceErrors(), | ||
inlineJSBlocking() | ||
), | ||
bodyTag(classes = bodyClasses)( | ||
skipToMainContent(), | ||
guardianHeaderHtml(), | ||
mainContent(), | ||
content, | ||
inlineJSNonBlocking(), | ||
views.html.fragments.identitySlimFooter(), | ||
analytics.base() | ||
), | ||
devTakeShot() | ||
) | ||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import org.joda.time.LocalDate | ||
|
||
@() | ||
|
||
<footer class="manage-account-consent-slim-footer"> | ||
<div class="gs-container"> | ||
© @(new LocalDate().getYear) Guardian News and Media Limited or its affiliated companies. All rights reserved. | ||
</div> | ||
</footer> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.