Add credits footer

This commit is contained in:
Yohann D'ANELLO 2022-05-04 21:29:52 +02:00
parent 98559b66aa
commit 04025866b2
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
1 changed files with 4 additions and 1 deletions

View File

@ -315,7 +315,10 @@ func (m model) wordsView() string {
func (m model) footerView() string {
info := infoStyle.Render(fmt.Sprintf("%3.f%%", m.wordsViewport.ScrollPercent()*100))
line := strings.Repeat("─", int(math.Max(0, float64(m.wordsViewport.Width-lipgloss.Width(info)))))
return lipgloss.JoinHorizontal(lipgloss.Center, line, info)
credits := "Inspiration : https://cemantix.herokuapp.com/ (@enigmathix)\n" +
"Sources : https://gitlab.crans.org/ynerant/cemantix-charm (@ynerant)\n" +
"Données : Wikipédia France (+ Word2Vec), Grammalecte"
return lipgloss.JoinVertical(lipgloss.Center, lipgloss.JoinHorizontal(lipgloss.Center, line, info), credits)
}
func (m model) View() string {