Some improvements
This commit is contained in:
@ -63,5 +63,4 @@
|
||||
border-radius 3px
|
||||
object-fit cover
|
||||
default-transition
|
||||
scale-up
|
||||
shadow-up
|
@ -1,14 +1,12 @@
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
const maxPosts = 6
|
||||
const maxPosts = 5
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
@ -18,7 +16,7 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(500, "Error fetching posts", err)
|
||||
}
|
||||
|
||||
sort.Sort(sort.Reverse(posts))
|
||||
arn.SortPostsLatestFirst(posts)
|
||||
|
||||
if len(posts) > maxPosts {
|
||||
posts = posts[:maxPosts]
|
||||
|
@ -1,10 +1,21 @@
|
||||
component Dashboard(posts []*arn.Post)
|
||||
h2 Dash
|
||||
|
||||
.dashboard-widget
|
||||
each post in posts
|
||||
a.dashboard-event.ajax(href=post.Link())
|
||||
.dashboard-event-author
|
||||
AvatarNoLink(post.Author())
|
||||
.dashboard-event-text
|
||||
span= post.Thread().Title
|
||||
.dashboard
|
||||
.dashboard-widget
|
||||
h3 Airing
|
||||
|
||||
for i := 1; i <= 5; i++
|
||||
a.dashboard-event
|
||||
.dashboard-event-text
|
||||
span ...
|
||||
|
||||
.dashboard-widget
|
||||
h3 Forums
|
||||
|
||||
each post in posts
|
||||
a.dashboard-event.ajax(href=post.Link())
|
||||
//- .dashboard-event-author
|
||||
//- AvatarNoLink(post.Author())
|
||||
.dashboard-event-text
|
||||
span= post.Thread().Title
|
@ -1,12 +1,18 @@
|
||||
.dashboard
|
||||
horizontal-wrap
|
||||
justify-content space-around
|
||||
|
||||
.dashboard-widget
|
||||
vertical
|
||||
align-items center
|
||||
width 100%
|
||||
max-width 600px
|
||||
|
||||
.dashboard-event
|
||||
vertical-wrap
|
||||
ui-element
|
||||
margin-bottom 1rem
|
||||
padding 0.75rem
|
||||
padding 0.75rem 1rem
|
||||
width 100%
|
||||
max-width 700px
|
||||
|
||||
@ -17,6 +23,6 @@
|
||||
|
||||
.dashboard-event-text
|
||||
horizontal
|
||||
justify-content center
|
||||
justify-content flex-start
|
||||
align-items center
|
||||
width 100%
|
@ -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
|
@ -1,183 +0,0 @@
|
||||
profileBootDuration = 2s
|
||||
|
||||
.profile
|
||||
position relative
|
||||
left content-padding * -1
|
||||
top content-padding * -1
|
||||
min-width calc(100% + 3rem)
|
||||
padding content-padding * 2
|
||||
|
||||
color white
|
||||
text-shadow 0px 0px 2px rgb(0, 0, 0, 0.5)
|
||||
|
||||
default-transition
|
||||
animation-name appear
|
||||
animation-duration transition-speed
|
||||
|
||||
overflow hidden
|
||||
|
||||
// &:hover
|
||||
// .profile-cover
|
||||
// filter brightness(28%)
|
||||
|
||||
@keyframes appear
|
||||
0%
|
||||
transform rotateX(90deg)
|
||||
filter opacity(0) saturate(0) blur(10px)
|
||||
100%
|
||||
transform rotateX(0)
|
||||
filter opacity(1) saturate(1) blur(0)
|
||||
|
||||
.profile-cover
|
||||
position absolute
|
||||
left 0
|
||||
top 0
|
||||
width 100%
|
||||
height 100%
|
||||
z-index -1
|
||||
background-size cover
|
||||
overflow hidden
|
||||
|
||||
default-transition
|
||||
animation cover-animation profileBootDuration
|
||||
animation-fill-mode forwards
|
||||
|
||||
@keyframes cover-animation
|
||||
0%
|
||||
filter brightness(500%) blur(5px)
|
||||
100%
|
||||
filter brightness(35%) blur(0)
|
||||
|
||||
.profile-image
|
||||
border-radius 3px
|
||||
width 320px !important
|
||||
height 320px !important
|
||||
// padding content-padding
|
||||
object-fit cover
|
||||
|
||||
#anime-list-container
|
||||
flex 1.5
|
||||
|
||||
// rotate-y()
|
||||
// transform-origin 0% 0%
|
||||
// animation rotate-y-animation profileBootDuration
|
||||
// animation-fill-mode forwards
|
||||
|
||||
// @keyframes rotate-y-animation
|
||||
// 0%
|
||||
// opacity 0
|
||||
// transform rotateY(90deg)
|
||||
// 100%
|
||||
// opacity 1
|
||||
// transform rotateY(0deg)
|
||||
|
||||
.image-container
|
||||
float left
|
||||
width auto
|
||||
// padding content-padding
|
||||
|
||||
.intro-container
|
||||
float left
|
||||
width auto
|
||||
display flex
|
||||
flex-flow column
|
||||
align-items center
|
||||
padding content-padding
|
||||
padding-top 0
|
||||
padding-left content-padding * 2
|
||||
max-width 900px
|
||||
// rotate-y()
|
||||
|
||||
.user-actions
|
||||
float right
|
||||
display flex
|
||||
flex-flow row
|
||||
justify-content center
|
||||
|
||||
.user-action
|
||||
max-width 250px
|
||||
|
||||
#nick
|
||||
text-align left
|
||||
margin-top 0
|
||||
margin-bottom 0
|
||||
|
||||
.profile-field
|
||||
margin-bottom 0.2em
|
||||
|
||||
.location
|
||||
// ...
|
||||
|
||||
.role
|
||||
opacity 0.6
|
||||
|
||||
.list-provider-username
|
||||
margin-top 0
|
||||
margin-bottom 0
|
||||
font-size 0.9em
|
||||
|
||||
.main
|
||||
// ...
|
||||
|
||||
.alternative
|
||||
opacity 0.4
|
||||
|
||||
.report-bug-hint
|
||||
//
|
||||
|
||||
.loading-message
|
||||
margin 0 auto
|
||||
text-align center
|
||||
opacity 0.4
|
||||
|
||||
#embedded-footer
|
||||
position fixed
|
||||
bottom 4em
|
||||
right calc(16px + 1em)
|
||||
text-align right
|
||||
z-index 1
|
||||
font-size 0.9em
|
||||
display flex
|
||||
flex-flow row
|
||||
|
||||
.user
|
||||
display inline-block
|
||||
width auto
|
||||
height auto
|
||||
margin-right 1em
|
||||
|
||||
.embedded-footer-info
|
||||
display flex
|
||||
flex-flow column
|
||||
|
||||
.embedded-footer-nick
|
||||
text-align left
|
||||
opacity 0.5
|
||||
|
||||
.embedded-footer-separator
|
||||
opacity 0.2
|
||||
|
||||
@media only screen and (max-width: 900px)
|
||||
.intro-container
|
||||
margin 1em 0
|
||||
padding 0
|
||||
width 100%
|
||||
text-align center !important
|
||||
|
||||
#anime-list-container
|
||||
.image-container
|
||||
.user-actions
|
||||
width 100%
|
||||
|
||||
#nick
|
||||
.profile-field
|
||||
width 100%
|
||||
text-align center
|
||||
|
||||
@media only screen and (min-width: 900px)
|
||||
#posts
|
||||
margin-left 0.5em
|
||||
|
||||
@media only screen and (max-width: 800px)
|
||||
.airing-date-prefix
|
||||
display none
|
@ -1,2 +0,0 @@
|
||||
component Test(msg string)
|
||||
h1= msg
|
@ -1,8 +1,6 @@
|
||||
package threads
|
||||
|
||||
import (
|
||||
"sort"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
@ -21,7 +19,7 @@ func Get(ctx *aero.Context) string {
|
||||
return post.ThreadID == thread.ID
|
||||
})
|
||||
|
||||
sort.Sort(replies)
|
||||
arn.SortPostsLatestLast(replies)
|
||||
|
||||
if filterErr != nil {
|
||||
return ctx.Error(500, "Error fetching thread replies", err)
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
.post
|
||||
vertical
|
||||
margin-bottom 1rem
|
||||
margin-bottom 0.75rem
|
||||
|
||||
> 600px
|
||||
.post
|
||||
|
11
pages/users/users.go
Normal file
11
pages/users/users.go
Normal file
@ -0,0 +1,11 @@
|
||||
package users
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
return ctx.HTML(components.Users())
|
||||
}
|
2
pages/users/users.pixy
Normal file
2
pages/users/users.pixy
Normal file
@ -0,0 +1,2 @@
|
||||
component Users
|
||||
h2 Users
|
Reference in New Issue
Block a user