components

package
v0.0.0-...-0312549 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserProvided = bricks.ComponentMust("UserProvided",
	bricks.SourceRaw("userProvided.html", sourceUserProvided),
	bricks.OnLoad(func(r *http.Request, args ...any) (data any, err error) {
		var uri string
		err = errors.Join(
			bricks.Kwarg("uri", &uri, "", args...),
		)
		if err != nil {
			return
		}
		var reader io.ReadCloser
		reader, err = gokit.FileReader(uri)
		if err != nil {
			return
		}
		defer reader.Close()
		var raw []byte
		raw, err = io.ReadAll(reader)
		data = template.HTML(raw)
		return
	}),
)

Functions

func FeedView

func FeedView(client api.Client, sanipol *bluemonday.Policy) (c *bricks.Component)

Types

type FeedData

type FeedData struct {
	Feed    feeds.Feed
	CanPage bool
	Page    int
	MinPage int
	MaxPage int
	Error   error
}

Jump to

Keyboard shortcuts

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