7      !"#$%&'()*+,-./0123456(c) 2014 Ertugrul SoeylemezBSD3"Ertugrul Soeylemez <ertesx@gmx.de>None &+-/234BEHM >Identifiers that can be used with clay, jmacro and blaze-html.iAn identifier of this type is supposed to be used for DOM ids, classes or similar names. Note that the 7e instance converts it to a JavaScript string, so that you can use it with jQuery or functions like getElementById\. When using jQuery, remember that it expects selector syntax as in the following example: myWidget :: ( HasIdStream s, MonadState s m, MonadWidget url (MySection -> Html) m ) => m () myWidget = do myId <- newId addSection MySection (H.p "My boring paragraph." ! domId myId) addStyle $ idSel myId ? background gray addStyle $ idSel myId # ".groovy" ? do background darkblue color pink fontWeight bold addScriptLink "static/jquery.js" addScript [jmacro| fun init -> window.setTimeout (\() { $("#" + `myId`).addClass("groovy"); $(".groovy").text("My groooovy paragraph!") }) 2500; $(init) |]BInstances of this class are types that embed an identifier stream. Lens into the identifier stream.HTML5 class+ attribute containing the given identifier.*Class refinement for the given identifier.(Class selector for the given identifier.1Custom attribute containing the given identifier. HTML5 id+ attribute containing the given identifier. HTML5 data attribute (data-*") containing the given identifier. 'Id refinement for the given identifier. %Id selector for the given identifier. ~Infinite stream of identifiers built from the given character set. The stream is sorted by identifier length, shortest first.Fetches the next identifier. 89    89(c) 2014 Ertugrul SoeylemezBSD3"Ertugrul Soeylemez <ertesx@gmx.de>None &+-/234BEHM5Convenient type alias for polymorphic widget actions.A widget is a self-contained fragment of a web page together with its scripts and styles. This type is inspired by Yesod's widgets, but is supposed to be constructed by using a writer monad and does not denote effects of its own.=To construct widgets through a writer monad, you can use the add* functions like  or : sdo addSection "header" (H.h1 "My fancy header") addStyle $ html ? do background yellow color black0Alternatively use can use lens combinators like : and ;" together with widget lenses like * and +: do scribe (wSection "header") (H.h1 "My fancy header") scribe wStyle $ html ? do background yellow color black"The title is constructed by using ' and $n. This allows you to have a hierarchy of titles with a site title, a page title and even a component title: withTitle "My site title" $ withTitle "My department title" $ setTitle "My page title" addSection "header" (H.h1 "My page title")The first type argument urlw is the type of URLs. You may use it for type-safe routing. If you don't use type-safe routing, you can simply use <.The second type argument h2 is the body type. For simple pages you can use =b, but this widget type allows you to have more complicated bodies, as long as you reduce them to =F at some point. For example this library predefines functions like  and ! to allow you to construct individual page sections separately and then merge them. You can use it for example to divide your document into a header, a menu, a content area and a footer, and every widget can contribute to each of those sections separately.Another way to use this is to construct your body using a completely different document type, for example a Pandoc document, then later convert it to =. Markup body. Head content.Inline scripts.External scripts. Stylesheet.External stylesheets.$Page title chunks (outermost first)./Convenient constraint alias for widget actions.YConstruct a widget with the given body. Use this combinator if you don't need sections..Construct a widget with the given head markup.)Construct a widget with the given script..Construct a widget with the given script link./Construct a widget with the given body section.-Construct a widget with the given stylesheet. -Construct a widget with the given style link.!Flatten the given widget's body by joining the given sections into a single section. It's valid to list sections more than once."7Map the given action over all URLs in the given widget.#Monadic version of ".$vScribe the title of the widget. Use this function to construct the lowest level title. For higher level titles use '%. The most recently set title wins.%Lens into a widget's body.&Lens into a widget's head.'Prepend the given title chunk to the given widget action. Conceptually this wraps the given widget in a higher level title. Use $ for the lowest level title.(#Lens into a widget's inline script.)&Lens into a widget's external scripts.*)Lens into a specific section of a widget.+"Lens into a widget's inline style.,%Lens into a widget's external styles.-Lens into a widget's title.! !"#$%&'()*+,->? !"#$%&'()*+,- $'%&()*+,-!"# !"#$%&'()*+,->?(c) 2014 Ertugrul SoeylemezBSD3"Ertugrul Soeylemez <ertesx@gmx.de>None &+-/234BEHM.Rendered pages. This type supports realising a page as multiple documents like an HTML document, a separate script and a separate stylesheet, as explained above.If you're running a low-traffic site and don't want to afford the complexity, then you can just include the stylesheets and scripts inline by using the 3 function. Except for external script and style URLs this will give you a self-contained document that you can deliver to the client.The 0 field is the function that takes the markup for the script and the style respectively and returns a builder that you can send as  text/html to the client. The other two fields are the rendered script and stylesheet. The markup is UTF-8-encoded, which you should indicate in the  content-type. header, if you deliver via HTTP, although a meta# element is included as a fallback.0Markup document.1 Page script.2Page stylesheet.3Realise the given page as a single self-contained document, including the script and stylesheet inline. The resulting string is UTF-8-encoded and contains a meta7 element to indicate that. Read the documentation of . for details.4This is the most general rendering function for widgets. The title renderer receives the title chunks from outermost to innermost.BIf you use type-safe routing and/or a sectioned or otherwise non-= body type, you should first apply the necessary transformations to perform the routing and/or flattening or conversion of the body. Note that } is a family of applicative functors. There are also predefined functions to assist you with this transformation. See the Web.Page.Route module and the ", # and ! functions.5nIntercalate the given title chunks using the given separator, highest level title first. For most web sites 6 is preferable./titleMajor " - " ["site", "department", "page"]"site - department - page"6Intercalate the given title chunks using the given separator, lowest level title first. This is much more common on web sites than 5, because it's usually more convenient for the user to have the page title in the leftmost position (think about browser tab captions and title bars)./titleMinor " - " ["site", "department", "page"]"page - department - site" ./01234Title renderer.Widget to render.56 ./0123456 ./0124563./0123456(c) 2014 Ertugrul SoeylemezBSD3"Ertugrul Soeylemez <ertesx@gmx.de>None &+-/234BEHM@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ !"#$%&'()*+,-./0123456      !"#$%&'()*+,-./01123456789:;<=>?@>?ABCDEFGHIJKLJKMJKNJKOJKPJQRJSTJSUJSVJKWJKXJQYJSZJS[JS\J]^J_`J_aJ_bJ_cJ_dJ_eJ_fJ_fJ_gJ_hJ_hJ_iJ_jJ_jJ_kJ_lJ_lJ_mJ_nJ_nJ_oJ_pJ_pJ_qJ_rJ_rJ_sJ_tJ_tJSuJSvJSwJSxJSyJSzJS{JS|JS}JS~JSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSJSweb-page-0.2.0Web.Page.GenIdWeb.Page.WidgetWeb.Page.RenderWeb.Page Identifier identifier HasIdStreamidStreamclassIdclassRefclassSelcustomIddomIddataIdidRefidSelidsFromnewId WidgetWriterWidget_wBody_wHead_wScript _wScriptLinks_wStyle _wStyleLinks_wTitle MonadWidgetaddBodyaddHead addScript addScriptLink addSectionaddStyle addStyleLink flattenBody mapLinksA mapLinksMsetTitlewBodywHead withTitlewScript wScriptLinkswSectionwStyle wStyleLinkswTitlePagepageHtml pageScript pageStyle realiseInline renderWidget titleMajor titleMinor jmacro-0.6.9Language.Javascript.JMacro.BaseToJExpr$fToJExprIdentifier$fHasIdStreamStream lens-4.4.0.2Control.Lens.Setterscribe censoring text-1.1.1.3Data.Text.InternalTextblaze-html-0.7.0.3Text.Blaze.HtmlHtml$fMonoidWidget$fApplicativeWidgetbaseGHC.Basefail>>=>>fmapreturnControl.Monad.Fixmfix Control.MonadguardliftMjoinMonadFunctorMonadFix MonadPlusmplusmzero Data.Functionfix Data.Monoid<>mconcatmappendmemptyMonoidgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLastmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<transformers-0.3.0.0Control.Monad.Trans.Classlift mtl-2.1.2Control.Monad.Writer.Classlistencensor MonadWriterpass MonadTransControl.Monad.IO.ClassMonadIOliftIOlistenstellwriter!Control.Monad.Trans.Writer.StrictWriterT runWriterTWriter runWriter execWriter mapWriter execWriterT mapWriterT