Documentation
¶
Index ¶
- func Alert() *hb.Tag
- func Breadcrumbs(breadcrumbs []Breadcrumb) *hb.Tag
- func Button() *hb.Tag
- func ButtonLink() *hb.Tag
- func Card() *hb.Tag
- func CardBody() *hb.Tag
- func CardFooter() *hb.Tag
- func CardHeader() *hb.Tag
- func CardImageTop(src string) *hb.Tag
- func CardTitle() *hb.Tag
- func Column(width int) *hb.Tag
- func Container() *hb.Tag
- func FormCheck() *hb.Tag
- func FormCheckBox() *hb.Tag
- func FormCheckLabel() *hb.Tag
- func FormCheckRadio() *hb.Tag
- func FormGroup() *hb.Tag
- func FormInput() *hb.Tag
- func FormInputPlaintext() *hb.Tag
- func FormLabel(label string) *hb.Tag
- func FormSelect() *hb.Tag
- func FormSelectOption(optionKey string, optionName string) *hb.Tag
- func FormText(text string) *hb.Tag
- func FormTextArea() *hb.Tag
- func InputGroup() *hb.Tag
- func InputGroupText() *hb.Tag
- func Modal() *hb.Tag
- func ModalBody() *hb.Tag
- func ModalContent() *hb.Tag
- func ModalDialog() *hb.Tag
- func ModalFooter() *hb.Tag
- func ModalHeader() *hb.Tag
- func Nav() *hb.Tag
- func NavItem() *hb.Tag
- func NavLink() *hb.Tag
- func NavPills() *hb.Tag
- func NavTabs() *hb.Tag
- func Pagination(options PaginationOptions) string
- func Row() *hb.Tag
- func TabContent() *hb.Tag
- func TabPane() *hb.Tag
- type Breadcrumb
- type PaginationOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Breadcrumbs ¶
func Breadcrumbs(breadcrumbs []Breadcrumb) *hb.Tag
func ButtonLink ¶
func CardFooter ¶
func CardHeader ¶
func CardImageTop ¶
func FormCheckBox ¶
func FormCheckLabel ¶
func FormCheckRadio ¶
func FormInputPlaintext ¶
func FormSelect ¶
func FormTextArea ¶
func InputGroup ¶
func InputGroupText ¶
func ModalContent ¶
func ModalDialog ¶
func ModalFooter ¶
func ModalHeader ¶
func Pagination ¶
func Pagination(options PaginationOptions) string
Pagination generates a pagination component given the options.
The options are: - NumberItems: The total number of items that are being paginated. - CurrentPageNumber: The current page number that is being displayed. - PerPage: The number of items per page. - PagesToShow: The number of pages to show in the pagination component. - URL: The base URL of the pagination component. - FirstPageStartsAt: The page number at which the first page starts.
The pagination component will generate a list of page numbers from min to max, where min is the minimum page number that should be displayed, and max is the maximum page number that should be displayed. The page numbers will be hyperlinked to the URL with the page number appended to the end. The page numbers will be displayed in a <nav> element with a <ul> element containing the page numbers. If the previous page number is greater than or equal to the first page starts at, then a previous page link will be displayed. If the next page number is less than the maximum page number, then a next page link will be displayed. The previous and next page links will be displayed in <li> elements with the class "page-item". The page numbers will be displayed in <li> elements with the class "page-item" and the class "active" if the page number matches the current page number.
The function will return an empty string if the maximum page number is less than 2.
Example:
options := PaginationOptions{
NumberItems: 10,
CurrentPageNumber: 2,
PerPage: 5,
PagesToShow: 5,
URL: "/users/profile/",
FirstPageStartsAt: 1,
}
pagination := Pagination(options)
func TabContent ¶
Types ¶
Source Files
¶
- Alert.go
- Breadcrumbs.go
- Button.go
- Card.go
- Column.go
- Container.go
- Modal.go
- Nav.go
- Pagination.go
- Row.go
- button_link.go
- card_body.go
- card_footer.go
- card_header.go
- card_image_top.go
- card_title.go
- form_check.go
- form_check_box.go
- form_check_label.go
- form_check_radio.go
- form_group.go
- form_input.go
- form_input_plaintext.go
- form_label.go
- form_select.go
- form_select_option.go
- form_text.go
- form_text_area.go
- input_group.go
- input_group_text.go
- nav_item.go
- nav_link.go
- nav_pills.go
- nav_tabs.go
- tab_content.go
- tab_pane.go
