mirror of
https://github.com/anotherhadi/spilltea.git
synced 2026-05-20 09:42:34 +02:00
Init
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user