chore: update module definition with new domain

This commit is contained in:
Guz
2025-10-13 14:54:57 -03:00
parent f7698f8764
commit 6ea200aa64
9 changed files with 417 additions and 5 deletions

51
xhtml/ast/metadata.go Normal file
View File

@@ -0,0 +1,51 @@
package ast
import (
"net/url"
"slices"
"code.capytal.cc/loreddev/x/xhtml/ast/attributes"
)
type Base struct {
BaseNode
attributes.HRef
attributes.Target
attributes.Global
}
func (n Base) Kind() NodeKind {
return KindBase
}
var KindBase = NewNodeKind("base", &Base{})
type Head struct {
BaseNode
profile []*url.URL
attributes.Global
}
func (n Head) Kind() NodeKind {
return KindHead
}
var KindHead = NewNodeKind("head", &Head{})
func (n Head) Profile() []*url.URL {
return n.profile
}
func (n *Head) SetProfile(uri []*url.URL) {
n.profile = uri
}
func (n *Head) AddProfile(uri *url.URL) {
n.profile = append(n.profile, uri)
}
func (n *Head) DelProfile(uri *url.URL) {
n.profile = slices.DeleteFunc(n.profile, func(u *url.URL) bool {
return u.String() == uri.String()
})
}