Merge pull request 'Refactor user-cards as a grid' (#4760) from 0ko/forgejo:ui-usercards-grid into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4760 Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
This commit is contained in:
commit
37151d75cb
3 changed files with 45 additions and 28 deletions
|
@ -1,25 +1,28 @@
|
|||
<div class="user-cards">
|
||||
{{if .CardsTitle}}
|
||||
<h2 class="tw-mb-0">
|
||||
<h2>
|
||||
{{.CardsTitle}}
|
||||
</h2>
|
||||
{{end}}
|
||||
<ul class="list">
|
||||
{{range .Cards}}
|
||||
<li class="item ui segment">
|
||||
<li class="card">
|
||||
<a href="{{.HomeLink}}">
|
||||
{{ctx.AvatarUtils.Avatar .}}
|
||||
</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" (DateTime "short" .CreatedUnix)}}
|
||||
{{end}}
|
||||
<div>
|
||||
<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" (DateTime "short" .CreatedUnix)}}
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
{{end}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue