annotated main
This commit is contained in:
parent
bbbd0d60b6
commit
3071ce4250
5 changed files with 26 additions and 10 deletions
15
styles.go
15
styles.go
|
|
@ -4,16 +4,25 @@ import "github.com/charmbracelet/lipgloss"
|
|||
|
||||
// Styles for calendar cells and headers
|
||||
var (
|
||||
// this is the style thats used as the default style for the month view
|
||||
cellStyle = lipgloss.NewStyle().Width(cellW).Height(cellH).Align(lipgloss.Center)
|
||||
selectedStyle = cellStyle.Copy().Bold(true).Background(lipgloss.Color("12")).Foreground(lipgloss.Color("15")) // Blue bg
|
||||
// this is the style that sets the current selected hours bg to orange and text to white
|
||||
selectedStyle = cellStyle.Copy().Bold(true).Background(lipgloss.Color("12")).Foreground(lipgloss.Color("15"))
|
||||
// this is the style that sets the color of cells that are not in use for a given month
|
||||
unselectedStyle = cellStyle.Copy().Background(lipgloss.Color("236")).Foreground(lipgloss.Color("250"))
|
||||
todayStyle = cellStyle.Copy().Background(lipgloss.Color("99")).Foreground(lipgloss.Color("15")).Bold(true) // Purple bg + white text
|
||||
// this is the style that sets the color of todays cell to purple bg white text
|
||||
todayStyle = cellStyle.Copy().Background(lipgloss.Color("99")).Foreground(lipgloss.Color("15")).Bold(true)
|
||||
// this is the style that defines the header where the current months name goes
|
||||
headerStyle = lipgloss.NewStyle().Width(numCols * cellW).Align(lipgloss.Center).Bold(true)
|
||||
// this is the style that defines the DoW header where mon-sun go
|
||||
daysOfWeekStyle = lipgloss.NewStyle().Width(cellW).Align(lipgloss.Center).Bold(true)
|
||||
|
||||
// Styles for hourly view cells
|
||||
// this is the style thats used as the default for the hours view
|
||||
hourCellStyle = lipgloss.NewStyle().Width(cellW * 3).Height(cellH).Align(lipgloss.Left).PaddingLeft(1)
|
||||
// This is the style that sets the current selected hours style to orange bg white text
|
||||
hourSelectedStyle = hourCellStyle.Copy().Bold(true).Background(lipgloss.Color("12")).Foreground(lipgloss.Color("15"))
|
||||
currentHourStyle = hourCellStyle.Copy().Background(lipgloss.Color("99")).Foreground(lipgloss.Color("15")).Bold(true) // Purple bg + white text
|
||||
// this is the style that sets the current hour to purple bg and white text
|
||||
currentHourStyle = hourCellStyle.Copy().Background(lipgloss.Color("99")).Foreground(lipgloss.Color("15")).Bold(true)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue