45 lines
1.2 KiB
Plaintext
Raw Normal View History

2018-04-14 21:51:18 +00:00
component AMVPage(amv *arn.AMV, user *arn.User)
AMVTabs(amv, user)
2018-04-15 08:36:51 +00:00
.amv-page
if amv.Title.String() == ""
h1.mountable untitled
else
h1.mountable= amv.Title.ByUser(user)
if amv.File != ""
AMV(amv, user)
if amv.MainAnimeID != "" || len(amv.ExtraAnimeIDs) > 0
h3.mountable Anime
if amv.MainAnimeID != ""
.amv-main-anime.mountable
AnimeGrid([]*arn.Anime{amv.MainAnime()}, user)
if len(amv.ExtraAnimeIDs) > 0
.amv-extra-anime.mountable
AnimeGridSmall(amv.ExtraAnime(), user)
2018-04-15 09:14:11 +00:00
if len(amv.Links) > 0
//- h3.mountable Links
ul.amv-links
each link in amv.Links
li.amv-link.mountable
a(href=link.URL)= link.Title
2018-04-15 08:36:51 +00:00
component AnimeGridSmall(animes []*arn.Anime, user *arn.User)
each anime in animes
a.mountable(href=anime.Link(), title=anime.Title.ByUser(user))
img.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
2018-04-14 21:51:18 +00:00
component AMVTabs(amv *arn.AMV, user *arn.User)
.tabs
TabLike(strconv.Itoa(len(amv.Likes)), "heart", "amv", amv, user)
Tab("AMV", "video-camera", amv.Link())
if user != nil
Tab("Edit", "pencil", amv.Link() + "/edit")
Tab("History", "history", amv.Link() + "/history")