{-# LANGUAGE
OverloadedStrings
, ExtendedDefaultRules
#-}
module Web.Page.Types where
import Data.Default (Default (def))
-- | Generic layout for a web page. We keep the data type purely parametric to
-- allow for record-syntax overloading / reassignment, like this:
-- .
--
-- > page :: WebPage (Html ()) T.Text
-- @ page' = page \{pageTitle = "foo!"\}@
--
data WebPage markup attr attrSet = WebPage
{ pageTitle :: attr -- ^ Page title
, favicon :: markup -- ^ Favicon tags
, metaVars :: markup -- ^ @\@ tags
, initScripts :: markup -- ^ JavaScript to include at the top of the page
, beforeStylesScripts :: markup -- ^ JavaScript to include before @\