Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(r *gin.RouterGroup, o Options) error
Add generates the below favicon formats and adds them to the passed gin.RouterGroup.
Types ¶
type Options ¶
type Options struct {
// Name is the name of the app as used for the webmanifest.
Name string
// ShortName is the short name of the app as used for the webmanifest.
//
// If empty, [Options.Name] will be used.
ShortName string
// The display mode as used in the webmanifest.
//
// Defaults to `standalone`.
Display string
// StartURL is the start URL as used in the webmanifest.
StartURL string
// ThemeColor is the theme color as used in the webmanifest.
//
// Defaults to `#ffffff`.
ThemeColor string
// BackgroundColor is the background color as used in the webmanifest.
//
// Defaults to `#ffffff`.
BackgroundColor string
// TileColor is the tile color as used in the browserconfig.
//
// Defaults to `#da532c`.
TileColor string
// Favicon is png-encoded base icon.
Favicon []byte
// AppleTouchIcon is an alternative icon used as the apple-touch-icon.
//
// If not set, [Options.Favicon] is used.
AppleTouchIcon []byte
}
Click to show internal directories.
Click to hide internal directories.