component list
This commit is contained in:
parent
458ad520ca
commit
bf84e14bb1
2 changed files with 33 additions and 0 deletions
19
template/components/content_list.go
Normal file
19
template/components/content_list.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package components
|
||||
|
||||
type ContentList struct {
|
||||
Items []ContentListItem
|
||||
}
|
||||
|
||||
type ContentListItem struct {
|
||||
Text string
|
||||
Description string
|
||||
EndElement string
|
||||
//Link string
|
||||
TypeClass string // primary, secondary, success, danger, warning, info, light, dark
|
||||
IsDisabled bool
|
||||
//IsActive bool
|
||||
}
|
||||
|
||||
//link
|
||||
//border
|
||||
// badge
|
14
template/components/content_list.html
Normal file
14
template/components/content_list.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
{{define "content_list"}}
|
||||
<ul class="list-group">
|
||||
{{ range .Items}}
|
||||
<li class="list-group-item text-wrap {{if eq .IsDisabled true}}disabled{{end}} {{if .TypeClass}}list-group-item-{{.TypeClass}}{{end}}"
|
||||
{{if eq .IsDisabled true}}aria-disabled="true"{{end}}
|
||||
><div class="d-flex justify-content-between lh-sm"><p class="mb-1">{{.Text}}</p><span class="text-body-secondary ms-5">{{.EndElement}}</span></div>
|
||||
<small>{{.Description}}</small>
|
||||
</li>
|
||||
{{end}}
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
{{end}}
|
Loading…
Reference in a new issue