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