Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Web.Hyperbole.View.Tag
Synopsis
- el :: View c () -> View c ()
- row :: View c () -> View c ()
- col :: View c () -> View c ()
- space :: View c ()
- pre :: Text -> View c ()
- code :: Text -> View c ()
- link :: URI -> View c () -> View c ()
- img :: Text -> View c ()
- form :: View c () -> View c ()
- input :: View c ()
- name :: Attributable h => Text -> Attributes h -> Attributes h
- value :: Attributable h => Text -> Attributes h -> Attributes h
- label :: View c () -> View c ()
- placeholder :: Attributable h => Text -> Attributes h -> Attributes h
- autofocus :: Attributable h => Attributes h -> Attributes h
- meta :: View c ()
- title :: Text -> View c ()
- content :: Attributable h => Text -> Attributes h -> Attributes h
- httpEquiv :: Attributable h => Text -> Attributes h -> Attributes h
- charset :: Attributable h => Text -> Attributes h -> Attributes h
- type_ :: Attributable h => Text -> Attributes h -> Attributes h
- src :: Attributable h => Text -> Attributes h -> Attributes h
- script :: Text -> View c ()
- script' :: ByteString -> View c ()
- style :: ByteString -> View c ()
- stylesheet :: Text -> View c ()
- nav :: View c () -> View c ()
- table :: [dt] -> TableColumns c dt () -> View c ()
- usersTable :: View c ()
- newtype Table c a = Table (View c a)
- tcol :: forall dt c. TableHead c () -> (dt -> View c ()) -> TableColumns c dt ()
- th :: View c () -> TableHead c ()
- td :: View c () -> View c ()
- newtype TableHead id a = TableHead (View id a)
- newtype TableColumns c dt a = TableColumns (Eff '[State [TableColumn c dt]] a)
- data TableColumn c dt = TableColumn {}
- ol :: ListItem c () -> View c ()
- ul :: ListItem c () -> View c ()
- li :: View c () -> ListItem c ()
- newtype ListItem c a = ListItem (View c a)
Documentation
Inputs
name :: Attributable h => Text -> Attributes h -> Attributes h Source #
value :: Attributable h => Text -> Attributes h -> Attributes h Source #
placeholder :: Attributable h => Text -> Attributes h -> Attributes h Source #
autofocus :: Attributable h => Attributes h -> Attributes h Source #
Document Metadata
content :: Attributable h => Text -> Attributes h -> Attributes h Source #
httpEquiv :: Attributable h => Text -> Attributes h -> Attributes h Source #
charset :: Attributable h => Text -> Attributes h -> Attributes h Source #
type_ :: Attributable h => Text -> Attributes h -> Attributes h Source #
src :: Attributable h => Text -> Attributes h -> Attributes h Source #
style :: ByteString -> View c () Source #
stylesheet :: Text -> View c () Source #
Navigation
Tables
table :: [dt] -> TableColumns c dt () -> View c () Source #
Create a type safe data table by specifying columns
data User = User {name :: Text, email :: Text} usersTable :: [User] -> View c () usersTable us = do table us $ do tcol (th "Name" ~ hd) $ \u -> td ~ cell $ text u.name tcol (th "Email" ~ hd) $ \u -> td ~ cell $ text u.email where hd = cell . bold cell :: (Styleable h) => CSS h -> CSS h cell = pad 4 . border 1
usersTable :: View c () Source #
newtype TableHead id a Source #
Instances
Applicative (TableHead id) Source # | |
Defined in Web.Hyperbole.View.Tag | |
Functor (TableHead id) Source # | |
Monad (TableHead id) Source # | |
Styleable (TableHead id a) Source # | |
newtype TableColumns c dt a Source #
Constructors
TableColumns (Eff '[State [TableColumn c dt]] a) |
Instances
data TableColumn c dt Source #
Constructors
TableColumn | |
Lists
ol :: ListItem c () -> View c () Source #
List elements do not include any inherent styling but are useful for accessibility. See list
.
ol id $ do let nums = list Decimal li nums "one" li nums "two" li nums "three"