Documentation ¶
Index ¶
- Constants
- Variables
- func ColWidthToClass(size string, width int) (string, error)
- func Colors() []string
- func IsColor(c string) bool
- func NavbarHtml(navData Navbar) string
- func StreamNavbarHtml(qw422016 *qt422016.Writer, navData Navbar)
- func StreamWebpageHTML(qw422016 *qt422016.Writer, pageData Webpage)
- func WebpageHTML(pageData Webpage) string
- func WriteNavbarHtml(qq422016 qtio422016.Writer, navData Navbar)
- func WriteWebpageHTML(qq422016 qtio422016.Writer, pageData Webpage)
- type AlbumCell
- type Alert
- type AlertColored
- type Button
- type Column
- type Generic
- type Link
- type ListGroup
- type Navbar
- type Panel
- type Search
- type Webpage
Constants ¶
View Source
const ( ColSizeXs = "xs" // for phones - screens less than 768px wide ColSizeSm = "sm" // for tablets - screens equal to or greater than 768px wide ColSizeMd = "md" // for small laptops - screens equal to or greater than 992px wide ColSizeLg = "lg" // for laptops and desktops - screens equal to or greater than 1200px wide ColMaxWidth = 12 )
View Source
const ( ClassActive = "active" ClassButton = "btn" ClassButtonGroup = "btn-group" ClassButtonSuccess = "btn-success" ClassDropdown = "dropdown" ClassDropdownMenu = "dropdown-menu" ClassDropdownToggle = "dropdown-toggle" ClassListGroup = "list-group" ClassListGroupItem = "list-group-item" ClassListGroupItemText = "list-group-item-text" ClassPanel = "panel" ClassPanelHeading = "panel-heading" ClassPanelTitle = "panel-title" ClassPanelBody = "panel-body" ColorBlack = "inverse" ColorBlue = "primary" ColorCyan = "info" ColorGreen = "success" ColorOrange = "warning" ColorRed = "danger" )
Variables ¶
View Source
var ( ErrWidthTooLarge = errors.New("max width of 12 exceeded") ErrWidthIsNegative = errors.New("width cannot be negative") )
View Source
var ErrColorUnknown = errors.New("color unknown")
Functions ¶
func ColWidthToClass ¶ added in v0.4.0
ColWidthToClass creates a class string where `size` must be in `[xs,sm,md,lg]` and size must be `[1,12]`.
func NavbarHtml ¶
func StreamNavbarHtml ¶
func StreamWebpageHTML ¶ added in v0.4.0
func WebpageHTML ¶ added in v0.4.0
func WriteNavbarHtml ¶
func WriteNavbarHtml(qq422016 qtio422016.Writer, navData Navbar)
func WriteWebpageHTML ¶ added in v0.4.0
func WriteWebpageHTML(qq422016 qtio422016.Writer, pageData Webpage)
Types ¶
type Alert ¶
type Alert int
type AlertColored ¶
type AlertColored int
const ( PrimaryC AlertColored = iota SecondaryC SuccessC DangerC WarningC InfoC )
func NewAlertColored ¶
func NewAlertColored(idx int) AlertColored
func (AlertColored) Class ¶
func (a AlertColored) Class() string
Class returns the class name of the alert ("Primary", "Secondary", ...).
func (AlertColored) DivHTML ¶ added in v0.4.0
func (a AlertColored) DivHTML(innerHTML string) string
Class returns the class name of the alert ("Primary", "Secondary", ...).
func (AlertColored) String ¶
func (a AlertColored) String() string
Class returns the class name of the alert ("Primary", "Secondary", ...).
type Button ¶ added in v0.5.0
Button return ssomething like `<button type="button" class="btn btn-success" style="width:100%" onclick="this.blur()">MyText</button>`
type Column ¶ added in v0.4.0
type Column struct { htmlutil.Element //ElementBase SizeDefaultWidth int SizeAllHidden bool XsWidth int XsHidden bool SmWidth int SmHidden bool MdWidth int MdHidden bool LgWidth int LgHidden bool }
type ListGroup ¶ added in v0.5.0
func NewListGroup ¶ added in v0.5.0
func NewListGroup() *ListGroup
func (*ListGroup) AddItemText ¶ added in v0.5.0
Source Files ¶
Click to show internal directories.
Click to hide internal directories.