37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
component AMVPage(amv *arn.AMV, user *arn.User)
|
|
AMVTabs(amv, user)
|
|
|
|
.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)
|
|
|
|
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))
|
|
|
|
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") |