28 lines
1.8 KiB
Go
28 lines
1.8 KiB
Go
package tui
|
|
|
|
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)
|
|
// 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"))
|
|
// 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"))
|
|
// 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)
|
|
)
|
|
|