Documentation
¶
Overview ¶
Copyright 2024 Jake Nichols (MIT License)
Copyright 2024 Jake Nichols (MIT License)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Card = bricks.ComponentMust("Card", bricks.Source("card.html"), bricks.OnLoad(func(r *http.Request, args ...any) (data any, err error) { card := new(cardData) err = errors.Join( bricks.Kwarg("title", &card.Title, "", args...), bricks.Kwarg("body", &card.Body, "", args...), bricks.Kwarg("link", &card.Link, "", args...), bricks.Kwarg("linkText", &card.LinkText, "", args...), ) data = card return }), )
View Source
bricks.Source("navbar.html"), bricks.OnLoad(func(r *http.Request, args ...any) (data any, err error) { nd := new(navbarData) data = nd err = errors.Join( bricks.Kwarg("logoText", &nd.LogoText, "", args...), bricks.Kwarg("logoImage", &nd.LogoImg, "", args...), bricks.Kwarg("breakpoint", &nd.Breakpoint, 1000, args...), ) if err != nil { return } var rest []bricks.Arg rest, err = bricks.Kwargs(args...) if err != nil { return } nd.Links = make([]navbarLink, 0) for _, arg := range rest { text, href := arg.Key, arg.Value if slices.Contains(ignoreKeys, text) { continue } hrefStr, ok := href.(string) if !ok { continue } nd.Links = append(nd.Links, navbarLink{ Text: text, Href: hrefStr, }) } return }), )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.