navbars

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID_MAIN_CONTENT           = "gohtml-main-content"
	CLASS_NAVBAR              = "gohtml-navbar"
	CLASS_NAVBAR_LEFT         = "gohtml-left"
	CLASS_NAVBAR_RIGHT        = "gohtml-right"
	CLASS_NAVIGATION_LINK     = "gohtml-navigation-link"
	ID_SIDE_OPEN_BTN          = "gohtml-openbtn"
	ID_SIDE_CLOSE_BTN         = "gohtml-closebtn"
	ID_SIDE_NAVBAR            = "gohtml-sidenav"
	CLASS_SIDE_NAVBAR         = "gohtml-sidenav"
	CLASS_SIDE_NAVBAR_FOOTER  = "gohtml-footer"
	CLASS_SIDE_NAVBAR_CONTENT = "gohtml-content-nav"
	CLASS_ACTIVE              = "gohtml-active"
)
View Source
const DefaultNavStyle = `` /* 523-byte string literal not displayed */
View Source
const DefaultSideNavStyle = `` /* 1006-byte string literal not displayed */

Variables

View Source
var (
	CARD_CONTAINER    = "card-container-"           // + string
	COLOR_MAIN        = csscolors.COLOR_MAIN        // Main color - white
	COLOR_BLACK       = csscolors.COLOR_BLACK       // Black
	COLOR_GREY        = csscolors.COLOR_GREY        // Grey
	COLOR_ONE         = csscolors.COLOR_ONE         // COLOR_ONE - dark blue
	COLOR_ONE_LIGHTER = csscolors.COLOR_ONE_LIGHTER // COLOR_ONE_LIGHTER - lighter dark blue
	COLOR_TWO         = csscolors.COLOR_TWO         // COLOR_TWO - yellow
	COLOR_THREE       = csscolors.COLOR_THREE       // COLOR_THREE - green
	COLOR_FOUR        = csscolors.COLOR_FOUR        // COLOR_FOUR - light blue
	COLOR_FIVE        = csscolors.COLOR_FIVE        // COLOR_FIVE - dark green
	COLOR_SIX         = csscolors.COLOR_SIX         // COLOR_SIX - red
	COLOR_BROWN       = csscolors.COLOR_BROWN       // COLOR_BROWN - brown
	COLOR_DARK_GRAY   = csscolors.COLOR_DARK_GRAY   // COLOR_DARK_GRAY - dark gray
	BACKGROUND_COLOR  = csscolors.BACKGROUND_COLOR  // BACKGROUND_COLOR - background color
)

General colors for use in CSS. Can be overridden.

Functions

func NavBar(logo *Logo, urls elems.URLs) (*elems.Element, elems.Elements)

func OfficialNavbar added in v1.4.1

func OfficialNavbar(logo *Logo, urls elems.URLs, footer_urls ...elems.URL) (*elems.Element, elems.Elements)

func OfficialNavbarCss added in v1.4.1

func OfficialNavbarCss(height int) *elems.Element

func SideNavBar

func SideNavBar(logo *Logo, urls elems.URLs, footer_urls ...elems.URL) (*elems.Element, *elems.Element, elems.Elements)

Returns the navbar body to append to your HTML, the main-content area and all URLS

func WailsFrame added in v1.4.2

func WailsFrame(imgUrl string, menu elems.URLs) (*elems.Element, elems.Elements, elems.Elements)

Returns a window control frame for frameless wails applications. Allows for urls to be passed in for the menu. Returns the frame container, the control buttons, and the urls.

CLASSES:

"gohtml-window-control-left" "gohtml-window-control-favicon" "gohtml-window-control-middle" "gohtml-window-control-right" "gohtml-navigation-link-control"

IDs:

"gohtml-window-control-box"
"gohtml-window-control-minimize"
"gohtml-window-control-maximize"
"gohtml-window-control-close"

func WailsFrameButtonsOnly added in v1.6.7

func WailsFrameButtonsOnly() (*elems.Element, elems.Elements)

func WailsFrameButtonsOnlyCss added in v1.6.7

func WailsFrameButtonsOnlyCss(widthBtn int, backcol string, btnCol ...string) (*elems.Element, int)

func WailsFrameCss added in v1.4.2

func WailsFrameCss(widthBtn int, backcol string, btnCol ...string) (*elems.Element, int)

Returns style element and offset height for next elements. If no btnCol is given, we will take the complementary color of the background color.

Types

type Logo struct {
	URL         elems.URL
	Image       string
	LeftOrRight bool
}

Jump to

Keyboard shortcuts

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