Improved search styles
This commit is contained in:
parent
bbb7e1b621
commit
cd9dfd85e1
@ -1,4 +1,7 @@
|
|||||||
component Character(character *arn.Character)
|
component Character(character *arn.Character)
|
||||||
a.character.ajax(href="/character/" + character.ID)
|
a.character.ajax(href="/character/" + character.ID)
|
||||||
img.character-image.lazy(data-src=character.Image, alt=character.Name, title=character.Name)
|
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
|
// opacity 1
|
||||||
|
|
||||||
.character-image
|
.character-image
|
||||||
border-radius 3px
|
border-radius 5%
|
||||||
box-shadow shadow-medium
|
box-shadow shadow-medium
|
||||||
object-fit cover
|
object-fit cover
|
||||||
|
width 112px
|
||||||
|
height 112px
|
||||||
|
|
||||||
// .character-name
|
// .character-name
|
||||||
// font-size 0.75rem
|
// font-size 0.75rem
|
||||||
@ -25,7 +27,6 @@
|
|||||||
// opacity 0.5
|
// opacity 0.5
|
||||||
// transition opacity transition-speed ease
|
// transition opacity transition-speed ease
|
||||||
|
|
||||||
.character-image
|
.character-image-small
|
||||||
width 112px
|
width 56px
|
||||||
height 112px
|
height 56px
|
||||||
border-radius 10%
|
|
@ -13,7 +13,7 @@ const maxAnime = 25
|
|||||||
const maxPosts = 2
|
const maxPosts = 2
|
||||||
const maxThreads = 2
|
const maxThreads = 2
|
||||||
const maxTracks = 4
|
const maxTracks = 4
|
||||||
const maxCharacters = 12
|
const maxCharacters = 22
|
||||||
|
|
||||||
// Get search page.
|
// Get search page.
|
||||||
func Get(ctx *aero.Context) string {
|
func Get(ctx *aero.Context) string {
|
||||||
|
@ -26,7 +26,7 @@ component SearchResults(term string, users []*arn.User, animes []*arn.Anime, pos
|
|||||||
else
|
else
|
||||||
each character in characters
|
each character in characters
|
||||||
.mountable(data-mountable-type="character")
|
.mountable(data-mountable-type="character")
|
||||||
Character(character)
|
CharacterSmall(character)
|
||||||
|
|
||||||
.widget
|
.widget
|
||||||
h3.widget-title
|
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
|
if len(posts) == 0 && len(threads) == 0
|
||||||
p.no-search-results.mountable No posts found.
|
p.no-search-results.mountable No posts found.
|
||||||
else
|
else
|
||||||
|
.forum-search-results
|
||||||
each thread in threads
|
each thread in threads
|
||||||
.mountable(data-mountable-type="forum")
|
.forum-search-result.mountable(data-mountable-type="forum")
|
||||||
.forum-search-result
|
.forum-search-result-header
|
||||||
a.forum-search-result-title.ajax(href=thread.Link())= thread.Title
|
a.forum-search-result-title.ajax(href=thread.Link())= thread.Title
|
||||||
if thread.Author().HasNick()
|
if thread.Author().HasNick()
|
||||||
.forum-search-result-author= thread.Author().Nick
|
.forum-search-result-author= thread.Author().Nick
|
||||||
.forum-search-result-sample= thread.Text
|
.forum-search-result-sample= thread.Text
|
||||||
|
|
||||||
each post in posts
|
each post in posts
|
||||||
.mountable(data-mountable-type="forum")
|
.forum-search-result.mountable(data-mountable-type="forum")
|
||||||
.forum-search-result
|
.forum-search-result-header
|
||||||
a.forum-search-result-title.ajax(href=post.Link(), data-mountable-type="forum")= post.Thread().Title
|
a.forum-search-result-title.ajax(href=post.Link(), data-mountable-type="forum")= post.Thread().Title
|
||||||
if post.Author().HasNick()
|
if post.Author().HasNick()
|
||||||
.forum-search-result-author= post.Author().Nick
|
.forum-search-result-author= post.Author().Nick
|
||||||
|
@ -10,7 +10,18 @@
|
|||||||
width 55px !important
|
width 55px !important
|
||||||
height 78px !important
|
height 78px !important
|
||||||
|
|
||||||
|
.forum-search-results
|
||||||
|
horizontal-wrap
|
||||||
|
justify-content space-around
|
||||||
|
|
||||||
.forum-search-result
|
.forum-search-result
|
||||||
|
vertical
|
||||||
|
flex 1
|
||||||
|
flex-basis 380px
|
||||||
|
padding 0.75rem
|
||||||
|
overflow hidden
|
||||||
|
|
||||||
|
.forum-search-result-header
|
||||||
horizontal
|
horizontal
|
||||||
|
|
||||||
.forum-search-result-title
|
.forum-search-result-title
|
||||||
|
Loading…
Reference in New Issue
Block a user