Improved users page
This commit is contained in:
parent
41f8c1a978
commit
1454cdc239
@ -67,7 +67,7 @@ animation cover-animation
|
|||||||
|
|
||||||
.image-container
|
.image-container
|
||||||
flex 1
|
flex 1
|
||||||
max-width 250px
|
max-width 275px
|
||||||
|
|
||||||
.intro-container
|
.intro-container
|
||||||
vertical
|
vertical
|
||||||
|
@ -2,6 +2,7 @@ package users
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"sort"
|
||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
"github.com/animenotifier/arn"
|
"github.com/animenotifier/arn"
|
||||||
@ -11,7 +12,11 @@ import (
|
|||||||
// Get ...
|
// Get ...
|
||||||
func Get(ctx *aero.Context) string {
|
func Get(ctx *aero.Context) string {
|
||||||
users, err := arn.FilterUsers(func(user *arn.User) bool {
|
users, err := arn.FilterUsers(func(user *arn.User) bool {
|
||||||
return user.IsActive()
|
return user.IsActive() && user.Avatar != ""
|
||||||
|
})
|
||||||
|
|
||||||
|
sort.Slice(users, func(i, j int) bool {
|
||||||
|
return users[i].Registered < users[j].Registered
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
component Users(users []*arn.User)
|
component Users(users []*arn.User)
|
||||||
h2.page-title Users
|
h2.page-title Users
|
||||||
|
|
||||||
each user in users
|
.user-avatars
|
||||||
p= user.Nick
|
each user in users
|
||||||
|
Avatar(user)
|
2
pages/users/users.scarlet
Normal file
2
pages/users/users.scarlet
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.user-avatars
|
||||||
|
horizontal-wrap
|
Loading…
Reference in New Issue
Block a user