Documentation
¶
Overview ¶
Package bootstrap provides a design system contrib app using Bootstrap 5, Bootstrap Icons, and htmx. It embeds static assets and provides HTML layouts that can be used as the default layout for all pages. The layout is injected via middleware only when no other layout is already set in the request context.
The app ships three color themes (blue, purple, gray) selectable via WithColor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App implements a design system contrib app providing Bootstrap CSS/JS and htmx.
func (*App) Dependencies ¶
func (*App) Middleware ¶
Middleware returns middleware that injects the bootstrap layout into the request context when no layout is already set.
func (*App) TemplateFS ¶
TemplateFS returns the embedded HTML template files with the CSS link template generated from the configured color theme.
type Option ¶ added in v0.6.0
type Option func(*App)
Option configures the bootstrap app.
func WithCustomCSS ¶ added in v0.6.0
WithCustomCSS sets a custom CSS file path (relative to staticfiles). This overrides WithColor. The CSS file must be served by the staticfiles app — either embedded in your app's static FS or in a contrib app.
bootstrap.New(bootstrap.WithCustomCSS("myapp/mytheme.min.css"))