{-# LANGUAGE
OverloadedStrings
, ExtendedDefaultRules
#-}
module Web.Page.Lucid
( module X
, template
) where
import Web.Page.Types as X
import Lucid
import qualified Data.Text as T
template :: Monad m =>
WebPage (HtmlT m ()) T.Text [Attribute]
-> HtmlT m ()
-> HtmlT m ()
template page content = doctypehtml_ $ do
head_ [] $ do
initScripts page
title_ $ toHtmlRaw $ pageTitle page
metaVars page
favicon page
beforeStylesScripts page
styles page
afterStylesScripts page
body_ (bodyStyles page) $ do
content
bodyScripts page