Add e.g. .how-it-works.intro by default

parent 6b01ec84
......@@ -7,7 +7,7 @@ import Control.Exception.Lifted (throwIO, handle)
import Control.Monad.Reader
import Control.Monad.Trans.Resource
import Data.Char (isSpace)
import Data.Text as T
import Data.List as List (tail)
import Network.HTTP.Conduit (Manager)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
......@@ -26,6 +26,7 @@ import qualified Data.Text.Lazy.Encoding as E
import qualified Database.Persist
import qualified Settings
import qualified Yesod as Y
import qualified Data.Text as T
import Avatar
import Model.Currency
......@@ -400,3 +401,10 @@ defaultLayoutNew pageName widget = do
$(widgetFile "default/grid")
$(widgetFile "default-layout-new")
withUrlRenderer $(hamletFile "templates/default-layout-wrapper.hamlet")
where
pageClasses :: (Text, Text)
pageClasses = ("class", classes pageName)
classes = T.append "container "
. T.unwords
. List.tail
. T.splitOn "/"
<div .grid>
^{navbar}
<div .container .#{pageName}>
<div *{pageClasses}>
$maybe msg <- mmsg
<div .alert .alert-info #message>
#{msg}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment