infobox

package
v0.0.0-...-fdaec87 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var List = map[string]string{
	"infobox": `{{define "infobox"}}
<div class="info-box">
    {{if .IsHexColor}}
        <span class="info-box-icon" style="background-color: {{.Color}} !important;">
    {{else}}
        <span class="info-box-icon bg-{{.Color}}">
    {{end}}
    {{if .IsSvg}}
        {{.Icon}}
    {{else}}
        <i class="fa {{.Icon}}"></i>
    {{end}}
    </span>
    <div class="info-box-content">
        <span class="info-box-text">{{langHtml .Text}}</span>
        <span class="info-box-number">{{langHtml .Number}}</span>
        {{langHtml .Content}}
    </div>
</div>
{{end}}`,
}

Functions

This section is empty.

Types

type InfoBox

type InfoBox struct {
	*adminTemplate.BaseComponent

	Icon       template.HTML
	Text       template.HTML
	Number     template.HTML
	Content    template.HTML
	Color      template.HTML
	IsHexColor bool
	IsSvg      bool
}

func New

func New() InfoBox

func (InfoBox) GetContent

func (i InfoBox) GetContent() template.HTML

func (InfoBox) SetColor

func (i InfoBox) SetColor(value template.HTML) InfoBox

func (InfoBox) SetContent

func (i InfoBox) SetContent(value template.HTML) InfoBox

func (InfoBox) SetIcon

func (i InfoBox) SetIcon(value template.HTML) InfoBox

func (InfoBox) SetNumber

func (i InfoBox) SetNumber(value template.HTML) InfoBox

func (InfoBox) SetText

func (i InfoBox) SetText(value template.HTML) InfoBox

Jump to

Keyboard shortcuts

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