FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
frontend/article/app/pages/LiveBlogHtmlPage.scala at master · devhttps/frontend · GitHub
devhttps
/
frontend
Public
forked from
guardian/frontend
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
frontend
/
article
/
app
/
pages
/
LiveBlogHtmlPage.scala
Copy path
More file actions
More file actions
Latest commit
History
History
History
37 lines (30 loc) · 1.23 KB
Breadcrumbs
frontend
/
article
/
app
/
pages
/
LiveBlogHtmlPage.scala
Copy path
File metadata and controls
37 lines (30 loc) · 1.23 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package
pages
import
html
.
HtmlPage
import
html
.
HtmlPageHelpers
.
_
import
model
.
structuredData
.{
LiveBlogPosting
,
Organisation
}
import
model
.{
ApplicationContext
,
LiveBlogHelpers
,
LiveBlogPage
}
import
play
.
api
.
mvc
.
RequestHeader
import
play
.
twirl
.
api
.
Html
import
views
.
html
.
fragments
.
liveBlogHead
import
views
.
html
.
liveblog
.
liveBlogBody
object
LiveBlogHtmlPage
extends
HtmlPage
[
LiveBlogPage
] {
def
html
(
page
:
LiveBlogPage
)(
implicit
request
:
RequestHeader
,
applicationContext
:
ApplicationContext
)
:
Html
=
{
implicit
val
p
:
LiveBlogPage
=
page
val
headContent
=
liveBlogHead(
next
=
page.currentPage.pagination.flatMap(_.older).map(_.suffix).map(suffix
=>
s
"
${page.article.content.metadata}$suffix
"
),
prev
=
page.currentPage.pagination.flatMap(_.newer).map(_.suffix).map(suffix
=>
s
"
${page.article.content.metadata}$suffix
"
),
organisation
=
Html
(
Organisation
().toString()),
posting
=
Html
(
LiveBlogPosting
(
page.article,
LiveBlogHelpers
.blocksForLiveBlogRequest(page.article, request.getQueryString(
"
page
"
))
).toString()
)
)
StoryHtmlPage
.html(
maybeHeadContent
=
Some
(headContent),
header
=
guardianHeaderHtml(),
content
=
liveBlogBody(page)
)
}
}
Back
|
FazBrowse Home
|
New Git URL