el

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 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 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 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

func H2 added in v0.3.0

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

func H3 added in v0.3.0

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

func H4 added in v0.3.0

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

func H5 added in v0.3.0

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

func H6 added in v0.3.0

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

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 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 Meta added in v0.3.0

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

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 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