Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendAssetHandlers ¶
func AppendAssetHandlers(mux *http.ServeMux, opts *BootstrapOptions) error
Append all the files in the net/http FS instance containing the embedded Bootstrap assets to an *http.ServeMux instance.
func AppendResourcesHandler ¶
func AppendResourcesHandler(next http.Handler, opts *BootstrapOptions) http.Handler
AppendResourcesHandler will rewrite any HTML produced by previous handler to include the necessary markup to load Bootstrap JavaScript files and related assets.
Types ¶
type BootstrapOptions ¶
type BootstrapOptions struct { // A list of relative Bootstrap Javascript URLs to append as resources in HTML output. JS []string // A list of relative Bootstrap CSS URLs to append as resources in HTML output. CSS []string // AppendJavaScriptAtEOF is a boolean flag to append JavaScript markup at the end of an HTML document // rather than in the <head> HTML element. Default is false AppendJavaScriptAtEOF bool RollupAssets bool Prefix string }
BootstrapOptions provides a list of JavaScript and CSS link to include with HTML output.
func DefaultBootstrapOptions ¶
func DefaultBootstrapOptions() *BootstrapOptions
Return a *BootstrapOptions struct with default paths and URIs.
func (*BootstrapOptions) EnableJavascript ¶
func (opts *BootstrapOptions) EnableJavascript()
Click to show internal directories.
Click to hide internal directories.