Improved search styles
This commit is contained in:
parent
bbb7e1b621
commit
cd9dfd85e1
@ -1,4 +1,7 @@
|
||||
component Character(character *arn.Character)
|
||||
a.character.ajax(href="/character/" + character.ID)
|
||||
img.character-image.lazy(data-src=character.Image, alt=character.Name, title=character.Name)
|
||||
//- span.character-name= character.Name
|
||||
|
||||
component CharacterSmall(character *arn.Character)
|
||||
a.character.ajax(href="/character/" + character.ID)
|
||||
img.character-image.character-image-small.lazy(data-src=character.Image, alt=character.Name, title=character.Name)
|
@ -15,9 +15,11 @@
|
||||
// opacity 1
|
||||
|
||||
.character-image
|
||||
border-radius 3px
|
||||
border-radius 5%
|
||||
box-shadow shadow-medium
|
||||
object-fit cover
|
||||
width 112px
|
||||
height 112px
|
||||
|
||||
// .character-name
|
||||
// font-size 0.75rem
|
||||
@ -25,7 +27,6 @@
|
||||
// opacity 0.5
|
||||
// transition opacity transition-speed ease
|
||||
|
||||
.character-image
|
||||
width 112px
|
||||
height 112px
|
||||
border-radius 10%
|
||||
.character-image-small
|
||||
width 56px
|
||||
height 56px
|
@ -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 {
|
||||
|
@ -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,17 +36,18 @@ 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
|
||||
.forum-search-results
|
||||
each thread in threads
|
||||
.mountable(data-mountable-type="forum")
|
||||
.forum-search-result
|
||||
.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
|
||||
.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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user