bs

package module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

README

Bootstrap (bs)

Declaratve building of Bootstrap components.

Its an extension of the HTML Builder package: https://github.com/gouniverse/hb

Alerts

bs.Alert().Class("alert-info").HTML("Info text")

bs.Alert().Class("alert-danger").HTML("Danger text")

bs.Alert().Class("alert-success").HTML("Success text")

bs.Alert().Class("alert-warning").HTML("Warning text")

Cards

card := bs.Card().ID("CardLeadsPreview").AddChildren([]*hb.Tag{
	bs.CardHeader().Child(hb.NewHeading5().HTML("Leads Preview")),
	bs.CardBody().Child(preview),
})

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Alert added in v0.4.1

func Alert() *hb.Tag
func Breadcrumbs(breadcrumbs []Breadcrumb) *hb.Tag

func Button added in v0.0.4

func Button() *hb.Tag
func ButtonLink() *hb.Tag

func Card added in v0.0.3

func Card() *hb.Tag

func CardBody added in v0.0.3

func CardBody() *hb.Tag

func CardFooter added in v0.0.3

func CardFooter() *hb.Tag

func CardHeader added in v0.0.3

func CardHeader() *hb.Tag

func CardImageTop added in v0.1.0

func CardImageTop() *hb.Tag

func CardTitle added in v0.2.0

func CardTitle() *hb.Tag

func Column

func Column(width int) *hb.Tag

func Container

func Container() *hb.Tag

func FormGroup

func FormGroup() *hb.Tag

func FormInput

func FormInput() *hb.Tag

func FormLabel

func FormLabel(label string) *hb.Tag

func FormSelect

func FormSelect() *hb.Tag

func FormSelectOption

func FormSelectOption(name string, value string) *hb.Tag

func FormText

func FormText(text string) *hb.Tag
func NavItem() *hb.Tag
func NavLink() *hb.Tag
func NavTabs() *hb.Tag

func Pagination added in v0.4.2

func Pagination(options PaginationOptions) string

func Row added in v0.0.2

func Row() *hb.Tag

func TabContent added in v0.0.2

func TabContent() *hb.Tag

func TabPane added in v0.0.2

func TabPane() *hb.Tag

Types

type Breadcrumb struct {
	URL   string
	Name  string
	Class string
	Icon  string
}

type PaginationOptions added in v0.4.2

type PaginationOptions struct {
	NumberItems       int
	CurrentPageNumber int
	PerPage           int
	PagesToShow       int
	URL               string
	FirstPageStartsAt int
}

Jump to

Keyboard shortcuts

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