mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 17:52:33 +02:00
e8e64eff12
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
38 lines
597 B
Go
38 lines
597 B
Go
package docs
|
|
|
|
import (
|
|
"strings"
|
|
|
|
spilltea "github.com/anotherhadi/spilltea"
|
|
|
|
"charm.land/bubbles/v2/viewport"
|
|
tea "charm.land/bubbletea/v2"
|
|
)
|
|
|
|
func readDoc(name string) string {
|
|
b, _ := spilltea.DocsFS.ReadFile(".github/docs/" + name)
|
|
return string(b)
|
|
}
|
|
|
|
var contentMarkdown = strings.Join([]string{
|
|
readDoc("main.md"),
|
|
readDoc("proxy.md"),
|
|
readDoc("certificate.md"),
|
|
readDoc("history.md"),
|
|
readDoc("scopes.md"),
|
|
}, "\n")
|
|
|
|
type Model struct {
|
|
viewport viewport.Model
|
|
}
|
|
|
|
func New() Model {
|
|
return Model{
|
|
viewport: viewport.New(),
|
|
}
|
|
}
|
|
|
|
func (e Model) Init() tea.Cmd {
|
|
return nil
|
|
}
|