package components import "github.com/tigorlazuardi/redmage/models" import "fmt" import "github.com/tigorlazuardi/redmage/views/utils" type ImageCardOption uint func (o ImageCardOption) Has(opt ImageCardOption) bool { return o&opt != 0 } const ( HideTitle ImageCardOption = 1 << iota HideSubreddit HidePoster ) templ ImageCard(data *models.Image, opts ImageCardOption) {
{ fmt.Sprintf("%d \u00d7 %d", data.ImageWidth, data.ImageHeight) } px
{ formatByteSize(data.ImageSize) }