mirror of https://github.com/go-gitea/gitea.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.4 KiB
39 lines
1.4 KiB
<!-- Refresh the content if a htmx response contains "HX-Trigger" header. |
|
This usually happens when a user stays on the watchers/stargazers page |
|
when they watched/unwatched/starred/unstarred and the list should be refreshed. |
|
To test go to the watchers page and click the watch button. The user cards should reload. |
|
At the moment, no JS initialization would re-trigger (fortunately there is no JS for this page). |
|
--> |
|
<div class="no-loading-indicator tw-hidden"></div> |
|
<div class="user-cards" |
|
hx-trigger="refreshUserCards from:body" hx-indicator=".no-loading-indicator" |
|
hx-get="{{$.CurrentURL}}" hx-swap="outerHTML" hx-select=".user-cards" |
|
> |
|
{{if .CardsTitle}} |
|
<h2 class="ui dividing header"> |
|
{{.CardsTitle}} |
|
</h2> |
|
{{end}} |
|
<ul class="list"> |
|
{{range .Cards}} |
|
<li class="item ui segment"> |
|
<a href="{{.HomeLink}}"> |
|
{{ctx.AvatarUtils.Avatar . 48}} |
|
</a> |
|
<h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3> |
|
|
|
<div class="meta"> |
|
{{if .Website}} |
|
{{svg "octicon-link"}} <a href="{{.Website}}" target="_blank" rel="noopener noreferrer">{{.Website}}</a> |
|
{{else if .Location}} |
|
{{svg "octicon-location"}} {{.Location}} |
|
{{else}} |
|
{{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateUtils.AbsoluteShort .CreatedUnix)}} |
|
{{end}} |
|
</div> |
|
</li> |
|
{{end}} |
|
</ul> |
|
|
|
{{template "base/paginate" .}} |
|
</div>
|
|
|