diff --git a/pages/frontpage/frontpage.pixy b/pages/frontpage/frontpage.pixy index 0a364af2..22ad730b 100644 --- a/pages/frontpage/frontpage.pixy +++ b/pages/frontpage/frontpage.pixy @@ -2,6 +2,10 @@ component FrontPage .frontpage h2 notify.moe + video.bg-video(autoplay="true", loop="true") + source(src="//s1.webmshare.com/ZrK1J.webm") + + img.action.screenshot(src="/images/elements/extension-screenshot.png", alt="Screenshot of the browser extension", title="Click to install the Chrome Extension", data-action="installExtension", data-trigger="click") Login diff --git a/pages/frontpage/frontpage.scarlet b/pages/frontpage/frontpage.scarlet index 98cb03ae..533ec374 100644 --- a/pages/frontpage/frontpage.scarlet +++ b/pages/frontpage/frontpage.scarlet @@ -7,11 +7,23 @@ font-weight normal letter-spacing 3px text-transform uppercase + color white .footer text-align center margin-top content-padding +.bg-video + position absolute + top 50% + left 50% + transform translateX(-50%) translateY(-50%) + min-width 100% + min-height 100% + width auto + height auto + z-index -100 + .screenshot max-width 100% border-radius 3px diff --git a/pages/listimport/listimportanilist/anilist.go b/pages/listimport/listimportanilist/anilist.go index b1601214..35016ff7 100644 --- a/pages/listimport/listimportanilist/anilist.go +++ b/pages/listimport/listimportanilist/anilist.go @@ -35,6 +35,13 @@ func Get(ctx *aero.Context) string { return ctx.Error(http.StatusBadRequest, "Couldn't load your anime list from AniList", err) } + matches := findAllMatches(allAnime, animeList) + + return ctx.HTML(components.ImportAnilist(user, matches)) +} + +// findAllMatches returns all matches for the anime inside an anilist anime list. +func findAllMatches(allAnime []*arn.Anime, animeList *arn.AniListAnimeList) []*arn.AniListMatch { matches := []*arn.AniListMatch{} matches = importList(matches, allAnime, animeList.Lists.Watching) @@ -47,9 +54,10 @@ func Get(ctx *aero.Context) string { matches = importList(matches, allAnime, list) } - return ctx.HTML(components.ImportAnilist(user, matches)) + return matches } +// importList imports a single list inside an anilist anime list collection. func importList(matches []*arn.AniListMatch, allAnime []*arn.Anime, animeListItems []*arn.AniListAnimeListItem) []*arn.AniListMatch { for _, item := range animeListItems { matches = append(matches, &arn.AniListMatch{