Change summary
cmd/task/list.go | 2 +-
internal/ui/styles.go | 17 ++++++++++++++++-
2 files changed, 17 insertions(+), 2 deletions(-)
Detailed changes
@@ -71,7 +71,7 @@ func runList(cmd *cobra.Command, _ []string) error {
tasks = applyFilters(tasks, areaID, statusFilter, showAll)
if len(tasks) == 0 {
- fmt.Fprintln(cmd.OutOrStdout(), ui.Muted.Render("No tasks found"))
+ fmt.Fprintln(cmd.OutOrStdout(), "No tasks found")
return nil
}
@@ -17,10 +17,25 @@ var (
Success = lipgloss.NewStyle().Foreground(lipgloss.Color("2")) // green
Warning = lipgloss.NewStyle().Foreground(lipgloss.Color("3")) // yellow
Error = lipgloss.NewStyle().Foreground(lipgloss.Color("1")) // red
- Muted = lipgloss.NewStyle().Foreground(lipgloss.Color("8")) // gray
Bold = lipgloss.NewStyle().Bold(true)
)
+// Heading styles with backgrounds for contrast on any theme.
+var (
+ // H1 is the primary heading style (top-level items).
+ H1 = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(lipgloss.Color("0")).
+ Background(lipgloss.Color("4")).
+ Padding(0, 1)
+ // H2 is the secondary heading style (nested items).
+ H2 = lipgloss.NewStyle().
+ Bold(true).
+ Foreground(lipgloss.Color("0")).
+ Background(lipgloss.Color("6")).
+ Padding(0, 1)
+)
+
// FormatDate formats a time.Time as a date string using the user's locale.
// Locale is auto-detected from LC_TIME, LC_ALL, or LANG environment variables.
func FormatDate(t time.Time) string {