Improved user profiles
This commit is contained in:
parent
d5dff615c1
commit
2b3a6329d2
@ -3,45 +3,60 @@ component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList,
|
|||||||
ProfileHeader(viewUser, user, uri)
|
ProfileHeader(viewUser, user, uri)
|
||||||
|
|
||||||
.profile-columns
|
.profile-columns
|
||||||
.profile-column.profile-favorites
|
//- Favorites
|
||||||
|
.profile-column.profile-favorites.mountable(data-mountable-type="column")
|
||||||
.profile-section
|
.profile-section
|
||||||
h3.profile-column-header.mountable Anime
|
h3.profile-column-header.mountable(data-mountable-type="favorites") Anime
|
||||||
|
|
||||||
.profile-favorite-anime-container
|
if len(animeList.Items) == 0
|
||||||
each item in animeList.Top(6)
|
p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
|
||||||
a.profile-favorite-anime.tip.mountable(href=item.Anime().Link(), aria-label=item.Anime().Title.ByUser(user), data-mountable-type="favorites")
|
else
|
||||||
img.profile-favorite-anime-image.lazy(data-src=item.Anime().ImageLink("small"), data-webp=true, alt=item.Anime().Title.ByUser(user))
|
.profile-favorite-anime-container
|
||||||
|
each item in animeList.Top(6)
|
||||||
|
a.profile-favorite-anime.tip.mountable(href=item.Anime().Link(), aria-label=item.Anime().Title.ByUser(user), data-mountable-type="favorites")
|
||||||
|
img.profile-favorite-anime-image.lazy(data-src=item.Anime().ImageLink("small"), data-webp=true, alt=item.Anime().Title.ByUser(user))
|
||||||
|
|
||||||
.profile-section
|
.profile-section
|
||||||
h3.profile-column-header.mountable(data-mountable-type="favorites") Characters
|
h3.profile-column-header.mountable(data-mountable-type="favorites") Characters
|
||||||
|
|
||||||
.profile-favorite-characters-container
|
if len(characters) == 0
|
||||||
each character in characters
|
p.no-data.mountable(data-mountable-type="favorites") Nothing here yet.
|
||||||
.mountable(data-mountable-type="favorites")
|
else
|
||||||
CharacterSmall(character, user)
|
.profile-favorite-characters-container
|
||||||
//- a.profile-favorite-character.tip.mountable(href=character.Link(), aria-label=character.Name.ByUser(user), data-mountable-type="favorite-anime")
|
each character in characters
|
||||||
//- img.profile-favorite-character-image.lazy(data-src=character.ImageLink("small"), data-webp=true, alt=character.Name.ByUser(user))
|
.mountable(data-mountable-type="favorites")
|
||||||
|
CharacterSmall(character, user)
|
||||||
|
//- a.profile-favorite-character.tip.mountable(href=character.Link(), aria-label=character.Name.ByUser(user), data-mountable-type="favorite-anime")
|
||||||
|
//- img.profile-favorite-character-image.lazy(data-src=character.ImageLink("small"), data-webp=true, alt=character.Name.ByUser(user))
|
||||||
|
|
||||||
.profile-column.profile-activity
|
//- Posts
|
||||||
|
.profile-column.profile-activity.mountable(data-mountable-type="column")
|
||||||
.profile-section
|
.profile-section
|
||||||
h3.profile-column-header.mountable(data-mountable-type="activity") Activity
|
h3.profile-column-header.mountable(data-mountable-type="activity") Posts
|
||||||
Comments(viewUser, user)
|
Comments(viewUser, user)
|
||||||
|
|
||||||
.profile-column.profile-extra
|
//- Extra
|
||||||
|
.profile-column.profile-extra.mountable(data-mountable-type="column")
|
||||||
.profile-section
|
.profile-section
|
||||||
h3.profile-column-header.mountable(data-mountable-type="extra") Genres
|
h3.profile-column-header.mountable(data-mountable-type="extra") Genres
|
||||||
|
|
||||||
.anime-genres
|
if len(topGenres) == 0
|
||||||
each genre in topGenres
|
p.no-data.mountable(data-mountable-type="extra") Nothing here yet.
|
||||||
a.anime-genre.mountable(href="/genre/" + strings.ToLower(genre), data-mountable-type="extra")= genre
|
else
|
||||||
|
.anime-genres
|
||||||
|
each genre in topGenres
|
||||||
|
a.anime-genre.mountable(href="/genre/" + strings.ToLower(genre), data-mountable-type="extra")= genre
|
||||||
|
|
||||||
.profile-section
|
.profile-section
|
||||||
h3.profile-column-header.mountable(data-mountable-type="extra") Friends
|
h3.profile-column-header.mountable(data-mountable-type="extra") Friends
|
||||||
|
|
||||||
.profile-friends
|
if len(friends) == 0
|
||||||
each friend in friends
|
p.no-data.mountable(data-mountable-type="extra") Nothing here yet.
|
||||||
.profile-friend.mountable(data-mountable-type="extra")
|
else
|
||||||
Avatar(friend)
|
.profile-friends
|
||||||
|
each friend in friends
|
||||||
|
.profile-friend.mountable(data-mountable-type="extra")
|
||||||
|
Avatar(friend)
|
||||||
|
|
||||||
component ProfileHeader(viewUser *arn.User, user *arn.User, uri string)
|
component ProfileHeader(viewUser *arn.User, user *arn.User, uri string)
|
||||||
ProfileHead(viewUser, user, uri)
|
ProfileHead(viewUser, user, uri)
|
||||||
|
@ -55,6 +55,12 @@ const profile-image-size = 280px
|
|||||||
.profile-section
|
.profile-section
|
||||||
margin-bottom 1rem
|
margin-bottom 1rem
|
||||||
|
|
||||||
|
.no-data
|
||||||
|
text-align left
|
||||||
|
|
||||||
|
&.mounted
|
||||||
|
opacity 0.5 !important
|
||||||
|
|
||||||
.profile-favorite-anime-container
|
.profile-favorite-anime-container
|
||||||
display grid
|
display grid
|
||||||
grid-template-columns repeat(auto-fill, anime-image-small-width)
|
grid-template-columns repeat(auto-fill, anime-image-small-width)
|
||||||
@ -74,8 +80,7 @@ const profile-image-size = 280px
|
|||||||
// anime-mini-item
|
// anime-mini-item
|
||||||
|
|
||||||
.profile-favorite-anime-image
|
.profile-favorite-anime-image
|
||||||
// anime-mini-item-image
|
anime-mini-item-image
|
||||||
border-radius ui-element-border-radius
|
|
||||||
|
|
||||||
.profile-favorite-characters-container
|
.profile-favorite-characters-container
|
||||||
display grid
|
display grid
|
||||||
|
@ -380,7 +380,7 @@ var routeTests = map[string][]string{
|
|||||||
},
|
},
|
||||||
|
|
||||||
"/api/notification/:id": []string{
|
"/api/notification/:id": []string{
|
||||||
"/api/notification/u2WHJpkigm",
|
"/api/notification/q6Y6eraig",
|
||||||
},
|
},
|
||||||
|
|
||||||
"/api/quote/:id": []string{
|
"/api/quote/:id": []string{
|
||||||
|
Loading…
Reference in New Issue
Block a user