Add user search page
[bloat] / templates / user.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .HeaderData $.Ctx)}}
3 {{template "navigation.tmpl" (WithContext .NavbarData $.Ctx)}}
4 <div class="page-title"> User </div>
5
6 <div class="user-info-container">
7 <div>
8         <div class="user-profile-img-container">
9                 <a class="img-link" href="{{.User.AvatarStatic}}" target="_blank">
10                         <img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" />
11                 </a>
12         </div>
13         <div class="user-profile-details-container">
14                 <div>
15                         <span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span>  
16                         <span class="status-uname"> {{.User.Acct}} </span>
17                         <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
18                                 source
19                         </a>
20                 </div>
21                 <div>
22                         <span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>  
23                         {{if .User.Pleroma.Relationship.Following}} 
24                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
25                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
26                                 <input type="submit" value="unfollow" class="btn-link">
27                         </form>
28                         {{end}} 
29                         {{if .User.Pleroma.Relationship.Requested}} 
30                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
31                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
32                                 <input type="submit" value="cancel request" class="btn-link">
33                         </form>
34                         {{end}} 
35                         {{if not .User.Pleroma.Relationship.Following}} 
36                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
37                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
38                                 <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
39                         </form>
40                         {{end}} 
41                 </div>
42                 <div>
43                         {{.User.StatusesCount}} statuses - 
44                         <a href="/following/{{.User.ID}}"> {{.User.FollowingCount}} following </a> - 
45                         <a href="/followers/{{.User.ID}}"> {{.User.FollowersCount}} followers </a>
46                 </div>
47                 <div>
48                         <a href="/usersearch/{{.User.ID}}"> search statuses </a>
49                 </div>
50         </div>
51         <div class="user-profile-decription">
52         {{.User.Note}}
53         </div>
54 </div>
55 </div>
56
57 {{range .Statuses}}
58 {{template "status.tmpl" (WithContext . $.Ctx)}}
59 {{end}}
60
61 <div class="pagination">
62         {{if .NextLink}}
63                 <a href="{{.NextLink}}">next</a>
64         {{end}}
65 </div>
66
67 {{template "footer.tmpl"}}
68 {{end}}