Skip to content

Commit

Permalink
#635 Only wrap content when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
doolse committed Dec 21, 2018
1 parent 7b90cc8 commit 08beeb4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -412,12 +412,15 @@ class LegacyContentApi {

def wrapBody(context: RenderContext, body: SectionRenderable): SectionRenderable = {
val decs = Decorations.getDecorations(context)
val cbTag = context.getBody
cbTag.setId("content-body")
val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass)
val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses)

new DivRenderer(citag, new DivRenderer(cbtag, body))
if (decs.isBanner || !decs.isMenuHidden || decs.isContent) {
val cbTag = context.getBody
cbTag.setId("content-body")
val citag = new TagState("content-inner").addClass[TagState](decs.getPageLayoutDisplayClass)
val cbtag = cbTag.addClasses[TagState](decs.getContentBodyClasses)

new DivRenderer(citag, new DivRenderer(cbtag, body))
} else body
}


Expand Down

0 comments on commit 08beeb4

Please sign in to comment.