Compare commits
4 commits
5f0ca8e797
...
6b0e2e4739
| Author | SHA1 | Date | |
|---|---|---|---|
| 6b0e2e4739 | |||
| 3c0b56c433 | |||
| 5c6be4b037 | |||
| 850d2ae477 |
2 changed files with 7 additions and 3 deletions
|
|
@ -1,10 +1,12 @@
|
|||
package components
|
||||
|
||||
type ContentList struct {
|
||||
ID string
|
||||
Items []ContentListItem
|
||||
}
|
||||
|
||||
type ContentListItem struct {
|
||||
ID string
|
||||
Text string
|
||||
Description string
|
||||
EndElement string
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
{{define "content_list"}}
|
||||
<ul class="list-group">
|
||||
<ul class="list-group" {{ if .ID }}id="{{.ID}}"{{end}}>
|
||||
{{ 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}}
|
||||
<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}}
|
||||
{{ if .ID }}id="{{.ID}}"{{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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue