mirror of
https://github.com/maaslalani/slides.git
synced 2026-01-08 22:07:59 -05:00
Search Styles
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package navigation
|
||||
|
||||
import (
|
||||
"github.com/charmbracelet/bubbles/textinput"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/charmbracelet/bubbles/textinput"
|
||||
"github.com/maaslalani/slides/styles"
|
||||
)
|
||||
|
||||
// Model is an interface for models.model, so that cycle imports are avoided
|
||||
@@ -23,9 +25,12 @@ type Search struct {
|
||||
}
|
||||
|
||||
func NewSearch() Search {
|
||||
sti := textinput.NewModel()
|
||||
sti.Placeholder = "search..."
|
||||
return Search{SearchTextInput: sti}
|
||||
ti := textinput.NewModel()
|
||||
ti.Placeholder = "search"
|
||||
ti.Prompt = "/"
|
||||
ti.PromptStyle = styles.Search
|
||||
ti.TextStyle = styles.Search
|
||||
return Search{SearchTextInput: ti}
|
||||
}
|
||||
|
||||
func (s *Search) Query() string {
|
||||
|
||||
@@ -18,15 +18,12 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
Author = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Left).MarginLeft(2)
|
||||
Date = lipgloss.NewStyle().Faint(true).Align(lipgloss.Left).Margin(0, 1)
|
||||
Page = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Right).MarginRight(3)
|
||||
Slide = lipgloss.NewStyle().Padding(1)
|
||||
Status = lipgloss.NewStyle().Padding(1)
|
||||
ActionStatus = lipgloss.NewStyle().
|
||||
Foreground(salmon).
|
||||
Align(lipgloss.Left).
|
||||
MarginLeft(3)
|
||||
Author = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Left).MarginLeft(2)
|
||||
Date = lipgloss.NewStyle().Faint(true).Align(lipgloss.Left).Margin(0, 1)
|
||||
Page = lipgloss.NewStyle().Foreground(salmon).Align(lipgloss.Right).MarginRight(3)
|
||||
Slide = lipgloss.NewStyle().Padding(1)
|
||||
Status = lipgloss.NewStyle().Padding(1)
|
||||
Search = lipgloss.NewStyle().Faint(true).Align(lipgloss.Left).MarginLeft(2)
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user