blog-0.1.0.0: A custom blog generator from markup files
Safe HaskellSafe-Inferred
LanguageHaskell2010

Blog.Html.Internal

Synopsis

Data Types for HTML

newtype Html #

Constructors

Html String 

type Title = String #

newtype Head #

Constructors

Head String 

Instances

Instances details
Monoid Head # 
Instance details

Defined in Blog.Html.Internal

Methods

mempty :: Head #

mappend :: Head -> Head -> Head #

mconcat :: [Head] -> Head #

Semigroup Head # 
Instance details

Defined in Blog.Html.Internal

Methods

(<>) :: Head -> Head -> Head #

sconcat :: NonEmpty Head -> Head #

stimes :: Integral b => b -> Head -> Head #

Show Head # 
Instance details

Defined in Blog.Html.Internal

Methods

showsPrec :: Int -> Head -> ShowS #

show :: Head -> String #

showList :: [Head] -> ShowS #

Eq Head # 
Instance details

Defined in Blog.Html.Internal

Methods

(==) :: Head -> Head -> Bool #

(/=) :: Head -> Head -> Bool #

newtype Structure #

Basically a html tag that may have other "structures"

Constructors

Structure String 

Instances

Instances details
Monoid Structure # 
Instance details

Defined in Blog.Html.Internal

Semigroup Structure # 
Instance details

Defined in Blog.Html.Internal

newtype Content #

The content of html tag

Constructors

Content String 

Instances

Instances details
Monoid Content # 
Instance details

Defined in Blog.Html.Internal

Semigroup Content # 
Instance details

Defined in Blog.Html.Internal

Helper functions for our data types

render :: Html -> String #

Transforms Html data type to String

Instances to group the Structures

Html tags

html_ :: Head -> Structure -> Html #

the Html page itself

el :: String -> String -> String #

makes a custom html tag

elAttr :: String -> String -> String -> String #

sets the attributes for the tag

Structure

link_ :: FilePath -> Content -> Content #

adds the link to the tag "a"

Head

Utilities

escape :: String -> String #

Transforms special Html characters