mirror of
https://github.com/glanceapp/glance.git
synced 2024-11-23 08:54:16 +01:00
24 lines
408 B
Go
24 lines
408 B
Go
|
package widget
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"html/template"
|
||
|
|
||
|
"github.com/glanceapp/glance/internal/assets"
|
||
|
)
|
||
|
|
||
|
type Clock struct {
|
||
|
widgetBase `yaml:",inline"`
|
||
|
}
|
||
|
|
||
|
func (widget *Clock) Initialize() error {
|
||
|
widget.withTitle("Clock").withError(nil)
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (widget *Clock) Update(ctx context.Context) {}
|
||
|
|
||
|
func (widget *Clock) Render() template.HTML {
|
||
|
return widget.render(widget, assets.ClockTemplate)
|
||
|
}
|