Improved search results

This commit is contained in:
Eduard Urbach 2017-11-05 09:55:42 +01:00
parent 5801b3f4e1
commit 801e36d039
3 changed files with 39 additions and 34 deletions

View File

@ -29,24 +29,10 @@ component AnimeMainColumn(anime *arn.Anime, tracks []*arn.SoundTrack, episodes [
//- h3.anime-section-name.anime-summary-header Summary //- h3.anime-section-name.anime-summary-header Summary
p.anime-summary.mountable= anime.Summary p.anime-summary.mountable= anime.Summary
//- AnimeActions(anime, user)
//- AnimeTabs(anime) //- 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) AnimeCharacters(anime)
AnimeRelations(anime, user) AnimeRelations(anime, user)
AnimeTracks(anime, tracks) AnimeTracks(anime, tracks)
@ -58,6 +44,31 @@ component AnimeMainColumn(anime *arn.Anime, tracks []*arn.SoundTrack, episodes [
//- .footer //- .footer
//- span Powered by Kitsu. //- 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) component AnimeRatings(anime *arn.Anime, user *arn.User)
section.anime-section.mountable section.anime-section.mountable
h3.anime-section-name Ratings h3.anime-section-name Ratings
@ -134,14 +145,6 @@ component AnimeLinks(anime *arn.Anime)
Icon("external-link") Icon("external-link")
span= mapping.Name() 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) component AnimeRelations(anime *arn.Anime, user *arn.User)
if anime.Relations() != nil && len(anime.Relations().Items) > 0 if anime.Relations() != nil && len(anime.Relations().Items) > 0
section.anime-section.mountable section.anime-section.mountable

View File

@ -125,21 +125,20 @@
color anime-alternative-title-color !important color anime-alternative-title-color !important
.anime-actions .anime-actions
display none !important horizontal
// horizontal justify-content flex-end
// justify-content center
// // Action button margin // Action button margin
// margin calc(content-padding - 0.5rem) -0.5rem // 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 // z-index 10
> 1450px // > 1450px
.anime-actions // .anime-actions
position absolute // position fixed
bottom 0 // bottom 0
right content-padding // right content-padding
// .anime-rating-categories // .anime-rating-categories
// horizontal // horizontal

View File

@ -1,3 +1,6 @@
.anime-search
justify-content flex-start
.anime-search-result .anime-search-result
width 55px !important width 55px !important
height 78px !important height 78px !important