Some improvements
This commit is contained in:
@ -1,8 +1,6 @@
|
||||
package forum
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -14,8 +12,7 @@ const threadsPerPage = 20
|
||||
func Get(ctx *aero.Context) string {
|
||||
tag := ctx.Get("tag")
|
||||
threads, _ := arn.GetThreadsByTag(tag)
|
||||
|
||||
sort.Sort(threads)
|
||||
arn.SortThreads(threads)
|
||||
|
||||
if len(threads) > threadsPerPage {
|
||||
threads = threads[:threadsPerPage]
|
||||
|
@ -4,6 +4,8 @@ component Forum(tag string, threads []*arn.Thread)
|
||||
|
||||
each thread in threads
|
||||
ThreadLink(thread)
|
||||
|
||||
button#load-more-threads Load more
|
||||
|
||||
component ThreadLink(thread *arn.Thread)
|
||||
.thread-link(data-sticky=thread.Sticky)
|
||||
|
2
pages/forum/forum.scarlet
Normal file
2
pages/forum/forum.scarlet
Normal file
@ -0,0 +1,2 @@
|
||||
#load-more-threads
|
||||
margin-top 1rem
|
@ -1,44 +0,0 @@
|
||||
.forum-header
|
||||
text-align left
|
||||
|
||||
.forum-tags
|
||||
text-align left
|
||||
margin-bottom 1.5rem
|
||||
|
||||
.thread-link
|
||||
display flex
|
||||
flex-flow row
|
||||
width 100%
|
||||
|
||||
.thread-reply-count
|
||||
.thread-icons
|
||||
opacity 0.5
|
||||
text-align right
|
||||
position relative
|
||||
|
||||
.thread-reply-count
|
||||
font-size 0.8rem
|
||||
flex 1
|
||||
margin 0 1rem
|
||||
|
||||
.thread-icons
|
||||
flex 0
|
||||
|
||||
.thread-content-container
|
||||
display flex
|
||||
align-items center
|
||||
width 100%
|
||||
|
||||
.thread-content
|
||||
display flex
|
||||
align-items center
|
||||
justify-content flex-start
|
||||
text-align left
|
||||
min-height 80%
|
||||
a
|
||||
color rgb(32, 32, 32) !important
|
||||
&:hover
|
||||
color linkHoverColor !important
|
||||
|
||||
// .thread-icon
|
||||
// font-size 0.9em
|
Reference in New Issue
Block a user