2018-03-21 20:22:57 +01:00

34 lines
1.2 KiB
Plaintext

component AnimeEditorListFull(title string, missing []*arn.Anime, count int, pageURI string, generateSearchLink func(*arn.Anime) string)
EditorTabs(pageURI)
h1.editor-list-title.mountable= title
.footer.editor-list-entry-count.mountable= strconv.Itoa(count) + " anime"
AnimeEditorList(missing, pageURI, generateSearchLink)
component AnimeEditorList(animes []*arn.Anime, pageURI string, generateSearchLink func(*arn.Anime) string)
table
thead
tr.mountable
th(title="Popularity") Pop.
th Image
th Title
th Type
th Year
if generateSearchLink != nil
th Tools
tbody
each anime in animes
tr.mountable
td= anime.Popularity.Total()
td
img.anime-list-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.Canonical)
td
a(href=anime.Link(), target="_blank", rel="noopener")= anime.Title.Canonical
td= anime.Type
td
if len(anime.StartDate) >= 4
a.ajax(href=pageURI + "/" + anime.StartDate[:4])= anime.StartDate[:4]
if generateSearchLink != nil
td
a(href=generateSearchLink(anime), target="_blank", rel="noopener") 🔍