ed4a9f8c89
* The "Newest" tab of the forum is updated with new filter options. * Which forums: All, Official, Community, My List * Show: By threads, All posts * The option for "Which forums" is saved in the user's preferences and set as their default on future visits, similar to the Site Gallery "Whose photos" option. * So users can subscribe to their favorite forums and always get their latest posts easily while filtering out the rest. * Forum Moderators * Add the ability to add and remove moderators for your forum. * Users are notified when they are added as a moderator. * Moderators can opt themselves out by unfollowing the forum. * ForumMembership: add unique constraint on user_id,forum_id.
116 lines
4.4 KiB
HTML
116 lines
4.4 KiB
HTML
<!-- User avatar widgets -->
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-16x16"}}
|
|
<figure class="image is-16x16 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img src="/static/img/shy-private.png" class="is-rounded">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img src="/static/img/shy-friends.png" class="is-rounded">
|
|
{{else}}
|
|
<img src="{{PhotoURL .ProfilePhoto.CroppedFilename}}" class="is-rounded">
|
|
{{end}}
|
|
{{else}}
|
|
<img src="/static/img/shy.png" class="is-rounded">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-24x24"}}
|
|
<figure class="image is-24x24 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img src="/static/img/shy-private.png" class="is-rounded">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img src="/static/img/shy-friends.png" class="is-rounded">
|
|
{{else}}
|
|
<img src="{{PhotoURL .ProfilePhoto.CroppedFilename}}" class="is-rounded">
|
|
{{end}}
|
|
{{else}}
|
|
<img src="/static/img/shy.png" class="is-rounded">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-48x48"}}
|
|
<figure class="image is-48x48 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img src="/static/img/shy-private.png">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img src="/static/img/shy-friends.png">
|
|
{{else}}
|
|
<img src="{{PhotoURL .ProfilePhoto.CroppedFilename}}">
|
|
{{end}}
|
|
{{else}}
|
|
<img src="/static/img/shy.png">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-64x64"}}
|
|
<figure class="image is-64x64 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img src="/static/img/shy-private.png">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img src="/static/img/shy-friends.png">
|
|
{{else}}
|
|
<img src="{{PhotoURL .ProfilePhoto.CroppedFilename}}">
|
|
{{end}}
|
|
{{else}}
|
|
<img src="/static/img/shy.png">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-96x96"}}
|
|
<figure class="image is-96x96 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img src="/static/img/shy-private.png">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img src="/static/img/shy-friends.png">
|
|
{{else}}
|
|
<img src="{{PhotoURL .ProfilePhoto.CroppedFilename}}">
|
|
{{end}}
|
|
{{else}}
|
|
<img src="/static/img/shy.png">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|
|
|
|
<!-- Parameter: .User -->
|
|
{{define "avatar-32x32"}}
|
|
<figure class="image is-32x32 is-inline-block">
|
|
<a href="/u/{{.Username}}" class="has-text-dark">
|
|
{{if .ProfilePhoto.ID}}
|
|
{{if and (eq .ProfilePhoto.Visibility "private") (not .UserRelationship.IsPrivateGranted)}}
|
|
<img class="is-rounded" src="/static/img/shy-private.png">
|
|
{{else if and (eq .ProfilePhoto.Visibility "friends") (not .UserRelationship.IsFriend)}}
|
|
<img class="is-rounded" src="/static/img/shy-friends.png">
|
|
{{else}}
|
|
<img class="is-rounded" src="{{PhotoURL .ProfilePhoto.CroppedFilename}}">
|
|
{{end}}
|
|
{{else}}
|
|
<img class="is-rounded" src="/static/img/shy.png">
|
|
{{end}}
|
|
</a>
|
|
</figure>
|
|
{{end}}
|