diff --git a/Yesod/Core.hs b/Yesod/Core.hs index 78a1f40e..2dc122e8 100644 --- a/Yesod/Core.hs +++ b/Yesod/Core.hs @@ -116,16 +116,17 @@ class Eq (Route a) => Yesod a where defaultLayout w = do p <- widgetToPageContent w mmsg <- getMessage - hamletToRepHtml [HAMLET| -!!! -%html - %head - %title $pageTitle.p$ - ^pageHead.p^ - %body - $maybe mmsg msg - %p.message $msg$ - ^pageBody.p^ + hamletToRepHtml [HAMLET|\ +\ + + +
+#{msg} + \^{pageBody p} |] -- | Gets called at the beginning of each request. Useful for logging. @@ -306,8 +307,8 @@ defaultErrorHandler NotFound = do #else [$hamlet| #endif -%h1 Not Found -%p $path'$ +
#{path'} |] defaultErrorHandler (PermissionDenied msg) = applyLayout' "Permission Denied" @@ -316,8 +317,8 @@ defaultErrorHandler (PermissionDenied msg) = #else [$hamlet| #endif -%h1 Permission denied -%p $msg$ +
#{msg} |] defaultErrorHandler (InvalidArgs ia) = applyLayout' "Invalid Arguments" @@ -326,10 +327,10 @@ defaultErrorHandler (InvalidArgs ia) = #else [$hamlet| #endif -%h1 Invalid Arguments -%ul - $forall ia msg - %li $msg$ +
#{e} |] defaultErrorHandler (BadMethod m) = applyLayout' "Bad Method" @@ -348,8 +349,8 @@ defaultErrorHandler (BadMethod m) = #else [$hamlet| #endif -%h1 Method Not Supported -%p Method "$m$" not supported +
Method "#{m}" not supported |] -- | Return the same URL if the user is authorized to see it. @@ -418,21 +419,21 @@ widgetToPageContent (GWidget w) = do #else [$hamlet| #endif -$forall scripts s - %script!src=^s^ -$forall stylesheets s - %link!rel=stylesheet!href=^s^ -$maybe style s - $maybe cssLoc s - %link!rel=stylesheet!href=$s$ +$forall s <- scripts +