Improved search styles

This commit is contained in:
2017-12-03 17:02:11 +01:00
parent bbb7e1b621
commit cd9dfd85e1
5 changed files with 38 additions and 22 deletions

View File

@ -13,7 +13,7 @@ const maxAnime = 25
const maxPosts = 2
const maxThreads = 2
const maxTracks = 4
const maxCharacters = 12
const maxCharacters = 22
// Get search page.
func Get(ctx *aero.Context) string {

View File

@ -26,7 +26,7 @@ component SearchResults(term string, users []*arn.User, animes []*arn.Anime, pos
else
each character in characters
.mountable(data-mountable-type="character")
Character(character)
CharacterSmall(character)
.widget
h3.widget-title
@ -36,21 +36,22 @@ component SearchResults(term string, users []*arn.User, animes []*arn.Anime, pos
if len(posts) == 0 && len(threads) == 0
p.no-search-results.mountable No posts found.
else
each thread in threads
.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
.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
.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
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
.widget
h3.widget-title

View File

@ -10,7 +10,18 @@
width 55px !important
height 78px !important
.forum-search-results
horizontal-wrap
justify-content space-around
.forum-search-result
vertical
flex 1
flex-basis 380px
padding 0.75rem
overflow hidden
.forum-search-result-header
horizontal
.forum-search-result-title