{{define "quickbox:list"}}
{{ $rowCount := 0 }}
{{ range .quicknotes}}
<div id="quicknote-{{.Id}}" class="quickbox-row"
{{ $rowCount = incr $rowCount}}
{{ if eq $rowCount 10 }}
{{ $offset := addI $.offset $rowCount}}
{{ if gt $offset -1 }}
hx-get="/quickbox/all?offset={{ $offset }}" hx-trigger="intersect once" hx-swap="afterbegin" hx-target="#quickbox-notes"
{{ end }}
{{ end }}>
  <div class="buttons">
    <button class="button" hx-delete="/quickbox/delete/{{.Id}}" hx-target="closest div.quickbox-row" hx-swap="outerHTML swap:1s" hx-trigger='confirmed' onClick="bm_show_confirm_delete(this, 'Quickbox', 'Delete this note ?')"><i class="bi bi-dash-square"></i></button>
    <button class="button" hx-target="body" hx-swap="beforeend" hx-get="/quickbox/transform/{{.Id}}"><i class='bi bi-arrow-up-left-circle-fill'></i></button>
  </div>
  <div class="note">{{.Note_rendered | safeHTML}}</div>
</div>
{{ end }}
{{ end }}