 8b93f41aaa
			
		
	
	
	8b93f41aaa
	
	
	
		
			
			Followup to https://codeberg.org/forgejo/forgejo/pulls/4760 * some refactoring * move rules out of repo.css to a new module * simplify selectors by omitting .list: it is now only used to style the list itself, they're still precise enough in scope of .user-cards * apply wrap/ellipsis to cards' content. Done via CSS to avoid spamming gt-ellipsis in the template * prevent cards with long content from taking horizontal space from other cards * prevent such cards from causing horizontal overflow on mobile * prevent varying card height, it doesn't look good even with text wrapping Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6799 Reviewed-by: Otto <otto@codeberg.org> Co-authored-by: 0ko <0ko@noreply.codeberg.org> Co-committed-by: 0ko <0ko@noreply.codeberg.org>
		
			
				
	
	
		
			36 lines
		
	
	
	
		
			895 B
		
	
	
	
		
			Go HTML Template
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
	
		
			895 B
		
	
	
	
		
			Go HTML Template
		
	
	
	
	
	
| <div class="user-cards">
 | |
| 	{{if .CardsTitle}}
 | |
| 		<h2>
 | |
| 			{{.CardsTitle}}
 | |
| 		</h2>
 | |
| 	{{end}}
 | |
| 	{{if .Cards}}
 | |
| 		<ul class="list">
 | |
| 			{{range .Cards}}
 | |
| 				<li class="card">
 | |
| 					<a href="{{.HomeLink}}">
 | |
| 						{{ctx.AvatarUtils.Avatar .}}
 | |
| 					</a>
 | |
| 					<div class="content">
 | |
| 						<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>
 | |
| 					</div>
 | |
| 				</li>
 | |
| 			{{end}}
 | |
| 		</ul>
 | |
| 	{{else if .CardsNoneMsg}}
 | |
| 		<div>{{.CardsNoneMsg}}</div>
 | |
| 	{{end}}
 | |
| 
 | |
| 	{{template "base/paginate" .}}
 | |
| </div>
 |