Documentation ¶
Rendered for js/wasm
Index ¶
- Variables
- func FancyHR(opts *HR) *elements.Element
- func GridNoOverflow(opts *GridOptions) *elements.Element
- func JiggleText(tag, text string, opts *JiggleOptions) *elements.Element
- func Join(css ...[]string) []string
- func NewGrid(opts *GridOptions) *elements.Element
- func RoadMap(roadMap *RoadMapOptions) *elements.Element
- func SearchBar(classPrefix, foregroundHex, background, text string) []*elements.Element
- type ButtonType
- type Counter
- type Grid
- type GridItem
- type GridOptions
- type HR
- type JiggleOptions
- type Modal
- func (m *Modal) Button(tag ButtonType, innerText string) *elements.Element
- func (m *Modal) CloseOnClickOf(e *elements.Element)
- func (m *Modal) Create(appendToQuerySelector ...string)
- func (m *Modal) Delete()
- func (m *Modal) Hide()
- func (m *Modal) OpenOnClickOf(e *elements.Element)
- func (m *Modal) Render() jsext.Element
- func (m *Modal) Show()
- type ModalOptions
- type RoadMapItem
- type RoadMapOptions
- type RoadMapStyle
- type TimeCounter
- func (c *TimeCounter) Add(t time.Duration)
- func (c *TimeCounter) Date(year int, month time.Month, day int, hour int, min int, sec int, nsec int)
- func (c *TimeCounter) Display(Time time.Time)
- func (c *TimeCounter) FormatFunc(f func(*convert.TimeTracker) string)
- func (c *TimeCounter) Get() time.Time
- func (c *TimeCounter) Increment()
- func (c *TimeCounter) Live()
- func (c *TimeCounter) Reset()
- func (c *TimeCounter) Set(t time.Time)
- func (c *TimeCounter) SetFormat(format string)
- func (c *TimeCounter) StopLive()
- func (c *TimeCounter) Sub(t time.Duration)
- func (c *TimeCounter) Tracker() *convert.TimeTracker
- func (c *TimeCounter) UpdateFunc(f func(*convert.TimeTracker, *elements.Element))
- type Translations
Constants ¶
This section is empty.
Variables ¶
View Source
var Box = []string{
"border-radius: 0 0 0.5rem 0.5rem",
"box-shadow: 0 1rem 1rem 0 rgba(0,0,0,0.2)",
}
View Source
var Container = []string{
"width: 80%",
"margin: 1rem auto",
"padding: 0 2%",
"padding-bottom: 1rem",
}
View Source
var GridDelimiter = " "
Functions ¶
func GridNoOverflow ¶ added in v1.3.3
func GridNoOverflow(opts *GridOptions) *elements.Element
func JiggleText ¶ added in v1.3.2
func JiggleText(tag, text string, opts *JiggleOptions) *elements.Element
func NewGrid ¶ added in v1.3.3
func NewGrid(opts *GridOptions) *elements.Element
func RoadMap ¶ added in v1.3.0
func RoadMap(roadMap *RoadMapOptions) *elements.Element
Types ¶
type ButtonType ¶ added in v1.3.1
type ButtonType int
const ( Anchor ButtonType = 0 Button ButtonType = 1 )
type Counter ¶ added in v1.2.0
type Counter struct {
// contains filtered or unexported fields
}
func NewCounter ¶ added in v1.2.0
type Grid ¶ added in v1.1.9
type GridOptions ¶ added in v1.3.3
type GridOptions struct { // The grid items to display inside of the grid. GridItems []*GridItem // Grid width, 100%, etc. Width string // GridItemWidth grid width, 1fr, etc. GridItemWidth string // Amount of rows and columns in the grid. Columns int Rows int // Column fractions GridColumnWidth []string // If there are too many grid items supplied, and ElementOnOverflow is not nil, // the last grid item will be replaced with the ElementOnOverflow when used in a supportive function. ElementOnOverflow *GridItem // ExtraCSS is a map with the following keys, to edit their respective elements css styles. // - grid // - grid-item ExtraCSS map[string]string // Class prefix for the grid, and its elements. ClassPrefix string // Function to be called for adding extra CSS. CSSFunc func(gridClass, itemClass, itemHeaderClass, itemBodyClass, itemFooterClass string) string }
func (*GridOptions) Fractions ¶ added in v1.3.3
func (c *GridOptions) Fractions(fr ...string)
type HR ¶ added in v1.3.6
type HR struct {
// Width and height of the HR
Width, Height string
// Main colors to use.
BackCol, FadeCol string
// Margin top and bottom.
MarginTopBottom string
// Border radius
BorderRadius string
// Fade direction, can be "left", "right", "top", "bottom"
FadeDir string
// Format strings for the colors
// Example: "rgba(%d, %d, %d, 1)"
BackColFormat string
// Format strings for the colors
// Example: "rgba(%d, %d, %d, 0.1)"
FadeColFormat string
// Animate
Animate bool
}
type JiggleOptions ¶ added in v1.3.2
func (*JiggleOptions) MainElementClass ¶ added in v1.3.5
func (opts *JiggleOptions) MainElementClass() string
func (*JiggleOptions) SetDefaults ¶ added in v1.3.2
func (opts *JiggleOptions) SetDefaults()
type Modal ¶ added in v1.3.1
func CreateModal ¶ added in v1.3.1
func CreateModal(opts ModalOptions) *Modal
func (*Modal) Button ¶ added in v1.3.1
func (m *Modal) Button(tag ButtonType, innerText string) *elements.Element
func (*Modal) CloseOnClickOf ¶ added in v1.3.1
func (*Modal) OpenOnClickOf ¶ added in v1.3.1
type ModalOptions ¶ added in v1.3.1
type ModalOptions struct { Header *elements.Element Body *elements.Element Background string ModalBackground string BorderRadius string Border string Width string Height string ClassPrefix string CloseButton bool CloseButtonScale float64 ZIndex int }
func (*ModalOptions) SetDefaults ¶ added in v1.3.1
func (opts *ModalOptions) SetDefaults()
type RoadMapItem ¶ added in v1.3.0
type RoadMapOptions ¶ added in v1.3.0
type RoadMapOptions struct { Background string ItemBackground string TagBackgroundColors []string Color string TitleColor string TagColor string DivisorColor string DivisorWidth string CardMargin string CardBorderWidth string CardBorderColor string Width string Items []RoadMapItem Style RoadMapStyle Translations Translations FontScale float64 // contains filtered or unexported fields }
type RoadMapStyle ¶ added in v1.3.0
type RoadMapStyle int
const ( RoadMapStyleOne RoadMapStyle = iota RoadMapStyleTwo )
type TimeCounter ¶ added in v1.2.0
type TimeCounter struct {
// contains filtered or unexported fields
}
func NewTimeCounter ¶ added in v1.2.0
func NewTimeCounter(elem *elements.Element) *TimeCounter
func (*TimeCounter) Add ¶ added in v1.2.0
func (c *TimeCounter) Add(t time.Duration)
func (*TimeCounter) Display ¶ added in v1.2.0
func (c *TimeCounter) Display(Time time.Time)
func (*TimeCounter) FormatFunc ¶ added in v1.2.0
func (c *TimeCounter) FormatFunc(f func(*convert.TimeTracker) string)
func (*TimeCounter) Get ¶ added in v1.2.0
func (c *TimeCounter) Get() time.Time
func (*TimeCounter) Increment ¶ added in v1.2.0
func (c *TimeCounter) Increment()
func (*TimeCounter) Live ¶ added in v1.2.0
func (c *TimeCounter) Live()
func (*TimeCounter) Reset ¶ added in v1.2.0
func (c *TimeCounter) Reset()
func (*TimeCounter) Set ¶ added in v1.2.0
func (c *TimeCounter) Set(t time.Time)
func (*TimeCounter) SetFormat ¶ added in v1.2.0
func (c *TimeCounter) SetFormat(format string)
func (*TimeCounter) StopLive ¶ added in v1.2.0
func (c *TimeCounter) StopLive()
func (*TimeCounter) Sub ¶ added in v1.2.0
func (c *TimeCounter) Sub(t time.Duration)
func (*TimeCounter) Tracker ¶ added in v1.2.0
func (c *TimeCounter) Tracker() *convert.TimeTracker
func (*TimeCounter) UpdateFunc ¶ added in v1.2.0
func (c *TimeCounter) UpdateFunc(f func(*convert.TimeTracker, *elements.Element))
type Translations ¶ added in v1.3.0
Click to show internal directories.
Click to hide internal directories.