Updated styles
This commit is contained in:
parent
fdbfb22ef5
commit
74b405e4b4
@ -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
|
@ -1,6 +1,10 @@
|
||||
.forum-header
|
||||
text-align left
|
||||
margin-bottom 1rem
|
||||
// .forum-header
|
||||
// text-align left
|
||||
// margin-bottom 1rem
|
||||
|
||||
.thread-link
|
||||
horizontal
|
||||
margin 0.25rem 0
|
||||
|
||||
.post-content
|
||||
ui-element
|
||||
@ -32,9 +36,6 @@
|
||||
padding 0.4rem 1rem
|
||||
align-items center
|
||||
|
||||
.thread-link
|
||||
horizontal
|
||||
|
||||
.thread-icons,
|
||||
.thread-reply-count
|
||||
opacity 0.5
|
||||
@ -59,8 +60,7 @@
|
||||
horizontal
|
||||
justify-content center
|
||||
align-items flex-start
|
||||
margin 0.25rem 0.5rem
|
||||
margin-left 0
|
||||
margin-right 0.5rem
|
||||
|
||||
// Toolbar
|
||||
|
||||
|
@ -11,4 +11,7 @@ h3
|
||||
font-size 1.5em
|
||||
line-height 1.6em
|
||||
text-align left
|
||||
margin-top 0.6em
|
||||
margin-top 0.6em
|
||||
|
||||
.page-title
|
||||
display none
|
@ -13,6 +13,9 @@ ui-background = linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 0%, rgba(0, 0, 0,
|
||||
ui-hover-background = linear-gradient(to bottom, rgba(0, 0, 0, 0.01) 0%, rgba(0, 0, 0, 0.027) 100%)
|
||||
ui-disabled-color = rgb(224, 224, 224)
|
||||
|
||||
// Avatar
|
||||
avatar-size = 50px
|
||||
|
||||
// Navigation
|
||||
nav-color = rgb(60, 60, 60)
|
||||
nav-link-color = rgb(160, 160, 160)
|
||||
@ -32,7 +35,7 @@ outline-shadow-heavy = 0 0 6px rgba(0, 0, 0, 0.6)
|
||||
|
||||
// Distances
|
||||
content-padding = 1.6rem
|
||||
content-padding-top = 2rem
|
||||
content-padding-top = 1.6rem
|
||||
hover-line-size = 2px
|
||||
nav-height = 3.11rem
|
||||
|
||||
|
@ -31,6 +31,11 @@ mixin ui-disabled
|
||||
background-color ui-disabled-color
|
||||
cursor not-allowed
|
||||
|
||||
mixin clip-long-text
|
||||
overflow hidden
|
||||
white-space nowrap
|
||||
text-overflow ellipsis
|
||||
|
||||
mixin light-up
|
||||
filter brightness(0.4) saturate(1)
|
||||
:hover
|
||||
|
@ -31,13 +31,17 @@
|
||||
text-shadow 1px 1px 3px rgba(4, 4, 4, 0.1)
|
||||
|
||||
.navigation-button
|
||||
font-size 1.5em
|
||||
font-size 1em
|
||||
line-height 1em
|
||||
padding 0.75em 1em
|
||||
|
||||
.navigation-text
|
||||
display none
|
||||
|
||||
> 330px
|
||||
.navigation-button
|
||||
font-size 1.3em
|
||||
|
||||
> 930px
|
||||
.navigation-button
|
||||
font-size 1.1em
|
||||
@ -46,4 +50,13 @@
|
||||
justify-content flex-start
|
||||
|
||||
.navigation-text
|
||||
display inline-block
|
||||
display inline-block
|
||||
|
||||
< 400px height
|
||||
#navigation
|
||||
vertical
|
||||
height 100%
|
||||
padding content-padding 0
|
||||
|
||||
#container
|
||||
horizontal
|
@ -1,6 +1,6 @@
|
||||
.user-image
|
||||
width 50px
|
||||
height 50px
|
||||
width avatar-size
|
||||
height avatar-size
|
||||
border-radius 100%
|
||||
object-fit cover
|
||||
default-transition
|
||||
|
Loading…
Reference in New Issue
Block a user