Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Representations of a web page, covering Html, CSS & JS artifacts.
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
- newtype Css = Css {}
- renderCss :: RenderStyle -> Css -> ByteString
- cssColorScheme :: Css
- newtype Js = Js {}
- onLoad :: Js -> Js
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.12.3.0-E5Upzoz1WN63xERmXwdVK2" '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))) |
css as a string.
Instances
Monoid Css Source # | |
Semigroup Css Source # | |
Generic Css Source # | |
Show Css Source # | |
Eq Css Source # | |
type Rep Css Source # | |
Defined in Web.Rep.Page type Rep Css = D1 ('MetaData "Css" "Web.Rep.Page" "web-rep-0.12.3.0-E5Upzoz1WN63xERmXwdVK2" 'True) (C1 ('MetaCons "Css" 'PrefixI 'True) (S1 ('MetaSel ('Just "cssByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |
renderCss :: RenderStyle -> Css -> ByteString Source #
Render Css
as text.
cssColorScheme :: Css Source #
Css snippet for reponsiveness to preferred color-scheme.
Javascript as string
Instances
Monoid Js Source # | |
Semigroup Js Source # | |
Generic Js Source # | |
Show Js Source # | |
Eq Js Source # | |
type Rep Js Source # | |
Defined in Web.Rep.Page type Rep Js = D1 ('MetaData "Js" "Web.Rep.Page" "web-rep-0.12.3.0-E5Upzoz1WN63xERmXwdVK2" 'True) (C1 ('MetaCons "Js" 'PrefixI 'True) (S1 ('MetaSel ('Just "jsByteString") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ByteString))) |