el

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package el provides shortcuts and helpers to common HTML elements. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element for a list of elements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A added in v0.3.0

func A(href string, children ...g.Node) g.NodeFunc

func Address added in v0.6.0

func Address(children ...g.Node) g.NodeFunc

Address returns an element with name "address" and the given children.

func Article added in v0.6.0

func Article(children ...g.Node) g.NodeFunc

Article returns an element with name "article" and the given children.

func Aside added in v0.6.0

func Aside(children ...g.Node) g.NodeFunc

Aside returns an element with name "aside" and the given children.

func B added in v0.3.0

func B(text string, children ...g.Node) g.NodeFunc

func Base added in v0.5.0

func Base(children ...g.Node) g.NodeFunc

func Body

func Body(children ...g.Node) g.NodeFunc

Body returns an element with name "body" and the given children.

func Button added in v0.5.0

func Button(children ...g.Node) g.NodeFunc

Button returns an element with name "button" and the given children.

func Div added in v0.3.0

func Div(children ...g.Node) g.NodeFunc

func Document

func Document(children ...g.Node) g.NodeFunc

Document returns an special kind of Node that prefixes its children with the string "<!doctype html>".

func Em added in v0.3.0

func Em(text string, children ...g.Node) g.NodeFunc
func Footer(children ...g.Node) g.NodeFunc

Footer returns an element with name "footer" and the given children.

func Form added in v0.5.0

func Form(action, method string, children ...g.Node) g.NodeFunc

Form returns an element with name "form", the given action and method attributes, and the given children.

func H1 added in v0.3.0

func H1(text string, children ...g.Node) g.NodeFunc

H1 returns an element with name "h1", the given text content, and the given children.

func H2 added in v0.3.0

func H2(text string, children ...g.Node) g.NodeFunc

H2 returns an element with name "h2", the given text content, and the given children.

func H3 added in v0.3.0

func H3(text string, children ...g.Node) g.NodeFunc

H3 returns an element with name "h3", the given text content, and the given children.

func H4 added in v0.3.0

func H4(text string, children ...g.Node) g.NodeFunc

H4 returns an element with name "h4", the given text content, and the given children.

func H5 added in v0.3.0

func H5(text string, children ...g.Node) g.NodeFunc

H5 returns an element with name "h5", the given text content, and the given children.

func H6 added in v0.3.0

func H6(text string, children ...g.Node) g.NodeFunc

H6 returns an element with name "h6", the given text content, and the given children.

func HGroup added in v0.6.0

func HGroup(children ...g.Node) g.NodeFunc

HGroup returns an element with name "hgroup" and the given children.

func HTML

func HTML(children ...g.Node) g.NodeFunc

HTML returns an element with name "html" and the given children.

func Head(children ...g.Node) g.NodeFunc

Head returns an element with name "head" and the given children.

func Header(children ...g.Node) g.NodeFunc

Header returns an element with name "header" and the given children.

func I added in v0.3.0

func I(text string, children ...g.Node) g.NodeFunc

func Img added in v0.3.0

func Img(src, alt string, children ...g.Node) g.NodeFunc

func Input added in v0.5.0

func Input(typ, name string, children ...g.Node) g.NodeFunc

Input returns an element with name "input", the given type and name attributes, and the given children. Note that "type" is a keyword in Go, so the parameter is called typ.

func Label added in v0.5.0

func Label(forr string, children ...g.Node) g.NodeFunc

Label returns an element with name "label", the given for attribute, and the given children. Note that "for" is a keyword in Go, so the parameter is called forr.

func Li added in v0.3.0

func Li(children ...g.Node) g.NodeFunc
func Link(children ...g.Node) g.NodeFunc

func Main added in v0.6.0

func Main(children ...g.Node) g.NodeFunc

Main returns an element with name "main" and the given children.

func Meta added in v0.3.0

func Meta(children ...g.Node) g.NodeFunc
func Nav(children ...g.Node) g.NodeFunc

Nav returns an element with name "nav" and the given children.

func Ol added in v0.3.0

func Ol(children ...g.Node) g.NodeFunc

func Option added in v0.5.0

func Option(text, value string, children ...g.Node) g.NodeFunc

Option returns an element with name "option", the given text content and value attribute, and the given children.

func P added in v0.3.0

func P(children ...g.Node) g.NodeFunc

func Progress added in v0.5.0

func Progress(value, max float64, children ...g.Node) g.NodeFunc

Progress returns an element with name "progress", the given value and max attributes, and the given children.

func Section added in v0.6.0

func Section(children ...g.Node) g.NodeFunc

Section returns an element with name "section" and the given children.

func Select added in v0.5.0

func Select(name string, children ...g.Node) g.NodeFunc

Select returns an element with name "select", the given name attribute, and the given children.

func Span added in v0.3.0

func Span(children ...g.Node) g.NodeFunc

func Strong added in v0.3.0

func Strong(text string, children ...g.Node) g.NodeFunc

func Style added in v0.3.0

func Style(children ...g.Node) g.NodeFunc

func Textarea added in v0.5.0

func Textarea(name string, children ...g.Node) g.NodeFunc

Textarea returns an element with name "textarea", the given name attribute, and the given children.

func Title

func Title(title string) g.NodeFunc

Title returns an element with name "title" and a single Text child.

func Ul added in v0.3.0

func Ul(children ...g.Node) g.NodeFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL