init - add project files

This commit is contained in:
2025-03-06 23:54:11 -05:00
commit e724ff1120
1363 changed files with 897467 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_style = tab
[{*.go,*.md}]
indent_style = tab

View File

@@ -0,0 +1 @@
/cover.out

View File

@@ -0,0 +1,18 @@
# Contributing
First of all, thank you for considering a contribution to this project. 😊
Whether it's a small fix, an idea, a bug report, or some feature code,
actions that impact the project positively are always very welcome.
## How to contribute
Feel free to submit a PR directly, if your change is in code and small and isolated.
If you're in doubt about whether your contribution is a good idea for the project,
feel free to create an issue first discussing the change.
This also applies for any larger changes; start with an issue instead of risking
a large PR that doesn't get accepted, which would make everyone involved sad.
## Terms
By contributing code, you declare that you have the rights to add it,
and you accept that it will be published in the project under the existing license.

View File

@@ -0,0 +1,10 @@
# Contributors
A huge thank you to all contributors of code, bug reports, ideas, discussions, and more!
If you think your name belongs here, add your name and submit a PR. Then Github shows your name and picture
in the sidebar, also if you have not contributed code.
- Markus Wüstenberg, @markuswustenberg / @maragudk
- Hans Raaf, @oderwat
- Guy-Laurent Subri, @glsubri

21
vendor/maragu.dev/gomponents/LICENSE vendored Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) Maragu ApS
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

16
vendor/maragu.dev/gomponents/Makefile vendored Normal file
View File

@@ -0,0 +1,16 @@
.PHONY: benchmark
benchmark:
go test -bench=.
.PHONY: cover
cover:
go tool cover -html=cover.out
.PHONY: lint
lint:
golangci-lint run
.PHONY: test
test:
go test -coverprofile=cover.out -shuffle on ./...

88
vendor/maragu.dev/gomponents/README.md vendored Normal file
View File

@@ -0,0 +1,88 @@
# Tired of complex template languages?
<img src="logo.png" alt="Logo" width="300" align="right">
[![GoDoc](https://pkg.go.dev/badge/maragu.dev/gomponents)](https://pkg.go.dev/maragu.dev/gomponents)
[![Go](https://github.com/maragudk/gomponents/actions/workflows/ci.yml/badge.svg)](https://github.com/maragudk/gomponents/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/maragudk/gomponents/branch/main/graph/badge.svg)](https://codecov.io/gh/maragudk/gomponents)
[![Go Report Card](https://goreportcard.com/badge/maragu.dev/gomponents)](https://goreportcard.com/report/maragu.dev/gomponents)
Try HTML components in pure Go.
_gomponents_ are HTML components written in pure Go.
They render to HTML 5, and make it easy for you to build reusable components.
So you can focus on building your app instead of learning yet another templating language.
```shell
go get maragu.dev/gomponents
```
Made with ✨sparkles✨ by [maragu](https://www.maragu.dev/).
Does your company depend on this project? [Contact me at markus@maragu.dk](mailto:markus@maragu.dk?Subject=Supporting%20your%20project) to discuss options for a one-time or recurring invoice to ensure its continued thriving.
## Features
Check out [www.gomponents.com](https://www.gomponents.com) for an introduction.
- Build reusable HTML components
- Write declarative HTML 5 in Go without all the strings, so you get
- Type safety from the compiler
- Auto-completion from the IDE
- Easy debugging with the standard Go debugger
- Automatic formatting with `gofmt`/`goimports`
- Simple API that's easy to learn and use (you know most already if you know HTML)
- Useful helpers like
- `Text` and `Textf` that insert HTML-escaped text,
- `Raw` and `Rawf` for inserting raw strings,
- `Map` for mapping data to components and `Group` for grouping components,
- and `If`/`Iff` for conditional rendering.
- No external dependencies
- Mature and stable, no breaking changes
## Usage
```shell
go get maragu.dev/gomponents
```
```go
package main
import (
. "maragu.dev/gomponents"
. "maragu.dev/gomponents/components"
. "maragu.dev/gomponents/html"
)
func Navbar(authenticated bool, currentPath string) Node {
return Nav(
NavbarLink("/", "Home", currentPath),
NavbarLink("/about", "About", currentPath),
If(authenticated, NavbarLink("/profile", "Profile", currentPath)),
)
}
func NavbarLink(href, name, currentPath string) Node {
return A(Href(href), Classes{"is-active": currentPath == href}, g.Text(name))
}
```
(Some people don't like dot-imports, and luckily it's completely optional.)
For a more complete example, see [the examples directory](internal/examples/).
### What's up with the specially named elements and attributes?
Unfortunately, there are some name clashes in HTML elements and attributes, so they need an `El` or `Attr` suffix,
to be able to co-exist in the same package in Go.
I've chosen one or the other based on what I think is the common usage.
In either case, the less-used variant also exists in the codebase:
- `cite` (`Cite`/`CiteAttr`, `CiteEl` also exists)
- `data` (`DataEl`/`Data`, `DataAttr` also exists)
- `form` (`Form`/`FormAttr`, `FormEl` also exists)
- `label` (`Label`/`LabelAttr`, `LabelEl` also exists)
- `style` (`StyleEl`/`Style`, `StyleAttr` also exists)
- `title` (`TitleEl`/`Title`, `TitleAttr` also exists)

View File

@@ -0,0 +1,3 @@
ignore:
- "examples"
- "internal/assert"

View File

@@ -0,0 +1,297 @@
// Package gomponents provides HTML components in Go, that render to HTML 5.
//
// The primary interface is a [Node]. It defines a function Render, which should render the [Node]
// to the given writer as a string.
//
// All DOM elements and attributes can be created by using the [El] and [Attr] functions.
//
// The functions [Text], [Textf], [Raw], and [Rawf] can be used to create text nodes, either HTML-escaped or unescaped.
//
// See also helper functions [Map], [If], and [Iff] for mapping data to nodes and inserting them conditionally.
//
// There's also the [Group] type, which is a slice of [Node]-s that can be rendered as one [Node].
//
// For basic HTML elements and attributes, see the package html.
//
// For higher-level HTML components, see the package components.
//
// For HTTP helpers, see the package http.
package gomponents
import (
"fmt"
"html/template"
"io"
"strings"
)
// Node is a DOM node that can Render itself to a [io.Writer].
type Node interface {
Render(w io.Writer) error
}
// NodeType describes what type of [Node] it is, currently either an [ElementType] or an [AttributeType].
// This decides where a [Node] should be rendered.
// Nodes default to being [ElementType].
type NodeType int
const (
ElementType = NodeType(iota)
AttributeType
)
// nodeTypeDescriber can be implemented by Nodes to let callers know whether the [Node] is
// an [ElementType] or an [AttributeType].
// See [NodeType].
type nodeTypeDescriber interface {
Type() NodeType
}
// NodeFunc is a render function that is also a [Node] of [ElementType].
type NodeFunc func(io.Writer) error
// Render satisfies [Node].
func (n NodeFunc) Render(w io.Writer) error {
return n(w)
}
// Type satisfies nodeTypeDescriber.
func (n NodeFunc) Type() NodeType {
return ElementType
}
// String satisfies [fmt.Stringer].
func (n NodeFunc) String() string {
var b strings.Builder
_ = n.Render(&b)
return b.String()
}
// El creates an element DOM [Node] with a name and child Nodes.
// See https://dev.w3.org/html5/spec-LC/syntax.html#elements-0 for how elements are rendered.
// No tags are ever omitted from normal tags, even though it's allowed for elements given at
// https://dev.w3.org/html5/spec-LC/syntax.html#optional-tags
// If an element is a void element, non-attribute children nodes are ignored.
// Use this if no convenience creator exists in the html package.
func El(name string, children ...Node) Node {
return NodeFunc(func(w io.Writer) error {
return render(w, &name, children...)
})
}
func render(w2 io.Writer, name *string, children ...Node) error {
w := &statefulWriter{w: w2}
if name != nil {
w.Write([]byte("<" + *name))
for _, c := range children {
renderChild(w, c, AttributeType)
}
w.Write([]byte(">"))
if isVoidElement(*name) {
return w.err
}
}
for _, c := range children {
renderChild(w, c, ElementType)
}
if name != nil {
w.Write([]byte("</" + *name + ">"))
}
return w.err
}
// renderChild c to the given writer w if the node type is t.
func renderChild(w *statefulWriter, c Node, t NodeType) {
if w.err != nil || c == nil {
return
}
// Rendering groups like this is still important even though a group can render itself,
// since otherwise attributes will sometimes be ignored.
if g, ok := c.(Group); ok {
for _, groupC := range g {
renderChild(w, groupC, t)
}
return
}
switch t {
case ElementType:
if p, ok := c.(nodeTypeDescriber); !ok || p.Type() == ElementType {
w.err = c.Render(w.w)
}
case AttributeType:
if p, ok := c.(nodeTypeDescriber); ok && p.Type() == AttributeType {
w.err = c.Render(w.w)
}
}
}
// statefulWriter only writes if no errors have occurred earlier in its lifetime.
type statefulWriter struct {
w io.Writer
err error
}
func (w *statefulWriter) Write(p []byte) {
if w.err != nil {
return
}
_, w.err = w.w.Write(p)
}
// voidElements don't have end tags and must be treated differently in the rendering.
// See https://dev.w3.org/html5/spec-LC/syntax.html#void-elements
var voidElements = map[string]struct{}{
"area": {},
"base": {},
"br": {},
"col": {},
"command": {},
"embed": {},
"hr": {},
"img": {},
"input": {},
"keygen": {},
"link": {},
"meta": {},
"param": {},
"source": {},
"track": {},
"wbr": {},
}
func isVoidElement(name string) bool {
_, ok := voidElements[name]
return ok
}
// Attr creates an attribute DOM [Node] with a name and optional value.
// If only a name is passed, it's a name-only (boolean) attribute (like "required").
// If a name and value are passed, it's a name-value attribute (like `class="header"`).
// More than one value make [Attr] panic.
// Use this if no convenience creator exists in the html package.
func Attr(name string, value ...string) Node {
switch len(value) {
case 0:
return &attr{name: name}
case 1:
return &attr{name: name, value: &value[0]}
default:
panic("attribute must be just name or name and value pair")
}
}
type attr struct {
name string
value *string
}
// Render satisfies [Node].
func (a *attr) Render(w io.Writer) error {
if a.value == nil {
_, err := w.Write([]byte(" " + a.name))
return err
}
_, err := w.Write([]byte(" " + a.name + `="` + template.HTMLEscapeString(*a.value) + `"`))
return err
}
// Type satisfies [nodeTypeDescriber].
func (a *attr) Type() NodeType {
return AttributeType
}
// String satisfies [fmt.Stringer].
func (a *attr) String() string {
var b strings.Builder
_ = a.Render(&b)
return b.String()
}
// Text creates a text DOM [Node] that Renders the escaped string t.
func Text(t string) Node {
return NodeFunc(func(w io.Writer) error {
_, err := w.Write([]byte(template.HTMLEscapeString(t)))
return err
})
}
// Textf creates a text DOM [Node] that Renders the interpolated and escaped string format.
func Textf(format string, a ...interface{}) Node {
return NodeFunc(func(w io.Writer) error {
_, err := w.Write([]byte(template.HTMLEscapeString(fmt.Sprintf(format, a...))))
return err
})
}
// Raw creates a text DOM [Node] that just Renders the unescaped string t.
func Raw(t string) Node {
return NodeFunc(func(w io.Writer) error {
_, err := w.Write([]byte(t))
return err
})
}
// Rawf creates a text DOM [Node] that just Renders the interpolated and unescaped string format.
func Rawf(format string, a ...interface{}) Node {
return NodeFunc(func(w io.Writer) error {
_, err := w.Write([]byte(fmt.Sprintf(format, a...)))
return err
})
}
// Map a slice of anything to a [Group] (which is just a slice of [Node]-s).
func Map[T any](ts []T, cb func(T) Node) Group {
var nodes []Node
for _, t := range ts {
nodes = append(nodes, cb(t))
}
return nodes
}
// Group a slice of [Node]-s into one Node, while still being usable like a regular slice of [Node]-s.
// A [Group] can render directly, but if any of the direct children are [AttributeType], they will be ignored,
// to not produce invalid HTML.
type Group []Node
// String satisfies [fmt.Stringer].
func (g Group) String() string {
var b strings.Builder
_ = g.Render(&b)
return b.String()
}
// Render satisfies [Node].
func (g Group) Render(w io.Writer) error {
return render(w, nil, g...)
}
// If condition is true, return the given [Node]. Otherwise, return nil.
// This helper function is good for inlining elements conditionally.
// If it's important that the given [Node] is only evaluated if condition is true
// (for example, when using nilable variables), use [Iff] instead.
func If(condition bool, n Node) Node {
if condition {
return n
}
return nil
}
// Iff condition is true, call the given function. Otherwise, return nil.
// This helper function is good for inlining elements conditionally when the node depends on nilable data,
// or some other code that could potentially panic.
// If you just need simple conditional rendering, see [If].
func Iff(condition bool, f func() Node) Node {
if condition {
return f()
}
return nil
}

View File

@@ -0,0 +1,292 @@
package html
import (
g "maragu.dev/gomponents"
)
func Async() g.Node {
return g.Attr("async")
}
func AutoFocus() g.Node {
return g.Attr("autofocus")
}
func AutoPlay() g.Node {
return g.Attr("autoplay")
}
func Checked() g.Node {
return g.Attr("checked")
}
func Controls() g.Node {
return g.Attr("controls")
}
func CrossOrigin(v string) g.Node {
return g.Attr("crossorigin", v)
}
func DateTime(v string) g.Node {
return g.Attr("datetime", v)
}
func Defer() g.Node {
return g.Attr("defer")
}
func Disabled() g.Node {
return g.Attr("disabled")
}
func Draggable(v string) g.Node {
return g.Attr("draggable", v)
}
func Loop() g.Node {
return g.Attr("loop")
}
func Multiple() g.Node {
return g.Attr("multiple")
}
func Muted() g.Node {
return g.Attr("muted")
}
func PlaysInline() g.Node {
return g.Attr("playsinline")
}
func ReadOnly() g.Node {
return g.Attr("readonly")
}
func Required() g.Node {
return g.Attr("required")
}
func Selected() g.Node {
return g.Attr("selected")
}
func Accept(v string) g.Node {
return g.Attr("accept", v)
}
func Action(v string) g.Node {
return g.Attr("action", v)
}
func Alt(v string) g.Node {
return g.Attr("alt", v)
}
// Aria attributes automatically have their name prefixed with "aria-".
func Aria(name, v string) g.Node {
return g.Attr("aria-"+name, v)
}
func As(v string) g.Node {
return g.Attr("as", v)
}
func AutoComplete(v string) g.Node {
return g.Attr("autocomplete", v)
}
func Charset(v string) g.Node {
return g.Attr("charset", v)
}
func CiteAttr(v string) g.Node {
return g.Attr("cite", v)
}
func Class(v string) g.Node {
return g.Attr("class", v)
}
func Cols(v string) g.Node {
return g.Attr("cols", v)
}
func ColSpan(v string) g.Node {
return g.Attr("colspan", v)
}
func Content(v string) g.Node {
return g.Attr("content", v)
}
// Data attributes automatically have their name prefixed with "data-".
func Data(name, v string) g.Node {
return g.Attr("data-"+name, v)
}
// DataAttr attributes automatically have their name prefixed with "data-".
//
// Deprecated: Use [Data] instead.
func DataAttr(name, v string) g.Node {
return Data(name, v)
}
func For(v string) g.Node {
return g.Attr("for", v)
}
func FormAttr(v string) g.Node {
return g.Attr("form", v)
}
func Height(v string) g.Node {
return g.Attr("height", v)
}
func Hidden(v string) g.Node {
return g.Attr("hidden", v)
}
func Href(v string) g.Node {
return g.Attr("href", v)
}
func ID(v string) g.Node {
return g.Attr("id", v)
}
func Integrity(v string) g.Node {
return g.Attr("integrity", v)
}
func LabelAttr(v string) g.Node {
return g.Attr("label", v)
}
func Lang(v string) g.Node {
return g.Attr("lang", v)
}
func List(v string) g.Node {
return g.Attr("list", v)
}
func Loading(v string) g.Node {
return g.Attr("loading", v)
}
func Max(v string) g.Node {
return g.Attr("max", v)
}
func MaxLength(v string) g.Node {
return g.Attr("maxlength", v)
}
func Method(v string) g.Node {
return g.Attr("method", v)
}
func Min(v string) g.Node {
return g.Attr("min", v)
}
func MinLength(v string) g.Node {
return g.Attr("minlength", v)
}
func Name(v string) g.Node {
return g.Attr("name", v)
}
func Pattern(v string) g.Node {
return g.Attr("pattern", v)
}
func Placeholder(v string) g.Node {
return g.Attr("placeholder", v)
}
func Poster(v string) g.Node {
return g.Attr("poster", v)
}
func Preload(v string) g.Node {
return g.Attr("preload", v)
}
func Rel(v string) g.Node {
return g.Attr("rel", v)
}
func Role(v string) g.Node {
return g.Attr("role", v)
}
func Rows(v string) g.Node {
return g.Attr("rows", v)
}
func RowSpan(v string) g.Node {
return g.Attr("rowspan", v)
}
func Src(v string) g.Node {
return g.Attr("src", v)
}
func SrcSet(v string) g.Node {
return g.Attr("srcset", v)
}
func Step(v string) g.Node {
return g.Attr("step", v)
}
func Style(v string) g.Node {
return g.Attr("style", v)
}
// Deprecated: Use [Style] instead.
func StyleAttr(v string) g.Node {
return Style(v)
}
func TabIndex(v string) g.Node {
return g.Attr("tabindex", v)
}
func Target(v string) g.Node {
return g.Attr("target", v)
}
func Title(v string) g.Node {
return g.Attr("title", v)
}
// Deprecated: Use [Title] instead.
func TitleAttr(v string) g.Node {
return Title(v)
}
func Type(v string) g.Node {
return g.Attr("type", v)
}
func Value(v string) g.Node {
return g.Attr("value", v)
}
func Width(v string) g.Node {
return g.Attr("width", v)
}
func EncType(v string) g.Node {
return g.Attr("enctype", v)
}
func Dir(v string) g.Node {
return g.Attr("dir", v)
}

View File

@@ -0,0 +1,449 @@
// Package html provides common HTML elements and attributes.
//
// See https://developer.mozilla.org/en-US/docs/Web/HTML/Element for a list of elements.
//
// See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes for a list of attributes.
package html
import (
"io"
g "maragu.dev/gomponents"
)
// Doctype returns a special kind of [g.Node] that prefixes its sibling with the string "<!doctype html>".
func Doctype(sibling g.Node) g.Node {
return g.NodeFunc(func(w io.Writer) error {
if _, err := w.Write([]byte("<!doctype html>")); err != nil {
return err
}
return sibling.Render(w)
})
}
func A(children ...g.Node) g.Node {
return g.El("a", children...)
}
func Address(children ...g.Node) g.Node {
return g.El("address", children...)
}
func Area(children ...g.Node) g.Node {
return g.El("area", children...)
}
func Article(children ...g.Node) g.Node {
return g.El("article", children...)
}
func Aside(children ...g.Node) g.Node {
return g.El("aside", children...)
}
func Audio(children ...g.Node) g.Node {
return g.El("audio", children...)
}
func Base(children ...g.Node) g.Node {
return g.El("base", children...)
}
func BlockQuote(children ...g.Node) g.Node {
return g.El("blockquote", children...)
}
func Body(children ...g.Node) g.Node {
return g.El("body", children...)
}
func Br(children ...g.Node) g.Node {
return g.El("br", children...)
}
func Button(children ...g.Node) g.Node {
return g.El("button", children...)
}
func Canvas(children ...g.Node) g.Node {
return g.El("canvas", children...)
}
func Cite(children ...g.Node) g.Node {
return g.El("cite", children...)
}
// Deprecated: Use [Cite] instead.
func CiteEl(children ...g.Node) g.Node {
return Cite(children...)
}
func Code(children ...g.Node) g.Node {
return g.El("code", children...)
}
func Col(children ...g.Node) g.Node {
return g.El("col", children...)
}
func ColGroup(children ...g.Node) g.Node {
return g.El("colgroup", children...)
}
func DataEl(children ...g.Node) g.Node {
return g.El("data", children...)
}
func DataList(children ...g.Node) g.Node {
return g.El("datalist", children...)
}
func Details(children ...g.Node) g.Node {
return g.El("details", children...)
}
func Dialog(children ...g.Node) g.Node {
return g.El("dialog", children...)
}
func Div(children ...g.Node) g.Node {
return g.El("div", children...)
}
func Dl(children ...g.Node) g.Node {
return g.El("dl", children...)
}
func Embed(children ...g.Node) g.Node {
return g.El("embed", children...)
}
func Form(children ...g.Node) g.Node {
return g.El("form", children...)
}
// Deprecated: Use [Form] instead.
func FormEl(children ...g.Node) g.Node {
return Form(children...)
}
func FieldSet(children ...g.Node) g.Node {
return g.El("fieldset", children...)
}
func Figure(children ...g.Node) g.Node {
return g.El("figure", children...)
}
func Footer(children ...g.Node) g.Node {
return g.El("footer", children...)
}
func Head(children ...g.Node) g.Node {
return g.El("head", children...)
}
func Header(children ...g.Node) g.Node {
return g.El("header", children...)
}
func HGroup(children ...g.Node) g.Node {
return g.El("hgroup", children...)
}
func Hr(children ...g.Node) g.Node {
return g.El("hr", children...)
}
func HTML(children ...g.Node) g.Node {
return g.El("html", children...)
}
func IFrame(children ...g.Node) g.Node {
return g.El("iframe", children...)
}
func Img(children ...g.Node) g.Node {
return g.El("img", children...)
}
func Input(children ...g.Node) g.Node {
return g.El("input", children...)
}
func Label(children ...g.Node) g.Node {
return g.El("label", children...)
}
// Deprecated: Use [Label] instead.
func LabelEl(children ...g.Node) g.Node {
return Label(children...)
}
func Legend(children ...g.Node) g.Node {
return g.El("legend", children...)
}
func Li(children ...g.Node) g.Node {
return g.El("li", children...)
}
func Link(children ...g.Node) g.Node {
return g.El("link", children...)
}
func Main(children ...g.Node) g.Node {
return g.El("main", children...)
}
func Menu(children ...g.Node) g.Node {
return g.El("menu", children...)
}
func Meta(children ...g.Node) g.Node {
return g.El("meta", children...)
}
func Meter(children ...g.Node) g.Node {
return g.El("meter", children...)
}
func Nav(children ...g.Node) g.Node {
return g.El("nav", children...)
}
func NoScript(children ...g.Node) g.Node {
return g.El("noscript", children...)
}
func Object(children ...g.Node) g.Node {
return g.El("object", children...)
}
func Ol(children ...g.Node) g.Node {
return g.El("ol", children...)
}
func OptGroup(children ...g.Node) g.Node {
return g.El("optgroup", children...)
}
func Option(children ...g.Node) g.Node {
return g.El("option", children...)
}
func P(children ...g.Node) g.Node {
return g.El("p", children...)
}
func Param(children ...g.Node) g.Node {
return g.El("param", children...)
}
func Picture(children ...g.Node) g.Node {
return g.El("picture", children...)
}
func Pre(children ...g.Node) g.Node {
return g.El("pre", children...)
}
func Progress(children ...g.Node) g.Node {
return g.El("progress", children...)
}
func Script(children ...g.Node) g.Node {
return g.El("script", children...)
}
func Section(children ...g.Node) g.Node {
return g.El("section", children...)
}
func Select(children ...g.Node) g.Node {
return g.El("select", children...)
}
func Source(children ...g.Node) g.Node {
return g.El("source", children...)
}
func Span(children ...g.Node) g.Node {
return g.El("span", children...)
}
func StyleEl(children ...g.Node) g.Node {
return g.El("style", children...)
}
func Summary(children ...g.Node) g.Node {
return g.El("summary", children...)
}
func SVG(children ...g.Node) g.Node {
return g.El("svg", children...)
}
func Table(children ...g.Node) g.Node {
return g.El("table", children...)
}
func TBody(children ...g.Node) g.Node {
return g.El("tbody", children...)
}
func Td(children ...g.Node) g.Node {
return g.El("td", children...)
}
func Textarea(children ...g.Node) g.Node {
return g.El("textarea", children...)
}
func TFoot(children ...g.Node) g.Node {
return g.El("tfoot", children...)
}
func Th(children ...g.Node) g.Node {
return g.El("th", children...)
}
func THead(children ...g.Node) g.Node {
return g.El("thead", children...)
}
func Tr(children ...g.Node) g.Node {
return g.El("tr", children...)
}
func Ul(children ...g.Node) g.Node {
return g.El("ul", children...)
}
func Wbr(children ...g.Node) g.Node {
return g.El("wbr", children...)
}
func Abbr(children ...g.Node) g.Node {
return g.El("abbr", g.Group(children))
}
func B(children ...g.Node) g.Node {
return g.El("b", g.Group(children))
}
func Caption(children ...g.Node) g.Node {
return g.El("caption", g.Group(children))
}
func Dd(children ...g.Node) g.Node {
return g.El("dd", g.Group(children))
}
func Del(children ...g.Node) g.Node {
return g.El("del", g.Group(children))
}
func Dfn(children ...g.Node) g.Node {
return g.El("dfn", g.Group(children))
}
func Dt(children ...g.Node) g.Node {
return g.El("dt", g.Group(children))
}
func Em(children ...g.Node) g.Node {
return g.El("em", g.Group(children))
}
func FigCaption(children ...g.Node) g.Node {
return g.El("figcaption", g.Group(children))
}
func H1(children ...g.Node) g.Node {
return g.El("h1", g.Group(children))
}
func H2(children ...g.Node) g.Node {
return g.El("h2", g.Group(children))
}
func H3(children ...g.Node) g.Node {
return g.El("h3", g.Group(children))
}
func H4(children ...g.Node) g.Node {
return g.El("h4", g.Group(children))
}
func H5(children ...g.Node) g.Node {
return g.El("h5", g.Group(children))
}
func H6(children ...g.Node) g.Node {
return g.El("h6", g.Group(children))
}
func I(children ...g.Node) g.Node {
return g.El("i", g.Group(children))
}
func Ins(children ...g.Node) g.Node {
return g.El("ins", g.Group(children))
}
func Kbd(children ...g.Node) g.Node {
return g.El("kbd", g.Group(children))
}
func Mark(children ...g.Node) g.Node {
return g.El("mark", g.Group(children))
}
func Q(children ...g.Node) g.Node {
return g.El("q", g.Group(children))
}
func S(children ...g.Node) g.Node {
return g.El("s", g.Group(children))
}
func Samp(children ...g.Node) g.Node {
return g.El("samp", g.Group(children))
}
func Small(children ...g.Node) g.Node {
return g.El("small", g.Group(children))
}
func Strong(children ...g.Node) g.Node {
return g.El("strong", g.Group(children))
}
func Sub(children ...g.Node) g.Node {
return g.El("sub", g.Group(children))
}
func Sup(children ...g.Node) g.Node {
return g.El("sup", g.Group(children))
}
func Time(children ...g.Node) g.Node {
return g.El("time", g.Group(children))
}
func TitleEl(children ...g.Node) g.Node {
return g.El("title", g.Group(children))
}
func U(children ...g.Node) g.Node {
return g.El("u", g.Group(children))
}
func Var(children ...g.Node) g.Node {
return g.El("var", g.Group(children))
}
func Video(children ...g.Node) g.Node {
return g.El("video", g.Group(children))
}

BIN
vendor/maragu.dev/gomponents/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB