af83d4af02513e341a99914bacb864b470bff98e
[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                         <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - 
44                         <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - 
45                         <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> - 
46                         <a href="/user/{{.User.ID}}/media"> media </a>
47                 </div>
48                 <div>
49                         <a href="/usersearch/{{.User.ID}}"> search statuses </a>
50                 </div>
51         </div>
52         <div class="user-profile-decription">
53         {{EmojiFilter .User.Note .User.Emojis}}
54         </div>
55 </div>
56 </div>
57
58 {{if eq .Type ""}}
59 <div class="page-title"> Statuses </div>
60 {{range .Statuses}}
61 {{template "status.tmpl" (WithContext . $.Ctx)}}
62 {{end}}
63
64 {{else if eq .Type "following"}}
65 <div class="page-title"> Following </div>
66 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
67
68 {{else if eq .Type "followers"}}
69 <div class="page-title"> Followers </div>
70 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
71
72 {{else if eq .Type "media"}}
73 <div class="page-title"> Statuses with media </div>
74 {{range .Statuses}}
75 {{template "status.tmpl" (WithContext . $.Ctx)}}
76 {{end}}
77 {{end}}
78
79 <div class="pagination">
80         {{if .NextLink}}
81                 <a href="{{.NextLink}}">next</a>
82         {{end}}
83 </div>
84
85 {{template "footer.tmpl"}}
86 {{end}}