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
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

View File

@ -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

View File

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