util

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TitleBoxStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Right = "├"
		return lipgloss.NewStyle().BorderStyle(b).Padding(0, 1)
	}()

	InfoBoxStyle = func() lipgloss.Style {
		b := lipgloss.RoundedBorder()
		b.Left = "┤"
		return TitleBoxStyle.Copy().BorderStyle(b)
	}()

	CursorStyle = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("5"))
	ScoreStyle  = lipgloss.NewStyle().Bold(false).Foreground(lipgloss.Color("8"))

	TopicTextStyle   = lipgloss.NewStyle().Bold(false).Foreground(lipgloss.Color("8")).MarginLeft(4)
	TopicAuthorStyle = lipgloss.NewStyle().Bold(false).Foreground(lipgloss.Color("8"))
	LinkStyle        = lipgloss.NewStyle().Italic(true).Foreground(lipgloss.Color("1"))
	ItalicStyle      = lipgloss.NewStyle().Italic(true)
	QuoteStyle       = lipgloss.NewStyle().Foreground(lipgloss.Color("2"))
	TitleStyle       = lipgloss.NewStyle().Bold(true)

	CommentAuthorStyle = lipgloss.NewStyle().Bold(false).Foreground(lipgloss.Color("8"))
	CommentTextStyle   = lipgloss.NewStyle().MarginLeft(4).PaddingBottom(1)
)

Functions

func HtmlToText

func HtmlToText(s string) string

htmlToText converts a hackernews text message which may contain HTML (like <p> tags) to plain text.

func Max

func Max(a, b int) int

func PadRight

func PadRight(str string, length int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL