31 lines
1.4 KiB
Plaintext

component AnimeList(animeList *arn.AnimeList, user *arn.User)
h2.anime-list-owner= animeList.User().Nick + "'s collection"
table.anime-list
thead
tr
th.anime-list-item-name Anime
th.anime-list-item-airing-date Airing
th.anime-list-item-episodes Episodes
th.anime-list-item-rating Rating
if user != nil
th.anime-list-item-actions Actions
tbody
each item in animeList.Items
tr.anime-list-item.mountable(title=item.Notes)
td.anime-list-item-name
a.ajax(href=item.Link(animeList.User().Nick))= item.Anime().Title.Canonical
td.anime-list-item-airing-date
if item.Anime().UpcomingEpisode() != nil
span.utc-date(data-start-date=item.Anime().UpcomingEpisode().Episode.AiringDate.Start, data-end-date=item.Anime().UpcomingEpisode().Episode.AiringDate.End, data-episode-number=item.Anime().UpcomingEpisode().Episode.Number)
td.anime-list-item-episodes
.anime-list-item-episodes-watched= item.Episodes
.anime-list-item-episodes-separator /
.anime-list-item-episodes-max= item.Anime().EpisodeCountString()
//- .anime-list-item-episodes-edit
//- a.ajax(href=, title="Edit anime")
//- RawIcon("pencil")
td.anime-list-item-rating= item.FinalRating()
if user != nil
td.anime-list-item-actions
a(href=arn.Nyaa.GetLink(item.Anime()), title="Search on Nyaa", target="_blank", rel="noopener")
RawIcon("download")