2017-07-20 12:26:43 +00:00
|
|
|
component SearchResults(term string, users []*arn.User, animeResults []*arn.Anime, postResults []*arn.Post, threadResults []*arn.Thread)
|
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-06-20 20:54:45 +00:00
|
|
|
.profile-watching-list.anime-search
|
|
|
|
if len(animeResults) == 0
|
2017-07-09 15:43:13 +00:00
|
|
|
p.no-search-results.mountable No anime found.
|
2017-06-20 20:54:45 +00:00
|
|
|
else
|
|
|
|
each anime in animeResults
|
2017-07-02 15:51:17 +00:00
|
|
|
a.profile-watching-list-item.mountable.ajax(href=anime.Link(), title=anime.Title.Canonical, data-mountable-type="anime")
|
2017-07-09 02:22:14 +00:00
|
|
|
img.anime-cover-image.anime-search-result(src=anime.Image.Tiny, alt=anime.Title.Canonical)
|
2017-11-05 08:32:46 +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-07-09 02:22:14 +00:00
|
|
|
|
2017-07-20 12:26:43 +00:00
|
|
|
if len(postResults) == 0 && len(threadResults) == 0
|
|
|
|
p.no-search-results.mountable No posts found.
|
|
|
|
else
|
|
|
|
each thread in threadResults
|
|
|
|
.mountable(data-mountable-type="forum")
|
|
|
|
.forum-search-result
|
|
|
|
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 postResults
|
|
|
|
.mountable(data-mountable-type="forum")
|
|
|
|
.forum-search-result
|
|
|
|
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
|
2017-07-09 02:22:14 +00:00
|
|
|
|
|
|
|
.widget
|
|
|
|
h3.widget-title
|
|
|
|
Icon("music")
|
|
|
|
span Soundtracks
|
|
|
|
|
2017-11-05 08:32:46 +00:00
|
|
|
p.no-search-results.mountable Soundtrack search coming soon.
|
|
|
|
|
|
|
|
.widget
|
|
|
|
h3.widget-title
|
|
|
|
Icon("user")
|
|
|
|
span Users
|
|
|
|
|
|
|
|
.user-avatars.user-search
|
|
|
|
if len(users) == 0
|
|
|
|
p.no-search-results.mountable No users found.
|
|
|
|
else
|
|
|
|
each user in users
|
|
|
|
.mountable(data-mountable-type="user")
|
|
|
|
Avatar(user)
|
|
|
|
//- a.ajax(href=user.Link())= user.Nick
|