hb

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: MIT Imports: 4 Imported by: 0

README

hb

HTML builder for Go

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeVisitor

type AttributeVisitor interface {
	Attr(name string, value any) error
}

type Attributes

type Attributes []func(AttributeVisitor) error

func AcceptAttr

func AcceptAttr(v string) Attributes

func AcceptCharset

func AcceptCharset(v string) Attributes

func AccessKey

func AccessKey(v string) Attributes

func Action

func Action(v string) Attributes

func Align

func Align(v string) Attributes

func Alt

func Alt(v string) Attributes

func Aria

func Aria(n, v string) Attributes

func AriaExpanded

func AriaExpanded(v string) Attributes

func AriaHidden

func AriaHidden(v string) Attributes

func AriaLabel

func AriaLabel(v string) Attributes

func Async

func Async(v bool) Attributes

func Attr

func Attr(name string, value any) Attributes

func AttrB

func AttrB(name string, value bool) Attributes

func Attr_

func Attr_(name string) Attributes

func Attrs

func Attrs(attrs ...Attributes) Attributes

func Autocomplete

func Autocomplete(v string) Attributes

func Autofocus

func Autofocus(v string) Attributes

func Autoplay

func Autoplay(v string) Attributes

func Bgcolor

func Bgcolor(v string) Attributes

func Border

func Border(v string) Attributes

func CharSet

func CharSet(v string) Attributes

func Checked

func Checked(v string) Attributes

func CiteAttr

func CiteAttr(v string) Attributes

func Class

func Class(classes ...string) Attributes

func ClassSet

func ClassSet(classes map[string]bool) Attributes

func Color

func Color(v string) Attributes

func Cols

func Cols(v string) Attributes

func Colspan

func Colspan(v string) Attributes

func Content

func Content(v string) Attributes

func Contenteditable

func Contenteditable(v string) Attributes

func Controls

func Controls(v string) Attributes

func Coords

func Coords(v string) Attributes

func Data

func Data(n string, v string) Attributes

func Data_

func Data_(v string) Attributes

func Datetime

func Datetime(v string) Attributes

func Defer

func Defer(v bool) Attributes

func DirAttr

func DirAttr(v string) Attributes

func Dirname

func Dirname(v string) Attributes

func Disabled

func Disabled(v bool) Attributes

func Download

func Download(v string) Attributes

func Draggable

func Draggable(v string) Attributes

func Dropzone

func Dropzone(v string) Attributes

func Enctype

func Enctype(v string) Attributes

func For

func For(v string) Attributes

func FormAction

func FormAction(v string) Attributes

func FormAttr

func FormAttr(v string) Attributes

func HRef

func HRef(v string) Attributes

func HTTPEquiv

func HTTPEquiv(v string) Attributes

func Headers

func Headers(v string) Attributes

func Height

func Height(v string) Attributes

func Hidden

func Hidden(v string) Attributes

func High

func High(v string) Attributes

func HrefLang

func HrefLang(v string) Attributes

func ID

func ID(v string) Attributes

func Initial

func Initial(v string) Attributes

func IsMap

func IsMap(v string) Attributes

func Kind

func Kind(v string) Attributes

func LabelAttr

func LabelAttr(v string) Attributes

func Lang

func Lang(v string) Attributes

func List

func List(v string) Attributes

func Loop

func Loop(v string) Attributes

func Low

func Low(v string) Attributes

func Max

func Max(v string) Attributes

func MaxLength

func MaxLength(v string) Attributes

func Media

func Media(v string) Attributes

func Method

func Method(v string) Attributes

func Min

func Min(v string) Attributes

func Multiple

func Multiple(v string) Attributes

func Muted

func Muted(v string) Attributes

func Name

func Name(v string) Attributes

func NoValidate

func NoValidate(v string) Attributes

func OnAbort

func OnAbort(v string) Attributes

func OnAfterPrint

func OnAfterPrint(v string) Attributes

func OnBeforePrint

func OnBeforePrint(v string) Attributes

func OnBeforeUnload

func OnBeforeUnload(v string) Attributes

func OnBlur

func OnBlur(v string) Attributes

func OnCanPlay

func OnCanPlay(v string) Attributes

func OnCanPlayThrough

func OnCanPlayThrough(v string) Attributes

func OnChange

func OnChange(v string) Attributes

func OnClick

func OnClick(v string) Attributes

func OnContextMenu

func OnContextMenu(v string) Attributes

func OnCopy

func OnCopy(v string) Attributes

func OnCueChange

func OnCueChange(v string) Attributes

func OnCut

func OnCut(v string) Attributes

func OnDblClick

func OnDblClick(v string) Attributes

func OnDrag

func OnDrag(v string) Attributes

func OnDragEnd

func OnDragEnd(v string) Attributes

func OnDragEnter

func OnDragEnter(v string) Attributes

func OnDragLeave

func OnDragLeave(v string) Attributes

func OnDragOver

func OnDragOver(v string) Attributes

func OnDragStart

func OnDragStart(v string) Attributes

func OnDrop

func OnDrop(v string) Attributes

func OnDurationChange

func OnDurationChange(v string) Attributes

func OnEmptied

func OnEmptied(v string) Attributes

func OnEnded

func OnEnded(v string) Attributes

func OnError

func OnError(v string) Attributes

func OnFocus

func OnFocus(v string) Attributes

func OnHashChange

func OnHashChange(v string) Attributes

func OnInput

func OnInput(v string) Attributes

func OnInvalid

func OnInvalid(v string) Attributes

func OnKeyDown

func OnKeyDown(v string) Attributes

func OnKeyPress

func OnKeyPress(v string) Attributes

func OnKeyUp

func OnKeyUp(v string) Attributes

func OnLoad

func OnLoad(v string) Attributes

func OnLoadStart

func OnLoadStart(v string) Attributes

func OnLoadedData

func OnLoadedData(v string) Attributes

func OnLoadedMetadata

func OnLoadedMetadata(v string) Attributes

func OnMouseDown

func OnMouseDown(v string) Attributes

func OnMouseMove

func OnMouseMove(v string) Attributes

func OnMouseOut

func OnMouseOut(v string) Attributes

func OnMouseOver

func OnMouseOver(v string) Attributes

func OnMouseUp

func OnMouseUp(v string) Attributes

func OnMouseWheel

func OnMouseWheel(v string) Attributes

func OnOffline

func OnOffline(v string) Attributes

func OnOnline

func OnOnline(v string) Attributes

func OnPageHide

func OnPageHide(v string) Attributes

func OnPageShow

func OnPageShow(v string) Attributes

func OnPaste

func OnPaste(v string) Attributes

func OnPause

func OnPause(v string) Attributes

func OnPlay

func OnPlay(v string) Attributes

func OnPlaying

func OnPlaying(v string) Attributes

func OnPopState

func OnPopState(v string) Attributes

func OnProgress

func OnProgress(v string) Attributes

func OnRateChange

func OnRateChange(v string) Attributes

func OnReset

func OnReset(v string) Attributes

func OnResize

func OnResize(v string) Attributes

func OnScroll

func OnScroll(v string) Attributes

func OnSearch

func OnSearch(v string) Attributes

func OnSeeked

func OnSeeked(v string) Attributes

func OnSeeking

func OnSeeking(v string) Attributes

func OnSelect

func OnSelect(v string) Attributes

func OnStalled

func OnStalled(v string) Attributes

func OnStorage

func OnStorage(v string) Attributes

func OnSubmit

func OnSubmit(v string) Attributes

func OnSuspend

func OnSuspend(v string) Attributes

func OnTimeUpdate

func OnTimeUpdate(v string) Attributes

func OnToggle

func OnToggle(v string) Attributes

func OnUnload

func OnUnload(v string) Attributes

func OnVolumeChange

func OnVolumeChange(v string) Attributes

func OnWaiting

func OnWaiting(v string) Attributes

func OnWheel

func OnWheel(v string) Attributes

func Open

func Open(v string) Attributes

func Optimum

func Optimum(v string) Attributes

func Pattern

func Pattern(v string) Attributes

func Placeholder

func Placeholder(v string) Attributes

func Poster

func Poster(v string) Attributes

func Preload

func Preload(v string) Attributes

func Readonly

func Readonly(v bool) Attributes

func Rel

func Rel(v string) Attributes

func Required

func Required(v bool) Attributes

func Reversed

func Reversed(v bool) Attributes

func Role

func Role(v string) Attributes

func RowSpan

func RowSpan(v string) Attributes

func Rows

func Rows(v string) Attributes

func Sandbox

func Sandbox(v string) Attributes

func Scope

func Scope(v string) Attributes

func Selected

func Selected(v bool) Attributes

func Shape

func Shape(v string) Attributes

func Size

func Size(v string) Attributes

func Sizes

func Sizes(v string) Attributes

func SpanAttr

func SpanAttr(v string) Attributes

func Spellcheck

func Spellcheck(v string) Attributes

func Src

func Src(v string) Attributes

func SrcDoc

func SrcDoc(v string) Attributes

func SrcLang

func SrcLang(v string) Attributes

func SrcSet

func SrcSet(ss map[string]string) Attributes

func Start

func Start(v string) Attributes

func Step

func Step(v string) Attributes

func StyleAttr

func StyleAttr(v string) Attributes

func TabIndex

func TabIndex(v string) Attributes

func Target

func Target(v string) Attributes

func TitleAttr

func TitleAttr(v string) Attributes

func Translate

func Translate(v string) Attributes

func Type

func Type(v string) Attributes

func UseMap

func UseMap(v string) Attributes

func Value

func Value(v string) Attributes

func Width

func Width(v string) Attributes

func Wrap

func Wrap(v string) Attributes

func (Attributes) Accept

func (as Attributes) Accept(visitor AttributeVisitor) error

func (Attributes) Append

func (as Attributes) Append(rest ...Attributes) Attributes

type ElementVisitor

type ElementVisitor interface {
	OpenTagStart(string) error
	AttributeVisitor
	OpenTagEnd() error
	OpenTagSelfClose() error
	Text(string) error
	Raw(string) error
	CloseTag(string) error
}

type HTML

type HTML []func(v ElementVisitor) error

func Abbr

func Abbr(attributes Attributes, children ...HTML) HTML

func Acronym

func Acronym(attributes Attributes, children ...HTML) HTML

func Address

func Address(attributes Attributes, children ...HTML) HTML

func Anchor

func Anchor(attributes Attributes, children ...HTML) HTML

func Area

func Area(attributes Attributes, children ...HTML) HTML

func Article

func Article(attributes Attributes, children ...HTML) HTML

func Aside

func Aside(attributes Attributes, children ...HTML) HTML

func Audio

func Audio(attributes Attributes, children ...HTML) HTML

func B

func B(attributes Attributes, children ...HTML) HTML

func BDI

func BDI(attributes Attributes, children ...HTML) HTML

func BDO

func BDO(attributes Attributes, children ...HTML) HTML

func BGSound

func BGSound(attributes Attributes, children ...HTML) HTML

func Base

func Base(attributes Attributes, children ...HTML) HTML

func BaseFont

func BaseFont(attributes Attributes, children ...HTML) HTML

func Big

func Big(attributes Attributes, children ...HTML) HTML
func Blink(attributes Attributes, children ...HTML) HTML

func BlockQuote

func BlockQuote(attributes Attributes, children ...HTML) HTML

func Body

func Body(attributes Attributes, children ...HTML) HTML

func Br

func Br(attributes ...Attributes) HTML

func Button

func Button(attributes Attributes, children ...HTML) HTML

func Canvas

func Canvas(attributes Attributes, children ...HTML) HTML

func Caption

func Caption(attributes Attributes, children ...HTML) HTML

func Center

func Center(attributes Attributes, children ...HTML) HTML

func Cite

func Cite(attributes Attributes, children ...HTML) HTML

func Code

func Code(attributes Attributes, children ...HTML) HTML

func Col

func Col(attributes Attributes, children ...HTML) HTML

func ColGroup

func ColGroup(attributes Attributes, children ...HTML) HTML

func DD

func DD(attributes Attributes, children ...HTML) HTML

func DL

func DL(attributes Attributes, children ...HTML) HTML

func DT

func DT(attributes Attributes, children ...HTML) HTML

func DataList

func DataList(attributes Attributes, children ...HTML) HTML

func Del

func Del(attributes Attributes, children ...HTML) HTML

func Details

func Details(attributes Attributes, children ...HTML) HTML

func Dfn

func Dfn(attributes Attributes, children ...HTML) HTML

func Dir

func Dir(attributes Attributes, children ...HTML) HTML

func Div

func Div(attributes Attributes, children ...HTML) HTML

func Em

func Em(attributes Attributes, children ...HTML) HTML

func Embed

func Embed(attributes Attributes, children ...HTML) HTML

func FieldSet

func FieldSet(attributes Attributes, children ...HTML) HTML

func FigCaption

func FigCaption(attributes Attributes, children ...HTML) HTML

func Figure

func Figure(attributes Attributes, children ...HTML) HTML

func Font

func Font(attributes Attributes, children ...HTML) HTML
func Footer(attributes Attributes, children ...HTML) HTML

func Form

func Form(attributes Attributes, children ...HTML) HTML

func Fragment

func Fragment(hs ...HTML) HTML

func FragmentGen

func FragmentGen(do func(yield func(HTML))) HTML

func Frame

func Frame(attributes Attributes, children ...HTML) HTML

func FrameSet

func FrameSet(attributes Attributes, children ...HTML) HTML

func H1

func H1(attributes Attributes, children ...HTML) HTML

func H2

func H2(attributes Attributes, children ...HTML) HTML

func H3

func H3(attributes Attributes, children ...HTML) HTML

func H4

func H4(attributes Attributes, children ...HTML) HTML

func H5

func H5(attributes Attributes, children ...HTML) HTML

func H6

func H6(attributes Attributes, children ...HTML) HTML

func HGroup

func HGroup(attributes Attributes, children ...HTML) HTML

func HR

func HR(attributes ...Attributes) HTML

func HTML5

func HTML5(attributes Attributes, children ...HTML) HTML
func Head(attributes Attributes, children ...HTML) HTML
func Header(attributes Attributes, children ...HTML) HTML

func Html

func Html(attributes Attributes, children ...HTML) HTML

func I

func I(attributes Attributes, children ...HTML) HTML

func IFrame

func IFrame(attributes Attributes, children ...HTML) HTML

func Img

func Img(attributes ...Attributes) HTML

func Input

func Input(attributes ...Attributes) HTML

func Ins

func Ins(attributes Attributes, children ...HTML) HTML

func IsIndex

func IsIndex(attributes Attributes, children ...HTML) HTML

func KBD

func KBD(attributes Attributes, children ...HTML) HTML

func KeyGen

func KeyGen(attributes Attributes, children ...HTML) HTML

func LI

func LI(attributes Attributes, children ...HTML) HTML

func Label

func Label(attributes Attributes, children ...HTML) HTML

func Legend

func Legend(attributes Attributes, children ...HTML) HTML
func Link(attributes ...Attributes) HTML

func Listing

func Listing(attributes Attributes, children ...HTML) HTML

func Main

func Main(attributes Attributes, children ...HTML) HTML

func Map

func Map(attributes Attributes, children ...HTML) HTML

func Mark

func Mark(attributes Attributes, children ...HTML) HTML

func Marquee

func Marquee(attributes Attributes, children ...HTML) HTML
func Menu(attributes Attributes, children ...HTML) HTML

func Meta

func Meta(attributes ...Attributes) HTML

func Meter

func Meter(attributes Attributes, children ...HTML) HTML
func Nav(attributes Attributes, children ...HTML) HTML

func NoBR

func NoBR(attributes ...Attributes) HTML

func NoFrames

func NoFrames(attributes Attributes, children ...HTML) HTML

func NoScript

func NoScript(attributes Attributes, children ...HTML) HTML

func OL

func OL(attributes Attributes, children ...HTML) HTML

func Object

func Object(attributes Attributes, children ...HTML) HTML

func OptGroup

func OptGroup(attributes Attributes, children ...HTML) HTML

func Option

func Option(attributes Attributes, children ...HTML) HTML

func Output

func Output(attributes Attributes, children ...HTML) HTML

func P

func P(attributes Attributes, children ...HTML) HTML

func Param

func Param(attributes Attributes, children ...HTML) HTML

func PlainText

func PlainText(attributes Attributes, children ...HTML) HTML

func Pre

func Pre(attributes Attributes, children ...HTML) HTML

func Progress

func Progress(attributes Attributes, children ...HTML) HTML

func Q

func Q(attributes Attributes, children ...HTML) HTML

func RP

func RP(attributes Attributes, children ...HTML) HTML

func RT

func RT(attributes Attributes, children ...HTML) HTML

func Raw

func Raw(html string) HTML

func Ruby

func Ruby(attributes Attributes, children ...HTML) HTML

func S

func S(attributes Attributes, children ...HTML) HTML

func Samp

func Samp(attributes Attributes, children ...HTML) HTML

func Script

func Script(attributes Attributes, script string) HTML

func Section

func Section(attributes Attributes, children ...HTML) HTML

func Select

func Select(attributes Attributes, children ...HTML) HTML

func Small

func Small(attributes Attributes, children ...HTML) HTML

func Source

func Source(attributes Attributes, children ...HTML) HTML

func Spacer

func Spacer(attributes Attributes, children ...HTML) HTML

func Span

func Span(attributes Attributes, children ...HTML) HTML

func Strike

func Strike(attributes Attributes, children ...HTML) HTML

func Strong

func Strong(attributes Attributes, children ...HTML) HTML

func Style

func Style(attributes Attributes, css string) HTML

func Sub

func Sub(attributes Attributes, children ...HTML) HTML

func Summary

func Summary(attributes Attributes, children ...HTML) HTML

func Sup

func Sup(attributes Attributes, children ...HTML) HTML

func TBody

func TBody(attributes Attributes, children ...HTML) HTML

func TD

func TD(attributes Attributes, children ...HTML) HTML

func TFoot

func TFoot(attributes Attributes, children ...HTML) HTML

func TH

func TH(attributes Attributes, children ...HTML) HTML

func THead

func THead(attributes Attributes, children ...HTML) HTML

func TR

func TR(attributes Attributes, children ...HTML) HTML

func TT

func TT(attributes Attributes, children ...HTML) HTML

func Table

func Table(attributes Attributes, children ...HTML) HTML

func Tag

func Tag(tagName string, attributes Attributes, children ...HTML) HTML

func Tag_

func Tag_(tagName string, attributes Attributes) HTML

func Text

func Text(value any) HTML

func Textarea

func Textarea(attributes Attributes, children ...HTML) HTML

func Time

func Time(attributes Attributes, children ...HTML) HTML

func Title

func Title(attributes Attributes, children ...HTML) HTML

func Track

func Track(attributes Attributes, children ...HTML) HTML

func U

func U(attributes Attributes, children ...HTML) HTML

func UL

func UL(attributes Attributes, children ...HTML) HTML

func Var

func Var(attributes Attributes, children ...HTML) HTML

func Video

func Video(attributes Attributes, children ...HTML) HTML

func Wbr

func Wbr(attributes ...Attributes) HTML

func (HTML) Accept

func (hs HTML) Accept(visitor ElementVisitor) error

func (HTML) Append

func (hs HTML) Append(rest ...HTML) HTML

func (HTML) RenderHTML

func (hs HTML) RenderHTML(w io.Writer) (n int, err error)

Jump to

Keyboard shortcuts

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