bootstrap

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2026 License: EUPL-1.2 Imports: 7 Imported by: 0

Documentation

Overview

Package bootstrap provides a design system contrib app using Bootstrap 5, Bootstrap Icons, and htmx. It embeds static assets and provides a base HTML layout 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.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Layout

func Layout() string

Layout returns the template name for the bootstrap layout.

Types

type App

type App struct{}

App implements a design system contrib app providing Bootstrap CSS/JS and htmx.

func New

func New() *App

New creates a new bootstrap design app.

func (*App) Dependencies

func (a *App) Dependencies() []string

func (*App) FuncMap

func (a *App) FuncMap() template.FuncMap

FuncMap returns template functions provided by the bootstrap app.

func (*App) Middleware

func (a *App) Middleware() []func(http.Handler) http.Handler

Middleware returns middleware that injects the bootstrap layout into the request context when no layout is already set. This makes bootstrap the default layout while allowing srv.SetLayout() or route-level overrides to take precedence.

func (*App) Name

func (a *App) Name() string

func (*App) Register

func (a *App) Register(_ *burrow.AppConfig) error

func (*App) StaticFS

func (a *App) StaticFS() (string, fs.FS)

StaticFS returns the embedded static assets under the "bootstrap" prefix.

func (*App) TemplateFS

func (a *App) TemplateFS() fs.FS

TemplateFS returns the embedded HTML template files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL