mirror of https://github.com/glanceapp/glance.git
Add HTML widget
parent
e8043be107
commit
75079a981b
@ -0,0 +1,20 @@
|
|||||||
|
package widget
|
||||||
|
|
||||||
|
import (
|
||||||
|
"html/template"
|
||||||
|
)
|
||||||
|
|
||||||
|
type HTML struct {
|
||||||
|
widgetBase `yaml:",inline"`
|
||||||
|
Source template.HTML `yaml:"source"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (widget *HTML) Initialize() error {
|
||||||
|
widget.withTitle("").withError(nil)
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (widget *HTML) Render() template.HTML {
|
||||||
|
return widget.Source
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue