Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data Page = Page {}
- data PageConfig = PageConfig {}
- defaultPageConfig :: FilePath -> PageConfig
- data Concerns a = Concerns {
- cssConcern :: a
- jsConcern :: a
- htmlConcern :: a
- suffixes :: Concerns FilePath
- concernNames :: FilePath -> FilePath -> Concerns FilePath
- data PageConcerns
- data PageStructure
- = HeaderBody
- | Headless
- | Snippet
- | Svg
- data PageRender
- type Css = StyleM ()
- data RepCss
- = RepCss Css
- | RepCssText Text
- renderCss :: Css -> Text
- renderRepCss :: PageRender -> RepCss -> Text
- newtype JS = JS {}
- data RepJs
- onLoad :: RepJs -> RepJs
- renderRepJs :: PageRender -> RepJs -> Text
- parseJs :: Text -> JS
- renderJs :: JS -> Text
Documentation
Components of a web page.
A web page can take many forms but still have the same underlying representation. For example, CSS can be linked to in a separate file, or can be inline within html, but still be the same css and have the same expected external effect. A Page represents the practical components of what makes up a static snapshot of a web page.
Instances
data PageConfig Source #
Configuration options when rendering a Page
.
PageConfig | |
|
Instances
defaultPageConfig :: FilePath -> PageConfig Source #
Default configuration is inline ecma and css, separate html header and body, minified code, with the suggested filename prefix.
A web page typically is composed of some css, javascript and html.
Concerns
abstracts this structural feature of a web page.
Concerns | |
|
Instances
concernNames :: FilePath -> FilePath -> Concerns FilePath Source #
Create filenames for each Concern element.
data PageConcerns Source #
Is the rendering to include all Concerns
(typically in a html file) or be separated (tyypically into separate files and linked in the html file)?
Instances
Generic PageConcerns Source # | |
Defined in Web.Rep.Page type Rep PageConcerns :: Type -> Type # from :: PageConcerns -> Rep PageConcerns x # to :: Rep PageConcerns x -> PageConcerns # | |
Show PageConcerns Source # | |
Defined in Web.Rep.Page showsPrec :: Int -> PageConcerns -> ShowS # show :: PageConcerns -> String # showList :: [PageConcerns] -> ShowS # | |
Eq PageConcerns Source # | |
Defined in Web.Rep.Page (==) :: PageConcerns -> PageConcerns -> Bool # (/=) :: PageConcerns -> PageConcerns -> Bool # | |
type Rep PageConcerns Source # | |
data PageStructure Source #
Various ways that a Html file can be structured.
Instances
Generic PageStructure Source # | |
Defined in Web.Rep.Page type Rep PageStructure :: Type -> Type # from :: PageStructure -> Rep PageStructure x # to :: Rep PageStructure x -> PageStructure # | |
Show PageStructure Source # | |
Defined in Web.Rep.Page showsPrec :: Int -> PageStructure -> ShowS # show :: PageStructure -> String # showList :: [PageStructure] -> ShowS # | |
Eq PageStructure Source # | |
Defined in Web.Rep.Page (==) :: PageStructure -> PageStructure -> Bool # (/=) :: PageStructure -> PageStructure -> Bool # | |
type Rep PageStructure Source # | |
Defined in Web.Rep.Page type Rep PageStructure = D1 ('MetaData "PageStructure" "Web.Rep.Page" "web-rep-0.10.2.0-B2YHxkxT2gHDHhcJpNYihj" 'False) ((C1 ('MetaCons "HeaderBody" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Headless" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Snippet" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Svg" 'PrefixI 'False) (U1 :: Type -> Type))) |
data PageRender Source #
Post-processing of page concerns
Instances
Generic PageRender Source # | |
Defined in Web.Rep.Page type Rep PageRender :: Type -> Type # from :: PageRender -> Rep PageRender x # to :: Rep PageRender x -> PageRender # | |
Show PageRender Source # | |
Defined in Web.Rep.Page showsPrec :: Int -> PageRender -> ShowS # show :: PageRender -> String # showList :: [PageRender] -> ShowS # | |
Eq PageRender Source # | |
Defined in Web.Rep.Page (==) :: PageRender -> PageRender -> Bool # (/=) :: PageRender -> PageRender -> Bool # | |
type Rep PageRender Source # | |
Defined in Web.Rep.Page type Rep PageRender = D1 ('MetaData "PageRender" "Web.Rep.Page" "web-rep-0.10.2.0-B2YHxkxT2gHDHhcJpNYihj" 'False) (C1 ('MetaCons "Pretty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Minified" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NoPost" 'PrefixI 'False) (U1 :: Type -> Type))) |
Unifies css as either a Css
or as Text.
Instances
Monoid RepCss Source # | |
Semigroup RepCss Source # | |
Generic RepCss Source # | |
Show RepCss Source # | |
type Rep RepCss Source # | |
Defined in Web.Rep.Page type Rep RepCss = D1 ('MetaData "RepCss" "Web.Rep.Page" "web-rep-0.10.2.0-B2YHxkxT2gHDHhcJpNYihj" 'False) (C1 ('MetaCons "RepCss" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Css)) :+: C1 ('MetaCons "RepCssText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
renderRepCss :: PageRender -> RepCss -> Text Source #
Render RepCss
as text.
wrapper for JSAST
Unifies javascript as JSStatement
and script as Text
.
Instances
Monoid RepJs Source # | |
Semigroup RepJs Source # | |
Generic RepJs Source # | |
Show RepJs Source # | |
Eq RepJs Source # | |
type Rep RepJs Source # | |
Defined in Web.Rep.Page type Rep RepJs = D1 ('MetaData "RepJs" "Web.Rep.Page" "web-rep-0.10.2.0-B2YHxkxT2gHDHhcJpNYihj" 'False) (C1 ('MetaCons "RepJs" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 JS)) :+: C1 ('MetaCons "RepJsText" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) |
renderRepJs :: PageRender -> RepJs -> Text Source #