Show background images in profile headers.
[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"{{if .User.HeaderStatic}} style="background-image: url({{.User.HeaderStatic}});"{{end}}>
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-uname"> {{.User.Acct}} </span>
15                         <bdi class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </bdi>  
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="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
27                                 <input type="submit" value="unfollow" class="btn-link">
28                         </form>
29                         {{else}}
30                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
31                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
32                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
33                                 <input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
34                         </form>
35                         {{end}}
36                         {{if .User.Pleroma.Relationship.Requested}}
37                         -
38                         <form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
39                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
40                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
41                                 <input type="submit" value="cancel request" class="btn-link">
42                         </form>
43                         {{end}}
44                         -
45                         {{if .User.Pleroma.Relationship.Subscribing}}
46                         <form class="d-inline" action="/unsubscribe/{{.User.ID}}" method="post">
47                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
48                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
49                                 <input type="submit" value="unsubscribe" class="btn-link">
50                         </form>
51                         {{else}}
52                         <form class="d-inline" action="/subscribe/{{.User.ID}}" method="post">
53                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
54                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
55                                 <input type="submit" value="subscribe" class="btn-link">
56                         </form>
57                         {{end}}
58                 </div>
59                 <div>
60                         {{if .User.Pleroma.Relationship.Blocking}}
61                         <form class="d-inline" action="/unblock/{{.User.ID}}" method="post">
62                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
63                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
64                                 <input type="submit" value="unblock" class="btn-link">
65                         </form>
66                         {{else}}
67                         <form class="d-inline" action="/block/{{.User.ID}}" method="post">
68                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
69                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
70                                 <input type="submit" value="block" class="btn-link">
71                         </form>
72                         {{end}}
73                         -
74                         {{if .User.Pleroma.Relationship.Muting}}
75                         <form class="d-inline" action="/unmute/{{.User.ID}}" method="post">
76                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
77                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
78                                 <input type="submit" value="unmute" class="btn-link">
79                         </form>
80                         {{else}}
81                         <form class="d-inline" action="/mute/{{.User.ID}}" method="post">
82                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
83                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
84                                 <input type="submit" value="mute" class="btn-link">
85                         </form>
86                         {{end}}
87                         {{if .User.Pleroma.Relationship.Following}} 
88                         -
89                         {{if .User.Pleroma.Relationship.ShowingReblogs}}
90                         <form class="d-inline" action="/follow/{{.User.ID}}?reblogs=false" method="post">
91                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
92                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
93                                 <input type="submit" value="hide retweets" class="btn-link">
94                         </form>
95                         {{else}}
96                         <form class="d-inline" action="/follow/{{.User.ID}}" method="post">
97                                 <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
98                                 <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}">
99                                 <input type="submit" value="show retweets" class="btn-link">
100                         </form>
101                         {{end}}
102                         {{end}}
103                 </div>
104                 {{end}}
105                 <div>
106                         <a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - 
107                         <a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - 
108                         <a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> - 
109                         <a href="/user/{{.User.ID}}/media"> media </a>
110                 </div>
111                 {{if .IsCurrent}}
112                 <div>
113                         <a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a>
114                         - <a href="/user/{{.User.ID}}/likes"> likes </a>
115                         - <a href="/user/{{.User.ID}}/mutes"> mutes </a>
116                         - <a href="/user/{{.User.ID}}/blocks"> blocks </a>
117                         {{if .User.Locked}}- <a href="/user/{{.User.ID}}/requests"> requests </a>{{end}}
118                 </div>
119                 {{end}}
120                 <div>
121                         <a href="/usersearch/{{.User.ID}}"> search statuses </a>
122                 </div>
123         </div>
124         <div class="user-profile-decription">
125         {{EmojiFilter .User.Note .User.Emojis}}
126         </div>
127 </div>
128 </div>
129
130 {{if eq .Type ""}}
131 <div class="page-title"> Statuses </div>
132 {{range .Statuses}}
133 {{template "status.tmpl" (WithContext . $.Ctx)}}
134 {{else}}
135 <div class="no-data-found">No data found</div>
136 {{end}}
137
138 {{else if eq .Type "following"}}
139 <div class="page-title"> Following </div>
140 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
141
142 {{else if eq .Type "followers"}}
143 <div class="page-title"> Followers </div>
144 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
145
146 {{else if eq .Type "media"}}
147 <div class="page-title"> Statuses with media </div>
148 {{range .Statuses}}
149 {{template "status.tmpl" (WithContext . $.Ctx)}}
150 {{else}}
151 <div class="no-data-found">No data found</div>
152 {{end}}
153
154 {{else if eq .Type "bookmarks"}}
155 <div class="page-title"> Bookmarks </div>
156 {{range .Statuses}}
157 {{template "status.tmpl" (WithContext . $.Ctx)}}
158 {{else}}
159 <div class="no-data-found">No data found</div>
160 {{end}}
161
162 {{else if eq .Type "likes"}}
163 <div class="page-title"> Likes </div>
164 {{range .Statuses}}
165 {{template "status.tmpl" (WithContext . $.Ctx)}}
166 {{else}}
167 <div class="no-data-found">No data found</div>
168 {{end}}
169
170 {{else if eq .Type "mutes"}}
171 <div class="page-title"> Mutes </div>
172 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
173
174 {{else if eq .Type "blocks"}}
175 <div class="page-title"> Blocks </div>
176 {{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
177
178 {{else if eq .Type "requests"}}
179 <div class="page-title"> Follow requests </div>
180 {{template "requestlist.tmpl" (WithContext .Users $.Ctx)}}
181 {{end}}
182
183 <div class="pagination">
184         {{if .NextLink}}
185                 <a href="{{.NextLink}}">[next]</a>
186         {{end}}
187 </div>
188
189 {{template "footer.tmpl"}}
190 {{end}}