4{-| Functions for displaying text
10@docs plainText, asText, text, centered, justified, righted
13@docs color, typeface, height, link
16@docs monospace, header, bold, italic, underline, overline, strikeThrough
22import Graphics.Element (Element, Three, Pos, ElementPrim, Properties)
24import JavaScript (JSString)
29{-| Convert a string into text which can be styled and displayed. -}
30toText : String -> Text
31toText = Native.Text.toText
33{-| Set the typeface of some text. The first argument should be a comma
34separated listing of the desired typefaces
36 "helvetica, arial, sans-serif"
38Works the same as the CSS font-family property.
40typeface : String -> Text -> Text
41typeface = Native.Text.typeface
43{-| Switch to a monospace typeface. Good for code snippets. -}
44monospace : Text -> Text
45monospace = Native.Text.monospace
47{-| Make text big and noticable. -}
49header = Native.Text.header
52link : String -> Text -> Text
53link = Native.Text.link
55{-| Set the height of text in pixels. -}
56height : Float -> Text -> Text
57height = Native.Text.height
59{-| Set the color of a string. -}
60color : Color -> Text -> Text
61color = Native.Text.color
63{-| Make a string bold. -}
65bold = Native.Text.bold
67{-| Italicize a string. -}
69italic = Native.Text.italic
71{-| Draw a line above a string. -}
72overline : Text -> Text
73overline = Native.Text.overline
75{-| Underline a string. -}
76underline : Text -> Text
77underline = Native.Text.underline
79{-| Draw a line through a string. -}
80strikeThrough : Text -> Text
81strikeThrough = Native.Text.strikeThrough
83{-| Display justified, styled text. -}
84justified : Text -> Element
85justified = Native.Text.justified
87{-| Display centered, styled text. -}
88centered : Text -> Element
89centered = Native.Text.centered
91{-| Display right justified, styled text. -}
92righted : Text -> Element
93righted = Native.Text.righted
95{-| Display styled text. -}
97text = Native.Text.text
99{-| Display a plain string. -}
100plainText : String -> Element
101plainText = Native.Text.plainText
103{-| for internal use only -}
105markdown = Native.Text.markdown
107{-| Convert anything to it's textual representation and make it displayable in
110 asText == text . monospace . show
112Excellent for debugging.
115asText = Native.Text.asText
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list