Add Calendar widget to display the monthly calendar and integrate it into the layout
This commit is contained in:
@@ -34,6 +34,7 @@ func initWidgets(ctx context.Context, term *tcell.Terminal) {
|
||||
widgets.Create(ctx, term,
|
||||
widgets.New("Clock", widgets.Clock()),
|
||||
widgets.New("Date", widgets.Date()),
|
||||
widgets.New("Calendar", widgets.Calendar()),
|
||||
widgets.New("ChangeTitle", widgets.TextInput(titleUpdate, textinput.Label("Update Title: "), textinput.PlaceHolder("New Title"))),
|
||||
widgets.New("Wifi", widgets.WifiQRCode()),
|
||||
widgets.New("NetworkDevices", widgets.NetworkDevices()),
|
||||
@@ -73,15 +74,7 @@ func layout() []container.Option {
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(3,
|
||||
grid.Widget(widgets.Get["Date"],
|
||||
container.AlignHorizontal(align.HorizontalCenter),
|
||||
container.BorderTitle("Date"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite),
|
||||
),
|
||||
),
|
||||
grid.RowHeightFixed(8,
|
||||
grid.RowHeightFixed(11,
|
||||
grid.Widget(widgets.Get["PiHole"],
|
||||
container.BorderTitle("pi-hole"),
|
||||
container.Border(linestyle.Light),
|
||||
@@ -99,7 +92,18 @@ func layout() []container.Option {
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
),
|
||||
),
|
||||
grid.ColWidthPerc(35,
|
||||
grid.ColWidthPerc(10,
|
||||
grid.RowHeightFixed(19,
|
||||
grid.Widget(widgets.Get["Calendar"],
|
||||
container.BorderTitle("Calendar"),
|
||||
container.Border(linestyle.Light),
|
||||
container.BorderColor(cell.ColorWhite)),
|
||||
),
|
||||
grid.RowHeightPerc(25,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
),
|
||||
),
|
||||
grid.ColWidthPerc(25,
|
||||
grid.RowHeightPerc(25,
|
||||
grid.Widget(widgets.Get["empty"]),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user