19 lines
947 B
Plaintext
Raw Normal View History

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
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")
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
span= relation.Anime().StartDate[:4]