compton

package module
v0.2.47 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 28 Imported by: 11

README

pages

Documentation

Index

Constants

View Source
const (
	RequirementsToken = ".Requirements"
	DeferralsToken    = ".Deferrals"
	ContentToken      = ".Content"
	AttributesToken   = ".Attributes"
)
View Source
const LinkTargetTop = "_top"
View Source
const SectionLinksTitle = "⤵" // ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS

Variables

View Source
var (
	//go:embed "markup/*.html"
	DefaultMarkup embed.FS
	//go:embed "style/*.css"
	DefaultStyle embed.FS
)
View Source
var (
	Img      = Image
	ImgLazy  = ImageLazy
	ImgEager = ImageEager
)
View Source
var (
	P     = Paragraph
	PText = ParagraphText
)
View Source
var Br = Break

Functions

func ErrUnknownToken

func ErrUnknownToken(t string) error

func SetTint added in v0.2.34

func SetTint(element Element, color string)

func SpeculationRulesBytes added in v0.2.36

func SpeculationRulesBytes(hrefMatches ...string) []byte

func WriteContents

func WriteContents(r io.Reader, w io.Writer, wd TokenWriter) error

Types

type Attributes

type Attributes struct {
	// contains filtered or unexported fields
}

func (*Attributes) GetAttribute added in v0.1.20

func (a *Attributes) GetAttribute(name string) string

func (*Attributes) SetAttribute added in v0.1.20

func (a *Attributes) SetAttribute(name, val string)

func (*Attributes) Write

func (a *Attributes) Write(w io.Writer) error

type BaseElement

type BaseElement struct {
	Attributes
	ClassList
	Children []Element
	TagName  atom.Atom
	MarkupProvider
}

func NewElement

func NewElement(a atom.Atom, mp MarkupProvider) *BaseElement

func (*BaseElement) Append

func (be *BaseElement) Append(children ...Element)

func (*BaseElement) GetElementById

func (be *BaseElement) GetElementById(id string) Element

func (*BaseElement) GetElementsByClassName

func (be *BaseElement) GetElementsByClassName(names ...string) []Element

func (*BaseElement) GetElementsByTagName

func (be *BaseElement) GetElementsByTagName(tagName atom.Atom) []Element

func (*BaseElement) GetFirstElementByTagName added in v0.1.80

func (be *BaseElement) GetFirstElementByTagName(tagName atom.Atom) Element

func (*BaseElement) GetTagName

func (be *BaseElement) GetTagName() atom.Atom

func (*BaseElement) HasChildren added in v0.1.61

func (be *BaseElement) HasChildren() bool

func (*BaseElement) SetId

func (be *BaseElement) SetId(id string)

func (*BaseElement) Write

func (be *BaseElement) Write(w io.Writer) error

func (*BaseElement) WriteFragment

func (be *BaseElement) WriteFragment(t string, w io.Writer) error

type CardElement added in v0.1.90

type CardElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func Card added in v0.1.90

func Card(r Registrar, id string) *CardElement

func (*CardElement) AppendLabels added in v0.1.90

func (ce *CardElement) AppendLabels(labels ...Element) *CardElement

func (*CardElement) AppendPoster added in v0.1.90

func (ce *CardElement) AppendPoster(background, placeholder, poster string, hydrated bool) *CardElement

func (*CardElement) AppendProperty added in v0.1.90

func (ce *CardElement) AppendProperty(title string, values ...Element) *CardElement

func (*CardElement) AppendTitle added in v0.1.90

func (ce *CardElement) AppendTitle(title string) *CardElement

func (*CardElement) Height added in v0.1.90

func (ce *CardElement) Height(s size.Size) *CardElement

func (*CardElement) HeightPixels added in v0.1.90

func (ce *CardElement) HeightPixels(px float64) *CardElement

func (*CardElement) Width added in v0.1.90

func (ce *CardElement) Width(s size.Size) *CardElement

func (*CardElement) WidthPixels added in v0.1.90

func (ce *CardElement) WidthPixels(px float64) *CardElement

type ClassList added in v0.1.20

type ClassList struct {
	// contains filtered or unexported fields
}

func (*ClassList) AddClass added in v0.1.20

func (cl *ClassList) AddClass(classes ...string)

func (*ClassList) HasClass added in v0.1.20

func (cl *ClassList) HasClass(classes ...string) bool

func (*ClassList) RemoveClass added in v0.1.20

func (cl *ClassList) RemoveClass(classes ...string)

func (*ClassList) String added in v0.1.20

func (cl *ClassList) String() string

func (*ClassList) ToggleClass added in v0.1.20

func (cl *ClassList) ToggleClass(classes ...string)

type CountFormatter added in v0.1.97

type CountFormatter struct {
	// contains filtered or unexported fields
}

func NewCountFormatter added in v0.1.97

func NewCountFormatter(single, manyInSingleSet, manyInManySets string) *CountFormatter

func (*CountFormatter) Title added in v0.1.97

func (cf *CountFormatter) Title(from, to, total int) string

func (*CountFormatter) TitleElement added in v0.1.97

func (cf *CountFormatter) TitleElement(r Registrar, from, to, total int) Element

type DetailsElement added in v0.1.84

type DetailsElement struct {
	*BaseElement
}

func Details added in v0.1.84

func Details() *DetailsElement

func (*DetailsElement) AppendSummary added in v0.1.84

func (d *DetailsElement) AppendSummary(children ...Element) *DetailsElement

func (*DetailsElement) Open added in v0.1.84

func (d *DetailsElement) Open() *DetailsElement

type DetailsSummaryElement added in v0.1.84

type DetailsSummaryElement struct {
	BaseElement
	// contains filtered or unexported fields
}

func DSLarge added in v0.1.84

func DSLarge(r Registrar, summary Element, open bool) *DetailsSummaryElement

func DSSmall added in v0.1.84

func DSSmall(r Registrar, summary Element, open bool) *DetailsSummaryElement

func (*DetailsSummaryElement) AddClassSummary added in v0.2.18

func (dse *DetailsSummaryElement) AddClassSummary(names ...string)

func (*DetailsSummaryElement) Append added in v0.1.84

func (dse *DetailsSummaryElement) Append(children ...Element)

func (*DetailsSummaryElement) AppendSummary added in v0.1.84

func (dse *DetailsSummaryElement) AppendSummary(children ...Element)

func (*DetailsSummaryElement) BackgroundColor added in v0.1.84

func (dse *DetailsSummaryElement) BackgroundColor(c color.Color) *DetailsSummaryElement

func (*DetailsSummaryElement) DetailsMarginBlockEnd added in v0.1.84

func (dse *DetailsSummaryElement) DetailsMarginBlockEnd(s size.Size) *DetailsSummaryElement

func (*DetailsSummaryElement) ForegroundColor added in v0.1.84

func (dse *DetailsSummaryElement) ForegroundColor(c color.Color) *DetailsSummaryElement

func (*DetailsSummaryElement) MarkerColor added in v0.1.84

func (*DetailsSummaryElement) SetId added in v0.1.84

func (dse *DetailsSummaryElement) SetId(id string)

func (*DetailsSummaryElement) SetTabIndex added in v0.2.41

func (dse *DetailsSummaryElement) SetTabIndex(index int)

func (*DetailsSummaryElement) SummaryMarginBlockEnd added in v0.1.84

func (dse *DetailsSummaryElement) SummaryMarginBlockEnd(s size.Size) *DetailsSummaryElement

func (*DetailsSummaryElement) SummaryOutlineColor added in v0.2.10

func (dse *DetailsSummaryElement) SummaryOutlineColor(c color.Color) *DetailsSummaryElement

func (*DetailsSummaryElement) SummaryOutlineColorHex added in v0.2.10

func (dse *DetailsSummaryElement) SummaryOutlineColorHex(hex string) *DetailsSummaryElement

func (*DetailsSummaryElement) SummaryRowGap added in v0.1.84

func (dse *DetailsSummaryElement) SummaryRowGap(s size.Size) *DetailsSummaryElement

func (*DetailsSummaryElement) Write added in v0.1.84

func (dse *DetailsSummaryElement) Write(w io.Writer) error

type Element

type Element interface {
	Append(children ...Element)
	HasChildren() bool

	Write(w io.Writer) error

	GetTagName() atom.Atom

	SetId(id string)

	AddClass(names ...string)
	RemoveClass(names ...string)
	HasClass(names ...string) bool
	ToggleClass(names ...string)

	SetAttribute(name, val string)
	GetAttribute(name string) string

	GetElementById(id string) Element
	GetElementsByTagName(tagName atom.Atom) []Element
	GetFirstElementByTagName(tagName atom.Atom) Element
	GetElementsByClassName(names ...string) []Element
}

func A added in v0.1.84

func A(href string) Element

func AText added in v0.1.84

func AText(txt, href string) Element

func AtomicElement added in v0.1.85

func AtomicElement(a atom.Atom) Element

func Body added in v0.1.84

func Body() Element

func Break added in v0.1.84

func Break() Element

func Content added in v0.1.84

func Content() Element

func DSTitle added in v0.1.91

func DSTitle(r Registrar, title string) Element

func Datalist added in v0.1.84

func Datalist(id string) Element

func Deferrals added in v0.1.84

func Deferrals() Element

func Div added in v0.1.84

func Div() Element

func DivText added in v0.1.84

func DivText(txt string) Element

func Doctype added in v0.1.84

func Doctype() Element

func Document added in v0.1.84

func Document() Element
func Footer(r Registrar, title, href, from string) Element

func Form added in v0.1.84

func Form(action, method string) Element

func H1 added in v0.1.84

func H1() Element

func H1Text added in v0.1.84

func H1Text(txt string) Element

func H2 added in v0.1.84

func H2() Element

func H2Text added in v0.1.84

func H2Text(txt string) Element

func H3 added in v0.1.84

func H3() Element

func H3Text added in v0.1.84

func H3Text(txt string) Element

func H4 added in v0.1.84

func H4() Element

func H4Text added in v0.1.84

func H4Text(txt string) Element

func H5 added in v0.1.84

func H5() Element

func H5Text added in v0.1.84

func H5Text(txt string) Element

func H6 added in v0.1.84

func H6() Element

func H6Text added in v0.1.84

func H6Text(txt string) Element
func Head() Element

func Heading added in v0.1.84

func Heading(level int) Element

func HeadingText added in v0.1.84

func HeadingText(txt string, level int) Element

func HorizontalRule added in v0.1.84

func HorizontalRule() Element

func Html added in v0.1.84

func Html(lang string) Element

func Iframe added in v0.1.84

func Iframe(src string) Element

func IframeExpandHost added in v0.1.84

func IframeExpandHost(r Registrar, id, src string) Element

IframeExpandHost creates iframe-expand that will expand height to content height. In order to achieve that, two scripts need to be present script/receive.js on the host page (the page that contains iframe element) script/post.js within the iframe page. See NewContent that creates the page with that script. Initially host iframe has opacity: 0 through `loading` class to avoid flash of white content as iframe loads

func IframeLazy added in v0.1.84

func IframeLazy(src string) Element

func Image added in v0.1.84

func Image(src string) Element

func ImageEager added in v0.1.84

func ImageEager(src string) Element

func ImageLazy added in v0.1.84

func ImageLazy(src string) Element

func Label added in v0.1.84

func Label(forInput string) Element
func Link(kv map[string]string) Element

func ListItem added in v0.1.84

func ListItem() Element

func ListItemText added in v0.1.84

func ListItemText(txt string) Element

func Meta added in v0.1.84

func Meta(kv map[string]string) Element

func Option added in v0.1.84

func Option(value, label string) Element

func OrderedList added in v0.1.84

func OrderedList() Element

func Paragraph added in v0.2.20

func Paragraph() Element

func ParagraphText added in v0.2.20

func ParagraphText(txt string) Element

func Placeholder added in v0.1.90

func Placeholder() Element

func Pre added in v0.2.21

func Pre() Element

func PreText added in v0.2.21

func PreText(txt string) Element

func Requirements added in v0.1.84

func Requirements() Element

func Section added in v0.1.84

func Section() Element
func SectionsLinks(r Registrar, sections []string, sectionTitles map[string]string) Element

func Span added in v0.1.84

func Span() Element

func SpanText added in v0.1.84

func SpanText(txt string) Element

func Style added in v0.1.84

func Style(styles []byte) Element

func Summary added in v0.1.84

func Summary() Element

func Tbody added in v0.1.84

func Tbody() Element

func Td added in v0.1.84

func Td() Element

func Text added in v0.1.84

func Text(content string) Element

func Tfoot added in v0.1.84

func Tfoot() Element

func Th added in v0.1.84

func Th() Element

func Thead added in v0.1.84

func Thead() Element

func Time added in v0.1.84

func Time() Element

func TimeText added in v0.1.84

func TimeText(txt string) Element

func Title added in v0.1.84

func Title(txt string) Element

func Tr added in v0.1.84

func Tr() Element

func UnorderedList added in v0.1.84

func UnorderedList() Element

func Video added in v0.1.84

func Video(src string) Element

type EncapsulationMode

type EncapsulationMode string
const (
	EncapsulationOpen   EncapsulationMode = "open"
	EncapsulationClosed EncapsulationMode = "closed"
)

type FlexItemsElement added in v0.1.84

type FlexItemsElement struct {
	*BaseElement
}

func FICenter added in v0.1.84

func FICenter(r Registrar, elements ...Element) *FlexItemsElement

func FlexItems added in v0.1.84

func (*FlexItemsElement) AlignContent added in v0.1.84

func (fie *FlexItemsElement) AlignContent(a align.Align) *FlexItemsElement

func (*FlexItemsElement) AlignItems added in v0.1.84

func (fie *FlexItemsElement) AlignItems(a align.Align) *FlexItemsElement

func (*FlexItemsElement) BackgroundColor added in v0.1.84

func (fie *FlexItemsElement) BackgroundColor(c color.Color) *FlexItemsElement

func (*FlexItemsElement) ColumnGap added in v0.1.84

func (fie *FlexItemsElement) ColumnGap(sz size.Size) *FlexItemsElement

func (*FlexItemsElement) FontSize added in v0.1.84

func (fie *FlexItemsElement) FontSize(s size.Size) *FlexItemsElement

func (*FlexItemsElement) FontWeight added in v0.1.84

func (*FlexItemsElement) ForegroundColor added in v0.1.84

func (fie *FlexItemsElement) ForegroundColor(c color.Color) *FlexItemsElement

func (*FlexItemsElement) Gap added in v0.1.84

func (*FlexItemsElement) JustifyContent added in v0.1.84

func (fie *FlexItemsElement) JustifyContent(a align.Align) *FlexItemsElement

func (*FlexItemsElement) JustifyItems added in v0.1.84

func (fie *FlexItemsElement) JustifyItems(a align.Align) *FlexItemsElement

func (*FlexItemsElement) RowGap added in v0.1.84

func (fie *FlexItemsElement) RowGap(sz size.Size) *FlexItemsElement

type FormattedLabel added in v0.1.84

type FormattedLabel struct {
	Property string
	Title    string
	Class    string
}

type FrowElement added in v0.1.86

type FrowElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func Frow added in v0.1.86

func Frow(r Registrar) *FrowElement

func (*FrowElement) Elements added in v0.2.3

func (f *FrowElement) Elements(elements ...Element) *FrowElement

func (*FrowElement) FontSize added in v0.2.22

func (f *FrowElement) FontSize(s size.Size) *FrowElement

func (*FrowElement) Heading added in v0.1.86

func (f *FrowElement) Heading(title string) *FrowElement

func (*FrowElement) Highlight added in v0.1.86

func (f *FrowElement) Highlight(title string) *FrowElement

func (*FrowElement) IconColor added in v0.1.86

func (f *FrowElement) IconColor(symbol Symbol, c color.Color) *FrowElement

func (*FrowElement) LinkColor added in v0.2.23

func (f *FrowElement) LinkColor(title, href string, c color.Color) *FrowElement

func (*FrowElement) PropIcons added in v0.2.19

func (f *FrowElement) PropIcons(p string, symbols ...Symbol) *FrowElement

func (*FrowElement) PropVal added in v0.1.86

func (f *FrowElement) PropVal(p string, vals ...string) *FrowElement

type FspanElement added in v0.1.84

type FspanElement struct {
	*BaseElement
}

func Fspan added in v0.1.84

func Fspan(r Registrar, t string) *FspanElement

func (*FspanElement) BackgroundColor added in v0.1.84

func (fse *FspanElement) BackgroundColor(c color.Color) *FspanElement

func (*FspanElement) BorderRadius added in v0.2.37

func (fse *FspanElement) BorderRadius(s size.Size) *FspanElement

func (*FspanElement) FontSize added in v0.1.84

func (fse *FspanElement) FontSize(s size.Size) *FspanElement

func (*FspanElement) FontWeight added in v0.1.84

func (fse *FspanElement) FontWeight(w font_weight.Weight) *FspanElement

func (*FspanElement) ForegroundColor added in v0.1.84

func (fse *FspanElement) ForegroundColor(c color.Color) *FspanElement

func (*FspanElement) Padding added in v0.2.37

func (fse *FspanElement) Padding(s size.Size) *FspanElement

func (*FspanElement) PaddingBlock added in v0.2.37

func (fse *FspanElement) PaddingBlock(s size.Size) *FspanElement

func (*FspanElement) PaddingInline added in v0.2.37

func (fse *FspanElement) PaddingInline(s size.Size) *FspanElement

func (*FspanElement) TextAlign added in v0.2.2

func (fse *FspanElement) TextAlign(a align.Align) *FspanElement

type GridItemsElement added in v0.1.84

type GridItemsElement struct {
	*BaseElement
}

func GridItems added in v0.1.84

func GridItems(r Registrar) *GridItemsElement

func (*GridItemsElement) AlignContent added in v0.1.84

func (gie *GridItemsElement) AlignContent(a align.Align) *GridItemsElement

func (*GridItemsElement) AlignItems added in v0.1.84

func (gie *GridItemsElement) AlignItems(a align.Align) *GridItemsElement

func (*GridItemsElement) ColumnGap added in v0.1.84

func (gie *GridItemsElement) ColumnGap(sz size.Size) *GridItemsElement

func (*GridItemsElement) Gap added in v0.1.84

func (*GridItemsElement) GridTemplateRows added in v0.1.87

func (gie *GridItemsElement) GridTemplateRows(s size.Size) *GridItemsElement

func (*GridItemsElement) GridTemplateRowsPixels added in v0.1.87

func (gie *GridItemsElement) GridTemplateRowsPixels(px float64) *GridItemsElement

func (*GridItemsElement) JustifyContent added in v0.1.84

func (gie *GridItemsElement) JustifyContent(a align.Align) *GridItemsElement

func (*GridItemsElement) JustifyItems added in v0.1.84

func (gie *GridItemsElement) JustifyItems(a align.Align) *GridItemsElement

func (*GridItemsElement) RowGap added in v0.1.84

func (gie *GridItemsElement) RowGap(sz size.Size) *GridItemsElement

type IframeExpandElement added in v0.1.84

type IframeExpandElement struct {
	BaseElement
	// contains filtered or unexported fields
}

func (*IframeExpandElement) Write added in v0.1.84

func (ife *IframeExpandElement) Write(w io.Writer) error

type InputElement added in v0.1.84

type InputElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func Input added in v0.1.84

func Input(r Registrar, it input_types.Type) *InputElement

func InputValue added in v0.1.84

func InputValue(r Registrar, it input_types.Type, value string) *InputElement

func Switch added in v0.1.84

func Switch(r Registrar) *InputElement

func (*InputElement) FontWeight added in v0.1.84

func (ie *InputElement) FontWeight(w font_weight.Weight) *InputElement

func (*InputElement) SetChecked added in v0.1.84

func (ie *InputElement) SetChecked(condition bool) *InputElement

func (*InputElement) SetDatalist added in v0.1.84

func (ie *InputElement) SetDatalist(list map[string]string, listId string) *InputElement

func (*InputElement) SetDisabled added in v0.1.84

func (ie *InputElement) SetDisabled(condition bool) *InputElement

func (*InputElement) SetName added in v0.1.84

func (ie *InputElement) SetName(name string) *InputElement

func (*InputElement) SetPlaceholder added in v0.1.84

func (ie *InputElement) SetPlaceholder(placeholder string) *InputElement

func (*InputElement) SetValue added in v0.1.84

func (ie *InputElement) SetValue(value string) *InputElement

type IssaImageElement added in v0.1.84

type IssaImageElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func IssaImageDehydrated added in v0.1.84

func IssaImageDehydrated(r Registrar, bgHex, placeholder, poster string) *IssaImageElement

func IssaImageHydrated added in v0.1.84

func IssaImageHydrated(r Registrar, bgHex, placeholder, poster string) *IssaImageElement

func (*IssaImageElement) AspectRatio added in v0.2.16

func (iie *IssaImageElement) AspectRatio(ar float64) *IssaImageElement

func (*IssaImageElement) Height added in v0.1.89

func (iie *IssaImageElement) Height(s size.Size) *IssaImageElement

func (*IssaImageElement) HeightPixels added in v0.1.89

func (iie *IssaImageElement) HeightPixels(px float64) *IssaImageElement

func (*IssaImageElement) Width added in v0.1.89

func (iie *IssaImageElement) Width(s size.Size) *IssaImageElement

func (*IssaImageElement) WidthPixels added in v0.1.89

func (iie *IssaImageElement) WidthPixels(px float64) *IssaImageElement

type LabelsElement added in v0.1.84

type LabelsElement struct {
	BaseElement
	// contains filtered or unexported fields
}

func Labels added in v0.1.84

func Labels(r Registrar, fmtLabels ...FormattedLabel) *LabelsElement

func (*LabelsElement) ColumnGap added in v0.1.84

func (lse *LabelsElement) ColumnGap(s size.Size) *LabelsElement

func (*LabelsElement) FontSize added in v0.1.84

func (lse *LabelsElement) FontSize(s size.Size) *LabelsElement

func (*LabelsElement) RowGap added in v0.1.84

func (lse *LabelsElement) RowGap(s size.Size) *LabelsElement

func (*LabelsElement) Write added in v0.1.84

func (lse *LabelsElement) Write(w io.Writer) error

type MarkupProvider added in v0.1.85

type MarkupProvider interface {
	GetMarkup() ([]byte, error)
}

func BytesMarkup added in v0.1.85

func BytesMarkup(a atom.Atom, bts []byte) (atom.Atom, MarkupProvider)
type NavLinksElement struct {
	*BaseElement
}
func NavLinks(r Registrar) *NavLinksElement
func NavLinksTargets(r Registrar, targets ...*Target) *NavLinksElement

type PageElement added in v0.1.83

type PageElement interface {
	Element
	Registrar

	Error(err error) PageElement

	SetBodyId(id string) PageElement
	SetBodyAttribute(name, val string)

	AppendManifest() PageElement
	AppendIcon() PageElement
	AppendSpeculationRules(hrefMatches ...string)

	WriteResponse(w http.ResponseWriter) error
}

func IframeExpandContent added in v0.1.84

func IframeExpandContent(id, title string) PageElement

IframeExpandContent creates an iframe content page and attaches script/post.js that send the message on iframe content size change to the host page that contains script/receive.js to size host iframe element and remove `loading` class

func Page added in v0.1.84

func Page(title string) PageElement

type PopupElement added in v0.1.84

type PopupElement struct {
	*BaseElement
}

func Attach added in v0.1.84

func Attach(r Registrar, actor, target Element) *PopupElement

type Registrar

type Registrar interface {
	RegisterStyles(efs embed.FS, names ...string)
	RegisterRequirements(name string, elements ...Element)
	RegisterDeferrals(name string, elements ...Element)
}

type ScriptElement added in v0.1.84

type ScriptElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func Script added in v0.1.84

func Script(code []byte) *ScriptElement

func ScriptAsync added in v0.1.84

func ScriptAsync(code []byte) *ScriptElement

func (*ScriptElement) Sha256 added in v0.1.84

func (se *ScriptElement) Sha256() string

type SpeculationRules added in v0.2.36

type SpeculationRules struct {
	Prerender []SpeculationRulesPrerender `json:"prerender"`
}

type SpeculationRulesPrerender added in v0.2.36

type SpeculationRulesPrerender struct {
	Source string `json:"source"`
	Where  struct {
		And []*UriMatch `json:"and"`
	} `json:"where"`
	Eagerness string `json:"eagerness"`
}

type SvgUseElement added in v0.1.84

type SvgUseElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func SvgUse added in v0.1.84

func SvgUse(r Registrar, s Symbol) *SvgUseElement

func (*SvgUseElement) ForegroundColor added in v0.1.86

func (sue *SvgUseElement) ForegroundColor(c color.Color) *SvgUseElement

func (*SvgUseElement) Write added in v0.1.84

func (sue *SvgUseElement) Write(w io.Writer) error

func (*SvgUseElement) WriteFragment added in v0.1.85

func (sue *SvgUseElement) WriteFragment(t string, w io.Writer) error

type Symbol added in v0.1.84

type Symbol int
const (
	None Symbol = iota
	Windows
	MacOS
	Linux
	Plus
	Star
	Sparkle
	Stack
	Search
	Circle
)

type TableElement added in v0.1.84

type TableElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func Table added in v0.1.84

func Table(r Registrar) *TableElement

func (*TableElement) AppendFoot added in v0.1.84

func (te *TableElement) AppendFoot(columns ...string) *TableElement

func (*TableElement) AppendHead added in v0.1.84

func (te *TableElement) AppendHead(columns ...string) *TableElement

func (*TableElement) AppendRow added in v0.1.84

func (te *TableElement) AppendRow(data ...string) *TableElement

type Target added in v0.1.84

type Target struct {
	Title   string
	Href    string
	Icon    Symbol
	Current bool
}

func SetIcons added in v0.1.84

func SetIcons(targets []*Target, icons map[string]Symbol) []*Target
func TextLinks(links map[string]string, selected string, order ...string) []*Target

type TextElement added in v0.1.84

type TextElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func (*TextElement) Append added in v0.1.84

func (t *TextElement) Append(_ ...Element)

func (*TextElement) Write added in v0.1.84

func (t *TextElement) Write(w io.Writer) error

type TitleInputElement added in v0.1.84

type TitleInputElement struct {
	*TitleValuesElement
	// contains filtered or unexported fields
}

func TISearch added in v0.1.84

func TISearch(r Registrar, title, inputId string) *TitleInputElement

func TISearchValue added in v0.1.84

func TISearchValue(wcr Registrar, title, inputId, value string) *TitleInputElement

func (*TitleInputElement) SetDatalist added in v0.1.84

func (ti *TitleInputElement) SetDatalist(list map[string]string, listId string) *TitleInputElement

type TitleValuesElement added in v0.1.84

type TitleValuesElement struct {
	*BaseElement
	// contains filtered or unexported fields
}

func TitleValues added in v0.1.84

func TitleValues(r Registrar, title string) *TitleValuesElement

func (*TitleValuesElement) AppendLinkValues added in v0.1.84

func (tve *TitleValuesElement) AppendLinkValues(links map[string]string, order ...string) *TitleValuesElement

func (*TitleValuesElement) AppendTextValues added in v0.1.84

func (tve *TitleValuesElement) AppendTextValues(values ...string) *TitleValuesElement

func (*TitleValuesElement) AppendValues added in v0.1.84

func (tve *TitleValuesElement) AppendValues(elements ...Element) *TitleValuesElement

func (*TitleValuesElement) ForegroundColor added in v0.1.84

func (tve *TitleValuesElement) ForegroundColor(c color.Color) *TitleValuesElement

func (*TitleValuesElement) RowGap added in v0.1.84

func (*TitleValuesElement) SetLinksTarget added in v0.2.1

func (tve *TitleValuesElement) SetLinksTarget(target string) *TitleValuesElement

func (*TitleValuesElement) TitleForegroundColor added in v0.1.84

func (tve *TitleValuesElement) TitleForegroundColor(c color.Color) *TitleValuesElement

func (*TitleValuesElement) Write added in v0.1.84

func (tve *TitleValuesElement) Write(w io.Writer) error

type TokenWriter

type TokenWriter func(token string, w io.Writer) error

type UriMatch added in v0.2.36

type UriMatch struct {
	HrefMatches     string    `json:"href_matches,omitempty"`
	SelectorMatches string    `json:"selector_matches,omitempty"`
	Not             *UriMatch `json:"not,omitempty"`
}

Directories

Path Synopsis
consts

Jump to

Keyboard shortcuts

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