3{-| Functions for displaying text
9@docs plainText, asText, text, centered, justified, righted
12@docs color, typeface, height, link
15@docs monospace, 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
47link : String -> Text -> Text
48link = Native.Text.link
50{-| Set the height of text in pixels. -}
51height : Float -> Text -> Text
52height = Native.Text.height
54{-| Set the color of a string. -}
55color : Color -> Text -> Text
56color = Native.Text.color
58{-| Make a string bold. -}
60bold = Native.Text.bold
62{-| Italicize a string. -}
64italic = Native.Text.italic
66{-| Draw a line above a string. -}
67overline : Text -> Text
68overline = Native.Text.overline
70{-| Underline a string. -}
71underline : Text -> Text
72underline = Native.Text.underline
74{-| Draw a line through a string. -}
75strikeThrough : Text -> Text
76strikeThrough = Native.Text.strikeThrough
78{-| Display justified, styled text. -}
79justified : Text -> Element
80justified = Native.Text.justified
82{-| Display centered, styled text. -}
83centered : Text -> Element
84centered = Native.Text.centered
86{-| Display right justified, styled text. -}
87righted : Text -> Element
88righted = Native.Text.righted
90{-| Display styled text. -}
92text = Native.Text.text
94{-| Display a plain string. -}
95plainText : String -> Element
96plainText = Native.Text.plainText
98{-| for internal use only -}
100markdown = Native.Text.markdown
102{-| Convert anything to its textual representation and make it displayable in
105 asText == text . monospace . show
107Excellent for debugging.
110asText = 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