forked from goffee/core
Merge pull request 'develop' (#12) from develop into main
Reviewed-on: goffee/core#12
This commit is contained in:
commit
b87e0113c9
4 changed files with 5 additions and 2 deletions
|
@ -10,6 +10,7 @@ type ContentDropdown struct {
|
|||
type ContentDropdownItem struct {
|
||||
Text string
|
||||
Link string
|
||||
ID string
|
||||
IsDisabled bool
|
||||
IsActive bool
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{{define "content_dropdown_item"}}
|
||||
<li><a class="dropdown-item {{if eq .IsActive true}}active{{end}} {{if eq .IsDisabled true}}disabled{{end}}" href="{{.Link}}">{{.Text}}</a></li>
|
||||
<li><a {{ if .ID }}id="{{.ID}}"{{end}} class="dropdown-item {{if eq .IsActive true}}active{{end}} {{if eq .IsDisabled true}}disabled{{end}}" href="{{.Link}}">{{.Text}}</a></li>
|
||||
{{end}}
|
||||
|
||||
{{define "content_dropdown"}}
|
||||
|
|
|
@ -3,6 +3,7 @@ package components
|
|||
type ContentHref struct {
|
||||
Text string
|
||||
Link string
|
||||
Target string // _blank _parent _self _top
|
||||
Icon string
|
||||
IsButton bool
|
||||
TypeClass string // type primary, secondary, success, danger, warning, info, light, dark, link
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{{define "content_href"}}
|
||||
<a class="{{if eq .IsButton true}} btn btn-{{.TypeClass}}{{end}} {{if eq .IsDisabled true}}disabled{{end}}"
|
||||
{{if .Target}} target="{{.Target}}"{{end}}
|
||||
href="{{.Link}}" {{if eq .IsButton true}}role="button"{{end}} {{if eq .IsDisabled true}}aria-disabled="true"{{end}}>
|
||||
{{.Text}}
|
||||
</a>
|
||||
|
|
Loading…
Reference in a new issue