Updated styles
This commit is contained in:
@ -1,3 +1,3 @@
|
||||
component Airing(animeList []*arn.Anime)
|
||||
h2(title=toString(len(animeList)) + " anime") Airing
|
||||
h2.page-title(title=toString(len(animeList)) + " anime") Airing
|
||||
AnimeGrid(animeList)
|
@ -2,6 +2,8 @@ package dashboard
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
@ -9,24 +11,23 @@ const maxPosts = 5
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
// posts, err := arn.GetPosts()
|
||||
|
||||
// if err != nil {
|
||||
// return ctx.Error(500, "Error fetching posts", err)
|
||||
// }
|
||||
|
||||
// arn.SortPostsLatestFirst(posts)
|
||||
|
||||
// if len(posts) > maxPosts {
|
||||
// posts = posts[:maxPosts]
|
||||
// }
|
||||
|
||||
// return ctx.HTML(components.Dashboard(posts))
|
||||
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user != nil {
|
||||
return ctx.HTML("Welcome back, " + user.Nick + "!")
|
||||
posts, err := arn.GetPosts()
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(500, "Error fetching posts", err)
|
||||
}
|
||||
|
||||
arn.SortPostsLatestFirst(posts)
|
||||
|
||||
if len(posts) > maxPosts {
|
||||
posts = posts[:maxPosts]
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Dashboard(posts))
|
||||
}
|
||||
|
||||
return ctx.HTML("ARN 4.0 is currently under construction.<br><a href='https://paypal.me/blitzprog' target='_blank' rel='noopener'>Support the development</a><br><a href='/auth/google'>Login via Google</a>")
|
||||
|
@ -1,5 +1,5 @@
|
||||
component Dashboard(posts []*arn.Post)
|
||||
h2 Dash
|
||||
h2.page-title Dash
|
||||
|
||||
.dashboard
|
||||
.dashboard-widget
|
||||
|
@ -24,6 +24,7 @@
|
||||
|
||||
.dashboard-event-text
|
||||
horizontal
|
||||
clip-long-text
|
||||
justify-content flex-start
|
||||
align-items center
|
||||
width 100%
|
@ -1,5 +1,5 @@
|
||||
component Forum(tag string, threads []*arn.Thread)
|
||||
h2.forum-header Forum
|
||||
h2.page-title Forum
|
||||
ForumTags
|
||||
|
||||
each thread in threads
|
||||
|
@ -1,5 +1,5 @@
|
||||
component Genres(genres []*arn.Genre)
|
||||
h2 Genres
|
||||
h2.page-title Genres
|
||||
|
||||
.genres
|
||||
each genre in genres
|
||||
|
@ -1,8 +1,7 @@
|
||||
profile-boot-duration = 2s
|
||||
|
||||
.profile
|
||||
display flex
|
||||
flex-flow row
|
||||
horizontal
|
||||
|
||||
position relative
|
||||
left calc(content-padding * -1)
|
||||
|
@ -9,8 +9,15 @@
|
||||
|
||||
.post
|
||||
vertical
|
||||
margin-bottom 0.75rem
|
||||
margin-bottom 1.75rem
|
||||
|
||||
.post-author
|
||||
margin-bottom 0.25rem
|
||||
|
||||
> 600px
|
||||
.post
|
||||
horizontal
|
||||
horizontal
|
||||
margin-bottom 0.75rem
|
||||
|
||||
.post-author
|
||||
margin-bottom 0
|
Reference in New Issue
Block a user