Documentation
¶
Overview ¶
Package tui provides an interactive terminal user interface for markata-go.
The TUI is built using Bubble Tea and provides a k9s-inspired interface for browsing and managing site content.
Features ¶
- Post list with filtering and sorting
- Tag browsing
- Feed navigation
- Vim-like keybindings
Usage ¶
markata-go tui
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPaletteNameFromConfig ¶
GetPaletteNameFromConfig extracts the palette name from config.Extra.
Types ¶
type Colors ¶
type Colors struct {
// Header/title colors
Header lipgloss.Color
// Subtle/muted text colors
Subtle lipgloss.Color
// Selected/highlighted item colors
Selected lipgloss.Color
SelectedBg lipgloss.Color
SelectedText lipgloss.Color
// Border colors
Border lipgloss.Color
BorderFocus lipgloss.Color
// Table colors
TableHeader lipgloss.Color
TableCell lipgloss.Color
TableSelected lipgloss.Color
// Menu colors
MenuFg lipgloss.Color
MenuBg lipgloss.Color
}
Colors holds resolved colors for TUI styling. These are mapped from palette semantic colors to TUI-specific uses.
func DefaultColors ¶
func DefaultColors() *Colors
DefaultColors returns fallback colors when no palette is configured. These match the original hardcoded ANSI codes for backward compatibility.
func LoadColors ¶
LoadColors loads TUI colors from a palette. If the palette cannot be loaded, returns default colors.
type FilterContext ¶
type FilterContext struct {
Type string // "tag" or "feed"
Name string // The tag name or feed name
}
FilterContext tracks the active filter for drill-down navigation
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the main Bubble Tea model
func NewModelWithTheme ¶
NewModelWithTheme creates a new TUI model with the specified theme. If theme is nil, the default theme is used.
type Theme ¶
type Theme struct {
Colors *Colors
// Pre-built styles
HeaderStyle lipgloss.Style
SubtleStyle lipgloss.Style
SelectedStyle lipgloss.Style
DetailLabelStyle lipgloss.Style
DetailBoxStyle lipgloss.Style
DetailStatusStyle lipgloss.Style
SortMenuStyle lipgloss.Style
}
Theme holds the Lipgloss styles for the TUI. Styles are initialized from Colors.