layout

package
v0.0.0-...-fe515d1 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePostHighlightTag

func CreatePostHighlightTag(id int) string

CreatePostHighlightTag : ポストのハイライトタグを作成

func CreateStyledText

func CreateStyledText(style, text, url string) string

CreateStyledText : スタイルありのテキストを作成

func GetWindowSize

func GetWindowSize() (int, int)

GetWindowSize : 表示領域の幅を取得

func Truncate

func Truncate(s string, l int) string

Truncate : …で省略

Types

type Layout

type Layout struct {
	Writer     io.Writer
	Template   *config.Template
	Appearance *config.Appearance
	Text       *config.Text
	Style      *config.Style
}

func (*Layout) CreatePost

func (l *Layout) CreatePost(i int, p *sharedapi.Post) (string, error)

CreatePost : 投稿のレイアウトを作成

func (*Layout) CreatePostSeparator

func (l *Layout) CreatePostSeparator(sep string, w int) string

CreatePostSeparator : 投稿のセパレータを作成

Jump to

Keyboard shortcuts

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