Documentation ¶
Index ¶
- type AddableMedia
- type Asset
- type CSS
- type JS
- type JSAsset
- type Media
- type MediaDefiner
- type MediaObject
- func (m *MediaObject) AddCSS(list ...Asset)
- func (m *MediaObject) AddJS(list ...Asset)
- func (m *MediaObject) CSS() []template.HTML
- func (m *MediaObject) CSSList() []Asset
- func (m *MediaObject) JS() []template.HTML
- func (m *MediaObject) JSList() []Asset
- func (m *MediaObject) Merge(other Media) Media
- func (m *MediaObject) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddableMedia ¶
type Media ¶
type Media interface { // Merge merges the media of the other Media object into this one. // It returns the merged Media object - it modifies the receiver. Merge(other Media) Media // A list of JS script tags to include. JS() []template.HTML // A list of CSS link tags to include. CSS() []template.HTML // The list of raw JS urls to include. JSList() []Asset // The list of raw CSS urls to include. CSSList() []Asset AddableMedia }
type MediaDefiner ¶
type MediaDefiner interface {
Media() Media
}
type MediaObject ¶
type MediaObject struct { Css *orderedmap.OrderedMap[string, Asset] Js *orderedmap.OrderedMap[string, Asset] }
func NewMedia ¶
func NewMedia() *MediaObject
func (*MediaObject) AddCSS ¶
func (m *MediaObject) AddCSS(list ...Asset)
func (*MediaObject) AddJS ¶
func (m *MediaObject) AddJS(list ...Asset)
func (*MediaObject) CSS ¶
func (m *MediaObject) CSS() []template.HTML
func (*MediaObject) CSSList ¶
func (m *MediaObject) CSSList() []Asset
func (*MediaObject) JS ¶
func (m *MediaObject) JS() []template.HTML
func (*MediaObject) JSList ¶
func (m *MediaObject) JSList() []Asset
func (*MediaObject) Merge ¶
func (m *MediaObject) Merge(other Media) Media
func (*MediaObject) String ¶
func (m *MediaObject) String() string
Click to show internal directories.
Click to hide internal directories.