Boost contact’s tag links to update <main> with the filtered list

This commit is contained in:
jordi fita mas 2023-03-27 09:40:24 +02:00
parent 5d82597d14
commit 2086f68bd8
1 changed files with 3 additions and 3 deletions

View File

@ -29,18 +29,18 @@
<th>{{( pgettext "Tags" "title" )}}</th>
</tr>
</thead>
<tbody data-hx-push-url="false" data-hx-swap="beforeend">
<tbody>
{{ with .Contacts }}
{{- range $contact := . }}
<tr>
<td></td>
<td><a href="{{ companyURI "/contacts/"}}{{ .Slug }}" data-hx-boost="true">{{ .Name }}</a></td>
<td><a href="{{ companyURI "/contacts/"}}{{ .Slug }}" data-hx-push-url="false" data-hx-swap="beforeend" data-hx-boost="true">{{ .Name }}</a></td>
<td><a href="mailto:{{ .Email }}">{{ .Email }}</a></td>
<td><a href="tel:{{ .Phone }}">{{ .Phone }}</a></td>
<td>
{{- range $index, $tag := .Tags }}
{{- if gt $index 0 }}, {{ end -}}
<a href="?tag={{ . }}">{{ . }}</a>
<a href="?tag={{ . }}" data-hx-target="main" data-hx-boost="true">{{ . }}</a>
{{- end }}
</td>
</tr>