💄 style(ui): Adjust border styling

This commit is contained in:
punkfairie 2024-09-07 15:43:19 -07:00
parent 3aca5c2bc4
commit 23cb9e1d89
2 changed files with 32 additions and 12 deletions

20
colors.sh Executable file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env sh
usage() {
echo "show-ansi-colors <n>"
exit 0
}
(( $# < 1 )) && usage
show_ansi_colors() {
local colors=$1
echo "showing $colors ansi colors:"
for (( n=0; n < $colors; n++ )) do
printf " [%d] $(tput setaf $n)%s$(tput sgr0)" $n "wMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMwMw
"
done
echo
}
show_ansi_colors "$@"

24
main.go
View file

@ -25,10 +25,9 @@ type menu struct {
func initialModel() menu { func initialModel() menu {
return menu{ return menu{
current: 0, current: 0,
keys: keys, keys: keys,
help: help.New(), help: help.New(),
inputStyle: gloss.NewStyle().Foreground(gloss.Color("#FF75B7")),
} }
} }
@ -163,15 +162,16 @@ func (m menu) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
} }
func (m menu) View() string { func (m menu) View() string {
mainStyle := gloss.NewStyle(). borderStyle := gloss.NewStyle().
Width(int(float64(width) * 0.65)). BorderStyle(gloss.RoundedBorder()).
BorderStyle(gloss.NormalBorder()). BorderForeground(gloss.Color("5")).
BorderForeground(gloss.Color("63")) Padding(0, 1)
sidebarStyle := gloss.NewStyle(). mainStyle := borderStyle.
Width(int(float64(width) * 0.3)). Width(int(float64(width) * 0.65))
BorderStyle(gloss.NormalBorder()).
BorderForeground(gloss.Color("63")) sidebarStyle := borderStyle.
Width(int(float64(width) * 0.3))
mainContent := "" mainContent := ""
sidebarContent := "" sidebarContent := ""