buttons

package
v1.2.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const BUTTON_PREFIX = "gohtml-button-"

Variables

View Source
var (
	CARD_CONTAINER   = "card-container-" // + string
	COLOR_MAIN       = csscolors.COLOR_MAIN
	COLOR_BLACK      = csscolors.COLOR_BLACK
	COLOR_GREY       = csscolors.COLOR_GREY
	COLOR_ONE        = csscolors.COLOR_ONE
	COLOR_TWO        = csscolors.COLOR_TWO
	COLOR_THREE      = csscolors.COLOR_THREE
	COLOR_FOUR       = csscolors.COLOR_FOUR
	COLOR_FIVE       = csscolors.COLOR_FIVE
	COLOR_SIX        = csscolors.COLOR_SIX
	COLOR_BROWN      = csscolors.COLOR_BROWN
	COLOR_DARK_GRAY  = csscolors.COLOR_DARK_GRAY
	BACKGROUND_COLOR = csscolors.BACKGROUND_COLOR
)

General colors for use in CSS. Can be overridden.

Functions

func EnclosingSideDots

func EnclosingSideDots(href, text string) *elems.Element

Uses a user supplied color.

  • Needs a style tag to be added to the dom, use the EnclosingSideDotsCss function.

func EnclosingSideDotsCss

func EnclosingSideDotsCss(mainColorHex string, widthPX int) *elems.Element

Uses a user supplied color for the EnclosingSideDots button.

  • Complementary color is used for the text.

func RotatingBackground

func RotatingBackground(href, text string) *elems.Element

RotatingBackground returns a button with a rotating background.

  • The background rotates 120 degrees when the mouse hovers over the button.

func RotatingBackgroundCss

func RotatingBackgroundCss(mainColorHex string, widthPX int) *elems.Element

RotatingBackgroundCss returns the CSS for the RotatingBackground button. The mainColorHex is the color of the button, and the widthPX is the width of the button in pixels. Text color is automatically set to the complementary color of the mainColorHex.

func RotatorSwap

func RotatorSwap(href, text, mainColorHex string, widthPX int) (*elems.Element, *elems.Element)

Uses COLOR_MAIN for text, and a supplied color.

  • This button creates a specific style tag for each button created.

  • If the maincolor is white or black, the three colors will be automatically replaced to:

    COLOR_BLACK

    COLOR_BROWN

    COLOR_DARK_GRAY

https://www.udemy.com/course/css-animation-transitions-and-transforms-creativity-course/

Types

This section is empty.

Jump to

Keyboard shortcuts

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