73 lines
2.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-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-06-03 00:13:59 +00:00
if amv.MainAnimeID != "" && amv.MainAnime() != nil
2018-04-16 17:02:40 +00:00
.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.VideoEditorIDs) > 0
.widget
if len(amv.VideoEditorIDs) == 1
h3.widget-title.mountable Editor
else
h3.widget-title.mountable Editors
.user-avatars.amv-editors
each editor in amv.VideoEditors()
2018-04-21 11:09:28 +00:00
.mountable
Avatar(editor)
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-10-28 03:24:26 +00:00
if amv.File != "" && amv.Info.Video.Width > 0
.footer.amv-details.mountable
p= fmt.Sprintf("Video: %dx%d | %.0f FPS | %s", amv.Info.Video.Width, amv.Info.Video.Height, amv.Info.Video.FPS, amv.Info.Video.Codec)
p= fmt.Sprintf("Audio: %.0f Hz | %d bits | %s", amv.Info.Audio.SamplingFrequency, amv.Info.Audio.BitDepth, amv.Info.Audio.Codec)
2018-04-15 08:36:51 +00:00
component AnimeGridSmall(animes []*arn.Anime, user *arn.User)
each anime in animes
2018-04-18 11:09:13 +00:00
a.tip.mountable(href=anime.Link(), aria-label=anime.Title.ByUser(user))
2018-04-15 08:36:51 +00:00
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
2018-04-19 14:23:14 +00:00
LikeTab(strconv.Itoa(len(amv.Likes)), "heart", "amv", amv, user)
2018-04-14 21:51:18 +00:00
Tab("AMV", "video-camera", amv.Link())
if user != nil
Tab("Edit", "pencil", amv.Link() + "/edit")
Tab("History", "history", amv.Link() + "/history")