html

package
v0.0.0-...-4accd01 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func A

func A(children ...htm.Fragment) htm.Fragment

func Body

func Body(children ...htm.Fragment) htm.Fragment

func Button

func Button(children ...htm.Fragment) htm.Fragment

func Code

func Code(children ...htm.Fragment) htm.Fragment

func Div

func Div(children ...htm.Fragment) htm.Fragment

func Emphasis

func Emphasis(children ...htm.Fragment) htm.Fragment

func Form

func Form(children ...htm.Fragment) htm.Fragment

func FormField

func FormField(label string, name string, opts FormOptions, children ...htm.Fragment) htm.Fragment

func FormTarget

func FormTarget(method string, target string) htm.Fragment

func H1

func H1(children ...htm.Fragment) htm.Fragment

func H2

func H2(children ...htm.Fragment) htm.Fragment

func H3

func H3(children ...htm.Fragment) htm.Fragment

func H4

func H4(children ...htm.Fragment) htm.Fragment

func H5

func H5(children ...htm.Fragment) htm.Fragment

func H6

func H6(children ...htm.Fragment) htm.Fragment
func Head(children ...htm.Fragment) htm.Fragment

func HiddenFormField

func HiddenFormField(id Id, name string, value string) htm.Fragment

func Html

func Html(children ...htm.Fragment) htm.Fragment

func JavaScript

func JavaScript(source string, children ...htm.Fragment) htm.Fragment

func JavaScriptSrc

func JavaScriptSrc(url string, children ...htm.Fragment) htm.Fragment

func Label

func Label(forId Id, text string, children ...htm.Fragment) htm.Fragment
func Link(target string, children ...htm.Fragment) htm.Fragment

func LinkCSS

func LinkCSS(url string, children ...htm.Fragment) htm.Fragment

func MetaCharset

func MetaCharset(charset string) htm.Fragment

func MetaViewport

func MetaViewport(value string) htm.Fragment

func P

func P(children ...htm.Fragment) htm.Fragment

func Pre

func Pre(children ...htm.Fragment) htm.Fragment

func Span

func Span(children ...htm.Fragment) htm.Fragment

func Strong

func Strong(children ...htm.Fragment) htm.Fragment

func Style

func Style(content string, children ...htm.Fragment) htm.Fragment

func SubmitButton

func SubmitButton(text string) htm.Fragment

func Text

func Text(s string) htm.Fragment

func Textf

func Textf(format string, a ...any) htm.Fragment

func Title

func Title(title string) htm.Fragment

Types

type FormFieldKind

type FormFieldKind string
const (
	FormFieldText          FormFieldKind = "input"
	FormFieldNumber        FormFieldKind = "number"
	FormFieldCheckbox      FormFieldKind = "checkbox"
	FormFieldMultilineText FormFieldKind = "textarea"
	FormFieldSelect        FormFieldKind = "select"
	FormFieldHidden        FormFieldKind = "hidden"
)

type FormOptions

type FormOptions struct {
	Kind          FormFieldKind
	Value         any
	Placeholder   string
	Required      bool
	LabelSameLine bool
	Options       []string
}

type Id

type Id string

func NewId

func NewId() Id

func (Id) Children

func (i Id) Children(ctx context.Context) ([]htm.Fragment, error)

func (Id) Render

func (i Id) Render(ctx context.Context, parent htm.Node) error

Jump to

Keyboard shortcuts

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