1
0
Fork 0
forked from goffee/core
This commit is contained in:
Diana 2025-08-26 13:31:13 -05:00
parent 5c6be4b037
commit 3c0b56c433
2 changed files with 7 additions and 3 deletions

View file

@ -1,10 +1,12 @@
package components package components
type ContentList struct { type ContentList struct {
ID string
Items []ContentListItem Items []ContentListItem
} }
type ContentListItem struct { type ContentListItem struct {
ID string
Text string Text string
Description string Description string
EndElement string EndElement string

View file

@ -1,8 +1,10 @@
{{define "content_list"}} {{define "content_list"}}
<ul class="list-group"> <ul class="list-group" {{ if .ID }}id="{{.ID}}"{{end}}>
{{ range .Items}} {{ range .Items}}
<li class="list-group-item text-wrap {{if eq .IsDisabled true}}disabled{{end}} {{if .TypeClass}}list-group-item-{{.TypeClass}}{{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 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> ><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> <small>{{.Description}}</small>
</li> </li>