Documentation
¶
Index ¶
Constants ¶
View Source
const AllVariants = VariantS | VariantM | VariantL
AllVariants includes all responsive variants.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Asset ¶
type Asset struct {
Path string // relative to the module directory: "img/logo.png"
Variants Variant // e.g., AllVariants, VariantS|VariantM, VariantL
Alt string // SEO alternative text; if empty derived from filename
}
Asset represents an image declaration in a module.
type ImgElement ¶
type ImgElement struct {
// contains filtered or unexported fields
}
ImgElement wraps *dom.Element to provide a fluent image-specific API.
func (*ImgElement) AsElement ¶
func (i *ImgElement) AsElement() *dom.Element
AsElement returns the underlying *dom.Element for embedding in Render() trees.
func (*ImgElement) Attr ¶
func (i *ImgElement) Attr(key, val string) *ImgElement
Attr sets an arbitrary attribute.
func (*ImgElement) Class ¶
func (i *ImgElement) Class(classes ...string) *ImgElement
Class adds CSS classes.
func (*ImgElement) Size ¶
func (i *ImgElement) Size(w, h int) *ImgElement
Size sets width and height (reduces CLS).
func (*ImgElement) String ¶
func (i *ImgElement) String() string
String serializes the image element (satisfies dom.Component).
Click to show internal directories.
Click to hide internal directories.