Some improvements

This commit is contained in:
2016-12-06 12:36:31 +09:00
parent c2d9817ec5
commit 1268aa8ba6
21 changed files with 72 additions and 273 deletions

View File

@ -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]

View File

@ -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)

View File

@ -0,0 +1,2 @@
#load-more-threads
margin-top 1rem

View File

@ -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