-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Organized and simple web page scaffold for blaze and lucid -- -- This is a general organization scheme for web pages, implemented for -- Lucid, and adapted for Blaze-html. -- -- It's as easy as 1-2-3: -- --
--   import Web.Page.Lucid
--   
--   λ> renderText $ template def "some content"
--   
--   ↪ "<!DOCTYPE HTML><html><head><title></title><link href
--     rel="icon"></head><body>some content</body></html>"
--   
-- -- overload the particular areas with record syntax and stuff: -- --
--   λ> let page = WebPage
--                   "foo"
--                   mempty
--                   mempty
--                   mempty
--                   mempty
--                   mempty
--                   mempty
--                   (script_ [src_ "jquery.js"] "")
--   
--   
--   λ> template page "some content"
--   
--   ↪ "<!DOCTYPE HTML><html><head><title>foo</title>
--     </head><body>some content<script
--     src=\"jquery.js\"></script></body></html>"
--   
@package webpage @version 0.0.4 module Web.Page.Types -- | 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 WebPage :: attr -> markup -> markup -> markup -> markup -> markup -> markup -> markup -> WebPage markup attr -- | Page title [pageTitle] :: WebPage markup attr -> attr -- | Favicon tags [favicon] :: WebPage markup attr -> markup -- | <meta> tags [metaVars] :: WebPage markup attr -> markup -- | JavaScript to include at the top of the page [initScripts] :: WebPage markup attr -> markup -- | JavaScript to include before <style> tags [beforeStylesScripts] :: WebPage markup attr -> markup -- | Styles [styles] :: WebPage markup attr -> markup -- | JavaScript to include after <style> tags - ie: -- Modernizr [afterStylesScripts] :: WebPage markup attr -> markup -- | JavaScript to include at the base of <body> [bodyScripts] :: WebPage markup attr -> markup instance (GHC.Classes.Ord markup, GHC.Classes.Ord attr) => GHC.Classes.Ord (Web.Page.Types.WebPage markup attr) instance (GHC.Classes.Eq markup, GHC.Classes.Eq attr) => GHC.Classes.Eq (Web.Page.Types.WebPage markup attr) instance (GHC.Show.Show markup, GHC.Show.Show attr) => GHC.Show.Show (Web.Page.Types.WebPage markup attr) instance (GHC.Base.Monoid m, GHC.Base.Monoid a) => GHC.Base.Monoid (Web.Page.Types.WebPage m a) instance (GHC.Base.Monoid m, GHC.Base.Monoid a) => Data.Default.Class.Default (Web.Page.Types.WebPage m a) module Web.Page.Lucid -- | Generic page template implemented in Lucid. template :: Monad m => WebPage (HtmlT m ()) Text -> HtmlT m () -> HtmlT m () module Web.Page.Blaze -- | You should really be using Lucid... template :: WebPage Html Text -> Html -> Html module Web.Page.Hastache -- | We choose to not interpolate the WebPage data type as a JSON -- Hastache template value because I don't want the portions of -- WebPage visible by content. template :: WebPage Text Text -> Text -> Text