components

package
v0.0.0-...-69f3c8d Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	Title       string
	Thumbnail   string
	Text        string
	PublishDate time.Time
	Comments
	Loading    bool
	Engagement int
	Likes      int
}

func (*Article) AddComment

func (c *Article) AddComment(text string)

func (*Article) AddLike

func (c *Article) AddLike()

func (*Article) CalculateEngagement

func (c *Article) CalculateEngagement()

func (*Article) Compute

func (c *Article) Compute()

func (*Article) Init

func (c *Article) Init(ctx vugu.InitCtx)

func (*Article) RemoveLike

func (c *Article) RemoveLike()

type Articles

type Articles struct {
	Items []*Article
	Topic string
	Order *pq.Queue
}

func NewArticles

func NewArticles() *Articles

func (*Articles) AddArticle

func (a *Articles) AddArticle(art *Article)

func (*Articles) Init

func (a *Articles) Init()

func (*Articles) SortByEngagement

func (a *Articles) SortByEngagement()

type Comment

type Comment struct {
	Content   string
	Author    string
	Published time.Time
	Likes     int
	Replies   []Comment
	Loading   bool
	vugu.Builder
}

func (*Comment) AddLike

func (c *Comment) AddLike()

func (*Comment) RemoveLike

func (c *Comment) RemoveLike()

type Comments

type Comments struct {
	Items []*Comment
}
type Footer struct{}
type Navigation struct {
	vgrouter.NavigatorRef
	state.PageInfoRef
}

type NotFound

type NotFound struct {
	Image  string `vugu:"data"`
	Loaded bool   `vugu:"data"`
}

func (*NotFound) Init

func (c *NotFound) Init(ctx vugu.InitCtx)

type Response

type Response struct {
	Msg string `vugu:"data"`
}

type Root

type Root struct {
	Body     vugu.Builder // main body content
	FullBody vugu.Builder // body section without any wrapping

	state.PageInfoRef
	vugu.Builder
	AutoReload bool // set to true during dev
}

Jump to

Keyboard shortcuts

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