Implemented anime list basics
This commit is contained in:
15
pages/profile/anime-list.scarlet
Normal file
15
pages/profile/anime-list.scarlet
Normal file
@ -0,0 +1,15 @@
|
||||
.anime-list
|
||||
horizontal
|
||||
|
||||
.anime-list-item
|
||||
padding 0.25rem
|
||||
// padding calc(content-padding / 4) calc(content-padding / 2)
|
||||
// margin 0.25rem 0
|
||||
// position relative
|
||||
|
||||
.anime-list-item-image
|
||||
width 55px !important
|
||||
border-radius 2px
|
||||
// position absolute
|
||||
// left 0
|
||||
// top 0
|
@ -27,5 +27,7 @@ func Get(ctx *aero.Context) string {
|
||||
threads = threads[:maxPosts]
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Profile(viewUser, user, threads))
|
||||
animeList := viewUser.AnimeList()
|
||||
|
||||
return ctx.HTML(components.Profile(viewUser, user, animeList, threads))
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
component Profile(viewUser *arn.User, user *arn.User, threads []*arn.Thread)
|
||||
component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList, threads []*arn.Thread)
|
||||
.profile
|
||||
img.profile-cover(src=viewUser.CoverImageURL())
|
||||
|
||||
@ -49,6 +49,14 @@ component Profile(viewUser *arn.User, user *arn.User, threads []*arn.Thread)
|
||||
//- a.light-button(href="#") Anime
|
||||
//- a.light-button(href="#") Forum
|
||||
|
||||
.profile-category
|
||||
h3 Anime
|
||||
|
||||
.anime-list
|
||||
each item in animeList.Items
|
||||
a.anime-list-item.ajax(href=item.Anime().Link(), title=item.Anime().Title.Canonical + " (" + toString(item.Episode) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
|
||||
img.anime-cover-image.anime-list-item-image(src=item.Anime().Image.Tiny, alt=item.Anime().Title.Canonical)
|
||||
|
||||
.profile-category
|
||||
h3 Forum
|
||||
|
||||
|
@ -80,4 +80,4 @@ animation cover-animation
|
||||
// Categories
|
||||
|
||||
.profile-category
|
||||
// padding content-padding
|
||||
margin-bottom content-padding
|
Reference in New Issue
Block a user