-
Notifications
You must be signed in to change notification settings - Fork 4
/
test.go
47 lines (37 loc) · 1021 Bytes
/
test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package main
import (
// "encoding/json"
// "io/ioutil"
// "net/http"
// "github.com/spf13/viper"
// "log"
// "strconv"
// "time"
// "reflect"
// "time"
// "bytes"
ui "github.com/gizak/termui/v3"
"github.com/gizak/termui/v3/widgets"
// ui "github.com/GideonWolfe/termui/v3"
// "github.com/GideonWolfe/termui/v3/widgets"
)
// based on an input course object, this function generates
// a grid with widgets populated with data from the course
func placeholder() *ui.Grid {
// var assignments *[]Assignment = fetchAssignments(course.ID)
// dummy placeholder widget
p0 := widgets.NewParagraph()
p0.Title = "Overview"
p0.Text = "This is a placeholder dashboard"
p0.Border = true
assignmentGrid := ui.NewGrid()
termWidth, termHeight := ui.TerminalDimensions()
assignmentGrid.SetRect(0, 0, termWidth, termHeight)
assignmentGrid.Title = "Course Something Grid"
assignmentGrid.Set(
ui.NewRow(1.0,
ui.NewCol(1.0, p0), // left column for pages
),
)
return assignmentGrid
}