mirror of
https://github.com/glanceapp/glance.git
synced 2025-08-14 02:05:12 +02:00
Add HTML widget
This commit is contained in:
20
internal/widget/html.go
Normal file
20
internal/widget/html.go
Normal file
@ -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
|
||||
}
|
Reference in New Issue
Block a user