Documentation ¶
Index ¶
- Variables
- func ABBR(longTitle, abbreviation string) view.View
- func A_name(name string) view.String
- func B(content ...interface{}) view.View
- func CODE(content ...interface{}) view.View
- func DEL(content ...interface{}) view.View
- func DFN(content ...interface{}) view.View
- func EM(content ...interface{}) view.View
- func Element(tag string, args ...interface{}) view.View
- func Escape(text string) view.String
- func H1(content ...interface{}) view.View
- func H2(content ...interface{}) view.View
- func H3(content ...interface{}) view.View
- func H4(content ...interface{}) view.View
- func H5(content ...interface{}) view.View
- func H6(content ...interface{}) view.View
- func I(content ...interface{}) view.View
- func LABEL(label interface{}, target ViewWithID) view.Views
- func P(content ...interface{}) view.View
- func PRE(content ...interface{}) view.View
- func Q(content ...interface{}) view.View
- func RSSLink(title string, url view.URL) view.View
- func SCRIPT(javascript string) view.String
- func SECTION(class string, content ...interface{}) view.View
- func STRONG(content ...interface{}) view.View
- func STYLE(css string) view.String
- func ScriptLink(url string) view.String
- func UniqueID() string
- func WriteAttrib(writer io.Writer, name, value interface{})
- type Canvas
- type Div
- type DummyImage
- type Image
- type Link
- type List
- type Page
- type Span
- type ViewWithID
Constants ¶
This section is empty.
Variables ¶
var ( // BR creates <br/> BR = view.String("<br/>") // HR creates <hr/> HR = view.String("<hr/>") // DIVClearBoth creates <div style='clear:both'></div> DIVClearBoth = view.String("<div style='clear:both'></div>") )
var CloseTag interface{}
Functions ¶
func LABEL ¶
func LABEL(label interface{}, target ViewWithID) view.Views
LABEL creates a Label for target and returns it together with target.
func RSSLink ¶
RSSLink creates <link rel='alternate' type='application/rss+xml' title='title' href='url'>
func ScriptLink ¶
ScriptLink creates <script src='url'></script>
func WriteAttrib ¶
Types ¶
type Canvas ¶
type Div ¶
Div represents a HTML div element.
type DummyImage ¶
type DummyImage struct { ID string Class string Width int Height int BackgroundColor string ForegroundColor string Text string }
DummyImage represents a HTML img element with src utilizing http://dummyimage.com.
func NewDummyImage ¶
func NewDummyImage(width, height int) *DummyImage
type Image ¶
type Image struct { view.URL ID string Class string Width int Height int Title string OnClick string }
type Link ¶
type Link struct { view.URL UseLinkTag bool ID string Class string Title string Rel string NewWindow bool OnClick string // Name string Content view.View }
Link represents an HTML <a> or <link> element depending on UseLinkTag.
func A_blank_nofollow ¶
A_blank_nofollow creates <a href="url" target="_blank" rel="nofollow">content</a>
func A_nofollow ¶
A_nofollow creates <a href="url" rel="nofollow">content</a>
func StylesheetLink ¶
StylesheetLink creates <link rel='stylesheet' href='url'>
type List ¶
type List struct { ID string Class string Style string Ordered bool OrderOffset uint Items []view.View }
func OL ¶
func OL(items ...interface{}) *List
OL is a shortcut to create an ordered list by wrapping items as HTML views. NewView will be called for every passed item.
Example:
OL("red", "green", "blue") OL(A(url1, "First Link"), A(url2, "Second Link"))