3{-| Functions for displaying text
9@docs plainText, asText, text, centered, justified, righted
12@docs color, typeface, height, link
15@docs monospace, header, bold, italic, underline, overline, strikeThrough
21import Graphics.Element (Element, Three, Pos, ElementPrim, Properties)
23import JavaScript (JSString)
28{-| Convert a string into text which can be styled and displayed. -}
29toText : String -> Text
30toText = Native.Text.toText
32{-| Set the typeface of some text. The first argument should be a comma
33separated listing of the desired typefaces:
35 "helvetica, arial, sans-serif"
37Works the same as the CSS font-family property.
39typeface : String -> Text -> Text
40typeface = Native.Text.typeface
42{-| Switch to a monospace typeface. Good for code snippets. -}
43monospace : Text -> Text
44monospace = Native.Text.monospace
46{-| Make text big and noticable. -}
48header = Native.Text.header
51link : String -> Text -> Text
52link = Native.Text.link
54{-| Set the height of text in pixels. -}
55height : Float -> Text -> Text
56height = Native.Text.height
58{-| Set the color of a string. -}
59color : Color -> Text -> Text
60color = Native.Text.color
62{-| Make a string bold. -}
64bold = Native.Text.bold
66{-| Italicize a string. -}
68italic = Native.Text.italic
70{-| Draw a line above a string. -}
71overline : Text -> Text
72overline = Native.Text.overline
74{-| Underline a string. -}
75underline : Text -> Text
76underline = Native.Text.underline
78{-| Draw a line through a string. -}
79strikeThrough : Text -> Text
80strikeThrough = Native.Text.strikeThrough
82{-| Display justified, styled text. -}
83justified : Text -> Element
84justified = Native.Text.justified
86{-| Display centered, styled text. -}
87centered : Text -> Element
88centered = Native.Text.centered
90{-| Display right justified, styled text. -}
91righted : Text -> Element
92righted = Native.Text.righted
94{-| Display styled text. -}
96text = Native.Text.text
98{-| Display a plain string. -}
99plainText : String -> Element
100plainText = Native.Text.plainText
102{-| for internal use only -}
104markdown = Native.Text.markdown
106{-| Convert anything to its textual representation and make it displayable in
109 asText == text . monospace . show
111Excellent for debugging.
114asText = 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