Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
Add generates the favicons and adds the following routes to the passed chi.Router. It assumes the router represents the root of the domain.
- apple-touch-icon.png
- favicon.png
- favicon-32x32.png
- favicon-16x16.png
- browserconfig.xml
- mstile-150x150.png
- site.webmanifest
- android-chrome-512x512.png
- android-chrome-192x192.png
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.