4fe7fd1f33356d67e5c70113677a7f879f9c3446
[bloat] / templates / user.tmpl
1 {{with .Data}}
2 {{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
3 <div class="page-title"> User </div>
4
5 <div class="user-info-container">
6 <div>
7         <div class="user-profile-img-container">
8                 <a class="img-link" href="{{.User.AvatarStatic}}" target="_blank">
9                         <img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" height="96" />
10                 </a>
11         </div>
12         <div class="user-profile-details-container">
13                 <div>
14                         <span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span>  
15                         <span class="status-uname"> {{.User.Acct}} </span>
16                         <a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
17                                 source
18                         </a>
19                 </div>
20                 {{if not .IsCurrent}}
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                         {{else}}
29                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
30                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
31                                 <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
32                         </form>
33                         {{end}}
34                         {{if .User.Pleroma.Relationship.Requested}}
35                         -
36                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
37                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
38                                 <input type="submit" value="cancel request" class="btn-link">
39                         </form>
40                         {{end}}
41                         -
42                         {{if .User.Pleroma.Relationship.Subscribing}}
43                         <form class="d-inline" action="/unsubscribe/{{.User.ID}}" method="post">
44                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
45                                 <input type="submit" value="unsubscribe" class="btn-link">
46                         </form>
47                         {{else}}
48                         <form class="d-inline" action="/subscribe/{{.User.ID}}" method="post">
49                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
50                                 <input type="submit" value="subscribe" class="btn-link">
51                         </form>
52                         {{end}}
53                 </div>
54                 <div>
55                         {{if .User.Pleroma.Relationship.Blocking}}
56                         <form class="d-inline" action="/unblock/{{.User.ID}}" method="post">
57                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
58                                 <input type="submit" value="unblock" class="btn-link">
59                         </form>
60                         {{else}}
61                         <form class="d-inline" action="/block/{{.User.ID}}" method="post">
62                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
63                                 <input type="submit" value="block" class="btn-link">
64                         </form>
65                         {{end}}
66                         -
67                         {{if .User.Pleroma.Relationship.Muting}}
68                         <form class="d-inline" action="/unmute/{{.User.ID}}" method="post">
69                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
70                                 <input type="submit" value="unmute" class="btn-link">
71                         </form>
72                         {{else}}
73                         <form class="d-inline" action="/mute/{{.User.ID}}" method="post">
74                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
75                                 <input type="submit" value="mute" class="btn-link">
76                         </form>
77                         {{end}}
78                         {{if .User.Pleroma.Relationship.Following}} 
79                         -
80                         {{if .User.Pleroma.Relationship.ShowingReblogs}}
81                         <form class="d-inline" action="/follow/{{.User.ID}}?reblogs=false" method="post">
82                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
83                                 <input type="submit" value="hide retweets" class="btn-link">
84                         </form>
85                         {{else}}
86                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
87                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
88                                 <input type="submit" value="show retweets" class="btn-link">
89                         </form>
90                         {{end}}
91                         {{end}}
92                 </div>
93                 {{end}}
94                 <div>
95                         <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - 
96                         <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - 
97                         <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> - 
98                         <a href="/user/{{.User.ID}}/media"> media </a>
99                 </div>
100                 <div>
101                         <a href="/usersearch/{{.User.ID}}"> search statuses </a>
102                 </div>
103         </div>
104         <div class="user-profile-decription">
105         {{EmojiFilter .User.Note .User.Emojis}}
106         </div>
107 </div>
108 </div>
109
110 {{if eq .Type ""}}
111 <div class="page-title"> Statuses </div>
112 {{range .Statuses}}
113 {{template "status.tmpl" (WithContext . $.Ctx)}}
114 {{end}}
115
116 {{else if eq .Type "following"}}
117 <div class="page-title"> Following </div>
118 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
119
120 {{else if eq .Type "followers"}}
121 <div class="page-title"> Followers </div>
122 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
123
124 {{else if eq .Type "media"}}
125 <div class="page-title"> Statuses with media </div>
126 {{range .Statuses}}
127 {{template "status.tmpl" (WithContext . $.Ctx)}}
128 {{end}}
129 {{end}}
130
131 <div class="pagination">
132         {{if .NextLink}}
133                 <a href="{{.NextLink}}">next</a>
134         {{end}}
135 </div>
136
137 {{template "footer.tmpl"}}
138 {{end}}