Documentation ¶
Index ¶
- Variables
- func AssetUrl(path string) string
- func Decompress(in io.Reader, out io.Writer) error
- func ExtractIdFromString(s string) string
- func GetFileNameFromUrl(url string, extension bool) string
- func IsHtmxRequest(c echo.Context) bool
- func NotFoundError(c echo.Context) error
- func RemoveExtension(s string) string
- func ServerFaultError(c echo.Context) error
- func SetBoolWithFallback(value *bool, fallback bool)
- func Slugify(s string) string
- func StrippedHTML(s string) string
- type Century
- type Composer
- type Pagination
- func (p *Pagination) FirstPart() []string
- func (p *Pagination) GetActivePageWrapper(text string) string
- func (p *Pagination) GetAvailablePageWrapper(href, page, htmxUrl string) string
- func (p *Pagination) GetDisabledPageWrapper(text string) string
- func (p *Pagination) GetDots() string
- func (p *Pagination) GetNextButton(text string) string
- func (p *Pagination) GetPreviousButton(text string) string
- func (p *Pagination) HasPages() bool
- func (p *Pagination) LastPart() []string
- func (p *Pagination) MiddlePart() []string
- func (p *Pagination) Render() template.HTML
- func (p *Pagination) TotalPages() int
- type Song
- type UrlData
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateFuncs = template.FuncMap{ "now": time.Now, "timeSince": time.Since, "timeUntil": time.Until, "formatTime": formatTime, "approxDuration": approxDuration, "uppercase": strings.ToUpper, "lowercase": strings.ToLower, "pluralize": pluralize, "slugify": Slugify, "safeHTML": safeHTML, "strippedHTML": StrippedHTML, "removeExt": RemoveExtension, "join": strings.Join, "incr": incr, "incrBy": incrBy, "decr": decr, "decrBy": decrBy, "formatInt": formatInt, "formatFloat": formatFloat, "yesno": yesno, "urlSetParam": urlSetParam, "urlDelParam": urlDelParam, "getFileNameFromUrl": GetFileNameFromUrl, "marshalJSON": marshalJSON, }
Functions ¶
func ExtractIdFromString ¶ added in v0.0.31
ExtractIdFromString extracts the ID from a string.
func GetFileNameFromUrl ¶
func IsHtmxRequest ¶
func IsHtmxRequest(c echo.Context) bool
IsHtmxRequest checks if the request is an htmx request by checking the value of the "HX-Request" header.
func NotFoundError ¶ added in v0.0.31
func NotFoundError(c echo.Context) error
NotFoundError is a handler that returns a 404 error page.
func RemoveExtension ¶
func ServerFaultError ¶ added in v0.0.31
func ServerFaultError(c echo.Context) error
func SetBoolWithFallback ¶
func StrippedHTML ¶
Types ¶
type Pagination ¶
type Pagination struct {
// contains filtered or unexported fields
}
func NewPagination ¶
func NewPagination(totalAmount, perPage, currentPage int, baseUrl string, htmxTarget string, htmxUrl string) *Pagination
constructor
func (*Pagination) FirstPart ¶
func (p *Pagination) FirstPart() []string
func (*Pagination) GetActivePageWrapper ¶
func (p *Pagination) GetActivePageWrapper(text string) string
func (*Pagination) GetAvailablePageWrapper ¶
func (p *Pagination) GetAvailablePageWrapper(href, page, htmxUrl string) string
func (*Pagination) GetDisabledPageWrapper ¶
func (p *Pagination) GetDisabledPageWrapper(text string) string
func (*Pagination) GetDots ¶
func (p *Pagination) GetDots() string
func (*Pagination) GetNextButton ¶
func (p *Pagination) GetNextButton(text string) string
func (*Pagination) GetPreviousButton ¶
func (p *Pagination) GetPreviousButton(text string) string
func (*Pagination) HasPages ¶
func (p *Pagination) HasPages() bool
HasPages returns true if there are more than one pages in the pagination.
func (*Pagination) LastPart ¶
func (p *Pagination) LastPart() []string
func (*Pagination) MiddlePart ¶
func (p *Pagination) MiddlePart() []string
func (*Pagination) Render ¶
func (p *Pagination) Render() template.HTML
Render generates the HTML for the pagination component and returns it as a template.HTML value.
func (*Pagination) TotalPages ¶
func (p *Pagination) TotalPages() int
TotalPages returns the total number of pages in the pagination.
Click to show internal directories.
Click to hide internal directories.