WIP: stuff

This commit is contained in:
2025-04-05 14:27:36 -04:00
parent 93bc18022a
commit dd0995b241
47 changed files with 6148 additions and 474 deletions

View File

@ -0,0 +1,33 @@
package models
import "github.com/charmbracelet/lipgloss"
type Header struct {
style lipgloss.Style
}
func NewHeader() *Header {
s := lipgloss.NewStyle().
AlignHorizontal(lipgloss.Center).
AlignVertical(lipgloss.Bottom).
MarginTop(1)
return &Header{
style: s,
}
}
func (h *Header) Gen(width int, items ...string) string {
s := h.style.Width(width)
pp := lipgloss.JoinHorizontal(lipgloss.Center, items...)
return s.Render(pp)
}
func (h *Header) GenItem(text string) string {
return lipgloss.NewStyle().
Foreground(lipgloss.Color("#cdd6f4")).
Margin(0, 1).
Render(text)
}