aboutsummaryrefslogtreecommitdiff
path: root/templates/user.tmpl
blob: 6ea79f7a5131b61dbbda59d79898b6d1a8c5b294 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
{{with .Data}}
{{template "header.tmpl" (WithContext .CommonData $.Ctx)}}
<div class="page-title"> User </div>

<div class="user-info-container">
<div>
	<div class="user-profile-img-container">
		<a class="img-link" href="{{.User.AvatarStatic}}" target="_blank">
			<img class="user-profile-img" src="{{.User.AvatarStatic}}" alt="profile-avatar" />
		</a>
	</div>
	<div class="user-profile-details-container">
		<div>
			<span class="status-dname"> {{EmojiFilter .User.DisplayName .User.Emojis}} </span>  
			<span class="status-uname"> {{.User.Acct}} </span>
			<a class="remote-link" href="{{.User.URL}}" target="_blank" title="remote profile">
				source
			</a>
		</div>
		{{if not .IsCurrent}}
		<div>
			<span> {{if .User.Pleroma.Relationship.FollowedBy}} follows you - {{end}} </span>  
			{{if .User.Pleroma.Relationship.Following}} 
			<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="unfollow" class="btn-link">
			</form>
			{{else}} 
			<form class="d-inline" action="/follow/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="{{if .User.Pleroma.Relationship.Requested}}resend request{{else}}follow{{end}}" class="btn-link">
			</form>
			{{end}}
			{{if .User.Pleroma.Relationship.Requested}} 
			-
			<form class="d-inline" action="/unfollow/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="cancel request" class="btn-link">
			</form>
			{{end}} 
		</div>
		<div>
			{{if .User.Pleroma.Relationship.Blocking}} 
			<form class="d-inline" action="/unblock/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="unblock" class="btn-link">
			</form>
			{{else}} 
			<form class="d-inline" action="/block/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="block" class="btn-link">
			</form>
			{{end}} 
			-
			{{if .User.Pleroma.Relationship.Muting}} 
			<form class="d-inline" action="/unmute/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="unmute" class="btn-link">
			</form>
			{{else}} 
			<form class="d-inline" action="/mute/{{.User.ID}}" method="post">
				<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
				<input type="submit" value="mute" class="btn-link">
			</form>
			{{end}} 
		</div>
		{{end}}
		<div>
			<a href="/user/{{.User.ID}}"> statuses ({{.User.StatusesCount}}) </a> - 
			<a href="/user/{{.User.ID}}/following"> following ({{.User.FollowingCount}}) </a> - 
			<a href="/user/{{.User.ID}}/followers"> followers ({{.User.FollowersCount}}) </a> - 
			<a href="/user/{{.User.ID}}/media"> media </a>
		</div>
		<div>
			<a href="/usersearch/{{.User.ID}}"> search statuses </a>
		</div>
	</div>
	<div class="user-profile-decription">
	{{EmojiFilter .User.Note .User.Emojis}}
	</div>
</div>
</div>

{{if eq .Type ""}}
<div class="page-title"> Statuses </div>
{{range .Statuses}}
{{template "status.tmpl" (WithContext . $.Ctx)}}
{{end}}

{{else if eq .Type "following"}}
<div class="page-title"> Following </div>
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}

{{else if eq .Type "followers"}}
<div class="page-title"> Followers </div>
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}

{{else if eq .Type "media"}}
<div class="page-title"> Statuses with media </div>
{{range .Statuses}}
{{template "status.tmpl" (WithContext . $.Ctx)}}
{{end}}
{{end}}

<div class="pagination">
	{{if .NextLink}}
		<a href="{{.NextLink}}">next</a>
	{{end}}
</div>

{{template "footer.tmpl"}}
{{end}}