96 lines
2.8 KiB
Plaintext
Raw Normal View History

component SearchResults(term string, users []*arn.User, animes []*arn.Anime, posts []*arn.Post, threads []*arn.Thread, tracks []*arn.SoundTrack, characters []*arn.Character)
2017-07-06 20:26:02 +00:00
h1.page-title= "Search: " + term
2017-11-03 11:02:13 +00:00
.search
2017-06-20 20:54:45 +00:00
.widget
2017-07-09 02:22:14 +00:00
h3.widget-title
Icon("tv")
span Anime
2017-11-09 17:10:10 +00:00
2018-03-16 18:13:23 +00:00
AnimeSearchResults(animes)
2017-11-05 08:32:46 +00:00
2017-11-26 17:04:48 +00:00
.widget
h3.widget-title
Icon("user")
span Characters
2018-03-16 18:13:23 +00:00
CharacterSearchResults(characters)
2017-11-26 17:04:48 +00:00
2017-07-09 02:22:14 +00:00
.widget
h3.widget-title
Icon("comment")
2017-07-20 12:26:43 +00:00
span Forum
2017-11-09 17:10:10 +00:00
2018-03-16 18:13:23 +00:00
ForumSearchResults(posts, threads)
2017-11-09 17:10:10 +00:00
2017-07-09 02:22:14 +00:00
.widget
h3.widget-title
Icon("music")
span Soundtracks
2017-11-09 17:10:10 +00:00
2018-03-16 18:13:23 +00:00
SoundTrackSearchResults(tracks)
2017-11-05 08:32:46 +00:00
.widget
h3.widget-title
Icon("user")
span Users
2017-11-09 17:10:10 +00:00
2018-03-16 18:13:23 +00:00
UserSearchResults(users)
component AnimeSearchResults(animes []*arn.Anime)
if len(animes) == 0
p.no-search-results.mountable No anime found.
else
.profile-watching-list.anime-search
each anime in animes
a.profile-watching-list-item.mountable.ajax(href=anime.Link(), title=anime.Title.Canonical, data-mountable-type="anime")
2018-03-16 21:40:38 +00:00
img.anime-cover-image.anime-search-result.lazy(data-src=anime.ImageLink("small"), data-webp="true", alt=anime.Title.Canonical)
2018-03-16 18:13:23 +00:00
component CharacterSearchResults(characters []*arn.Character)
if len(characters) == 0
p.no-search-results.mountable No characters found.
else
.character-search
each character in characters
.mountable(data-mountable-type="character")
CharacterSmall(character)
component ForumSearchResults(posts []*arn.Post, threads []*arn.Thread)
if len(posts) == 0 && len(threads) == 0
p.no-search-results.mountable No posts found.
else
.forum-search-results
each thread in threads
.forum-search-result.mountable(data-mountable-type="forum")
.forum-search-result-header
a.forum-search-result-title.ajax(href=thread.Link())= thread.Title
if thread.Author().HasNick()
.forum-search-result-author= thread.Author().Nick
.forum-search-result-sample= thread.Text
each post in posts
.forum-search-result.mountable(data-mountable-type="forum")
.forum-search-result-header
a.forum-search-result-title.ajax(href=post.Link(), data-mountable-type="forum")= post.Thread().Title
if post.Author().HasNick()
.forum-search-result-author= post.Author().Nick
.forum-search-result-sample= post.Text
component SoundTrackSearchResults(tracks []*arn.SoundTrack)
if len(tracks) == 0
p.no-search-results.mountable No soundtracks found.
else
ul.soundtrack-search
each track in tracks
li.mountable(data-mountable-type="track")
a.ajax(href=track.Link())= track.Title
component UserSearchResults(users []*arn.User)
if len(users) == 0
p.no-search-results.mountable No users found.
else
.user-avatars.user-search
each user in users
.mountable(data-mountable-type="user")
Avatar(user)
2017-11-26 17:04:48 +00:00