Redesign
This commit is contained in:
@ -28,5 +28,5 @@ func Get(ctx *aero.Context) string {
|
||||
animeList.PrefetchAnime()
|
||||
animeList.Sort()
|
||||
|
||||
return ctx.HTML(components.AnimeLists(animeList.SplitByStatus(), animeList.User(), user, ctx.URI()))
|
||||
return ctx.HTML(components.ProfileAnimeLists(animeList.SplitByStatus(), animeList.User(), user, ctx.URI()))
|
||||
}
|
||||
|
@ -1,8 +1,15 @@
|
||||
component AnimeLists(animeLists map[string]*arn.AnimeList, viewUser *arn.User, user *arn.User, uri string)
|
||||
component ProfileAnimeLists(animeLists map[string]*arn.AnimeList, viewUser *arn.User, user *arn.User, uri string)
|
||||
ProfileHeader(viewUser, user, uri)
|
||||
|
||||
h1.page-title.anime-list-owner= viewUser.Nick + "'s collection"
|
||||
|
||||
AnimeLists(animeLists, viewUser, user)
|
||||
|
||||
//- for status, animeList := range animeLists
|
||||
//- h3= status
|
||||
//- AnimeList(animeList, user)
|
||||
|
||||
component AnimeLists(animeLists map[string]*arn.AnimeList, viewUser *arn.User, user *arn.User)
|
||||
if len(animeLists[arn.AnimeListStatusWatching].Items) == 0 && len(animeLists[arn.AnimeListStatusCompleted].Items) == 0 && len(animeLists[arn.AnimeListStatusPlanned].Items) == 0 && len(animeLists[arn.AnimeListStatusHold].Items) == 0 && len(animeLists[arn.AnimeListStatusDropped].Items) == 0
|
||||
p.no-data.mountable= viewUser.Nick + " hasn't added any anime yet."
|
||||
else
|
||||
@ -30,10 +37,6 @@ component AnimeLists(animeLists map[string]*arn.AnimeList, viewUser *arn.User, u
|
||||
.anime-list-container
|
||||
h3.status-name Dropped
|
||||
AnimeList(animeLists[arn.AnimeListStatusDropped], viewUser, user)
|
||||
|
||||
//- for status, animeList := range animeLists
|
||||
//- h3= status
|
||||
//- AnimeList(animeList, user)
|
||||
|
||||
component AnimeList(animeList *arn.AnimeList, viewUser *arn.User, user *arn.User)
|
||||
table.anime-list
|
||||
|
@ -2,7 +2,7 @@
|
||||
vertical
|
||||
width 100%
|
||||
max-width table-width-normal
|
||||
margin 0 auto
|
||||
// margin 0 auto
|
||||
margin-bottom 1rem
|
||||
|
||||
.anime-list
|
||||
|
@ -19,7 +19,7 @@ func FilterByStatus(status string) aero.Handle {
|
||||
return response
|
||||
}
|
||||
|
||||
return ctx.HTML(components.AnimeListFilteredByStatus(list, list.User(), user, status, ctx.URI()))
|
||||
return ctx.HTML(components.ProfileAnimeListFilteredByStatus(list, list.User(), user, status, ctx.URI()))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,12 @@
|
||||
component AnimeListFilteredByStatus(animeList *arn.AnimeList, viewUser *arn.User, user *arn.User, status string, uri string)
|
||||
component ProfileAnimeListFilteredByStatus(animeList *arn.AnimeList, viewUser *arn.User, user *arn.User, status string, uri string)
|
||||
ProfileHeader(viewUser, user, uri)
|
||||
|
||||
AnimeListFilteredByStatus(animeList, viewUser, user, status)
|
||||
|
||||
component AnimeListFilteredByStatus(animeList *arn.AnimeList, viewUser *arn.User, user *arn.User, status string)
|
||||
if len(animeList.Items) == 0
|
||||
p.no-data.mountable= viewUser.Nick + " hasn't added any anime to this list yet."
|
||||
else
|
||||
.anime-list-container.fill-screen
|
||||
h3.status-name= arn.ListItemStatusName(status)
|
||||
//- h3.status-name= arn.ListItemStatusName(status)
|
||||
AnimeList(animeList, viewUser, user)
|
Reference in New Issue
Block a user