diff --git a/pages/anime/anime.pixy b/pages/anime/anime.pixy index 8d4460cb..eb1b914e 100644 --- a/pages/anime/anime.pixy +++ b/pages/anime/anime.pixy @@ -29,24 +29,10 @@ component AnimeMainColumn(anime *arn.Anime, tracks []*arn.SoundTrack, episodes [ //- h3.anime-section-name.anime-summary-header Summary p.anime-summary.mountable= anime.Summary + //- AnimeActions(anime, user) + //- AnimeTabs(anime) - if user != nil - .buttons.anime-actions - if user.Role == "editor" || user.Role == "admin" - a.button.ajax(href=anime.Link() + "/edit") - Icon("pencil-square-o") - span Edit anime - - if user.AnimeList().Contains(anime.ID) - a.button.ajax(href="/+" + user.Nick + "/animelist/anime/" + anime.ID) - Icon("pencil") - span Edit in collection - else - button.action(data-api="/api/animelist/" + user.ID, data-action="addAnimeToCollection", data-trigger="click", data-anime-id=anime.ID) - Icon("plus") - span Add to collection - AnimeCharacters(anime) AnimeRelations(anime, user) AnimeTracks(anime, tracks) @@ -58,6 +44,31 @@ component AnimeMainColumn(anime *arn.Anime, tracks []*arn.SoundTrack, episodes [ //- .footer //- span Powered by Kitsu. +component AnimeSideColumn(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem, user *arn.User) + AnimeTrailer(anime) + AnimeInformation(anime) + AnimeRatings(anime, user) + AnimePopularity(anime) + AnimeFriends(friends, listItems) + AnimeLinks(anime) + +component AnimeActions(anime *arn.Anime, user *arn.User) + if user != nil + .buttons.anime-actions + //- if user.Role == "editor" || user.Role == "admin" + //- a.button.ajax(href=anime.Link() + "/edit") + //- Icon("pencil-square-o") + //- span Edit anime + + if user.AnimeList().Contains(anime.ID) + a.button.ajax(href="/+" + user.Nick + "/animelist/anime/" + anime.ID) + Icon("pencil") + span Edit in collection + else + button.action(data-api="/api/animelist/" + user.ID, data-action="addAnimeToCollection", data-trigger="click", data-anime-id=anime.ID) + Icon("plus") + span Add to collection + component AnimeRatings(anime *arn.Anime, user *arn.User) section.anime-section.mountable h3.anime-section-name Ratings @@ -134,14 +145,6 @@ component AnimeLinks(anime *arn.Anime) Icon("external-link") span= mapping.Name() -component AnimeSideColumn(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*arn.AnimeListItem, user *arn.User) - AnimeTrailer(anime) - AnimeInformation(anime) - AnimeRatings(anime, user) - AnimePopularity(anime) - AnimeFriends(friends, listItems) - AnimeLinks(anime) - component AnimeRelations(anime *arn.Anime, user *arn.User) if anime.Relations() != nil && len(anime.Relations().Items) > 0 section.anime-section.mountable diff --git a/pages/anime/anime.scarlet b/pages/anime/anime.scarlet index 17668ebe..491ca5ea 100644 --- a/pages/anime/anime.scarlet +++ b/pages/anime/anime.scarlet @@ -125,21 +125,20 @@ color anime-alternative-title-color !important .anime-actions - display none !important - // horizontal - // justify-content center + horizontal + justify-content flex-end - // // Action button margin + // Action button margin // margin calc(content-padding - 0.5rem) -0.5rem - // // Setting z-index requires setting a background as well + // Setting z-index requires setting a background as well // z-index 10 -> 1450px - .anime-actions - position absolute - bottom 0 - right content-padding +// > 1450px +// .anime-actions +// position fixed +// bottom 0 +// right content-padding // .anime-rating-categories // horizontal diff --git a/pages/search/search.scarlet b/pages/search/search.scarlet index 9a609128..216d8a7c 100644 --- a/pages/search/search.scarlet +++ b/pages/search/search.scarlet @@ -1,3 +1,6 @@ +.anime-search + justify-content flex-start + .anime-search-result width 55px !important height 78px !important