card

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var List = map[string]string{
	"card": `{{define "card"}}
    <div class="card" id="{{.ID}}">
        <div class="card-body" id="{{.BodyID}}">
            <div class="card-index">
                <div class="card-top" id="{{.TopID}}" {{if eq .SubTitle ""}}style="height: 43px;"{{end}}>
                    <div class="card-meta">
                        <div class="card-title">
                            <span>{{.Title}}</span>
                            {{if ne .Action ""}}
                                <span class="card-title-action">
                                    {{.Action}}
                                </span>
                            {{end}}
                        </div>
                        {{if ne .SubTitle ""}}
                            <div class="card-subtitle"><span>{{.SubTitle}}</span></div>
                        {{end}}
                    </div>
                </div>
                <div class="card-content" id="{{.ContentID}}">
                    {{.Content}}
                </div>
                <div class="card-footer" id="{{.FooterID}}">
                    {{.Footer}}
                </div>
            </div>
        </div>
    </div>
{{end}}`,
}

Functions

This section is empty.

Types

type Card

type Card struct {
	*adminTemplate.BaseComponent

	Title    string
	SubTitle string
	Content  template.HTML
	Action   template.HTML
	Footer   template.HTML

	ID        string
	BodyID    string
	TopID     string
	ContentID string
	FooterID  string
}

func New

func New() Card

func (Card) AddButton

func (c Card) AddButton(button types.Button) Card

func (Card) BindAction

func (c Card) BindAction(action types.Action) Card

func (Card) BindActionToBody

func (c Card) BindActionToBody(action types.Action) Card

func (Card) BindActionToContent

func (c Card) BindActionToContent(action types.Action) Card

func (Card) BindActionToFooter

func (c Card) BindActionToFooter(action types.Action) Card

func (Card) BindActionToTop

func (c Card) BindActionToTop(action types.Action) Card

func (Card) GetContent

func (c Card) GetContent() template.HTML

func (Card) SetAction

func (c Card) SetAction(action template.HTML) Card

func (Card) SetContent

func (c Card) SetContent(content template.HTML) Card

func (Card) SetFooter

func (c Card) SetFooter(footer template.HTML) Card

func (Card) SetSubTitle

func (c Card) SetSubTitle(subTitle string) Card

func (Card) SetTitle

func (c Card) SetTitle(title string) Card

Jump to

Keyboard shortcuts

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