56 lines
1.5 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-16 17:02:40 +00:00
.widget-form.amv-page
2018-04-15 08:36:51 +00:00
if amv.Title.String() == ""
2018-04-16 17:02:40 +00:00
h1.amv-page-title.mountable untitled
2018-04-15 08:36:51 +00:00
else
2018-04-16 17:02:40 +00:00
h1.amv-page-title.mountable= amv.Title.ByUser(user)
2018-04-15 08:36:51 +00:00
if amv.File != ""
AMV(amv, user)
if amv.MainAnimeID != "" || len(amv.ExtraAnimeIDs) > 0
2018-04-16 17:02:40 +00:00
.widget
h3.widget-title.mountable Anime
2018-04-15 08:36:51 +00:00
2018-04-16 17:02:40 +00:00
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
2018-04-16 17:02:40 +00:00
.widget
h3.widget-title.mountable Links
2018-04-15 09:14:11 +00:00
2018-04-16 17:02:40 +00:00
.light-button-group.amv-links
each link in amv.Links
a.light-button.amv-link.mountable(href=link.URL)
Icon("external-link")
span= link.Title
if len(amv.Tags) > 0
.widget
h3.widget-title.mountable Tags
.tags.mountable
each tag in amv.Tags
.tag.mountable= tag
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")