Restructure & refactor codebase
This commit is contained in:
20
internal/glance/widget-html.go
Normal file
20
internal/glance/widget-html.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package glance
|
||||
|
||||
import (
|
||||
"html/template"
|
||||
)
|
||||
|
||||
type htmlWidget struct {
|
||||
widgetBase `yaml:",inline"`
|
||||
Source template.HTML `yaml:"source"`
|
||||
}
|
||||
|
||||
func (widget *htmlWidget) initialize() error {
|
||||
widget.withTitle("").withError(nil)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (widget *htmlWidget) Render() template.HTML {
|
||||
return widget.Source
|
||||
}
|
||||
Reference in New Issue
Block a user