2018-04-09 16:17:21 +00:00
|
|
|
component AnimeRelations(anime *arn.Anime, user *arn.User, standAlonePage bool)
|
|
|
|
if standAlonePage
|
|
|
|
h1.mountable
|
|
|
|
a(href=anime.Link())= anime.Title.ByUser(user)
|
|
|
|
|
|
|
|
if anime.Relations() != nil && len(anime.Relations().Items) > 0
|
|
|
|
section.anime-section.mountable
|
|
|
|
h3.anime-section-name
|
|
|
|
a(href=anime.Relations().Link()) Relations
|
|
|
|
|
|
|
|
.anime-relations
|
|
|
|
each relation in anime.Relations().Items
|
|
|
|
if relation.Anime() != nil
|
2019-11-19 02:39:20 +00:00
|
|
|
//- AnimeCard(relation.Anime(), fmt.Sprintf("%s (%d)", relation.HumanReadableType(), anime.StartDateTime().Year()), user)
|
2018-04-18 10:33:19 +00:00
|
|
|
a.anime-relation.tip.mountable(href=relation.Anime().Link(), aria-label=relation.Anime().Title.ByUser(user), data-mountable-type="relation")
|
2018-04-09 16:17:21 +00:00
|
|
|
img.anime-relation-image.lazy(data-src=relation.Anime().ImageLink("small"), data-webp="true", data-color=relation.Anime().AverageColor(), alt=relation.Anime().Title.ByUser(user))
|
|
|
|
.anime-relation-type= relation.HumanReadableType()
|
|
|
|
.anime-relation-year
|
2018-04-25 21:10:12 +00:00
|
|
|
if len(relation.Anime().StartDate) >= 4
|
2018-04-09 16:17:21 +00:00
|
|
|
span= relation.Anime().StartDate[:4]
|