Updated styles
This commit is contained in:
parent
fdbfb22ef5
commit
74b405e4b4
@ -1,3 +1,3 @@
|
|||||||
component Airing(animeList []*arn.Anime)
|
component Airing(animeList []*arn.Anime)
|
||||||
h2(title=toString(len(animeList)) + " anime") Airing
|
h2.page-title(title=toString(len(animeList)) + " anime") Airing
|
||||||
AnimeGrid(animeList)
|
AnimeGrid(animeList)
|
@ -2,6 +2,8 @@ package dashboard
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
|
"github.com/animenotifier/arn"
|
||||||
|
"github.com/animenotifier/notify.moe/components"
|
||||||
"github.com/animenotifier/notify.moe/utils"
|
"github.com/animenotifier/notify.moe/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -9,24 +11,23 @@ const maxPosts = 5
|
|||||||
|
|
||||||
// Get ...
|
// Get ...
|
||||||
func Get(ctx *aero.Context) string {
|
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)
|
user := utils.GetUser(ctx)
|
||||||
|
|
||||||
if user != nil {
|
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>")
|
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)
|
component Dashboard(posts []*arn.Post)
|
||||||
h2 Dash
|
h2.page-title Dash
|
||||||
|
|
||||||
.dashboard
|
.dashboard
|
||||||
.dashboard-widget
|
.dashboard-widget
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
.dashboard-event-text
|
.dashboard-event-text
|
||||||
horizontal
|
horizontal
|
||||||
|
clip-long-text
|
||||||
justify-content flex-start
|
justify-content flex-start
|
||||||
align-items center
|
align-items center
|
||||||
width 100%
|
width 100%
|
@ -1,5 +1,5 @@
|
|||||||
component Forum(tag string, threads []*arn.Thread)
|
component Forum(tag string, threads []*arn.Thread)
|
||||||
h2.forum-header Forum
|
h2.page-title Forum
|
||||||
ForumTags
|
ForumTags
|
||||||
|
|
||||||
each thread in threads
|
each thread in threads
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Genres(genres []*arn.Genre)
|
component Genres(genres []*arn.Genre)
|
||||||
h2 Genres
|
h2.page-title Genres
|
||||||
|
|
||||||
.genres
|
.genres
|
||||||
each genre in genres
|
each genre in genres
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
profile-boot-duration = 2s
|
profile-boot-duration = 2s
|
||||||
|
|
||||||
.profile
|
.profile
|
||||||
display flex
|
horizontal
|
||||||
flex-flow row
|
|
||||||
|
|
||||||
position relative
|
position relative
|
||||||
left calc(content-padding * -1)
|
left calc(content-padding * -1)
|
||||||
|
@ -9,8 +9,15 @@
|
|||||||
|
|
||||||
.post
|
.post
|
||||||
vertical
|
vertical
|
||||||
margin-bottom 0.75rem
|
margin-bottom 1.75rem
|
||||||
|
|
||||||
|
.post-author
|
||||||
|
margin-bottom 0.25rem
|
||||||
|
|
||||||
> 600px
|
> 600px
|
||||||
.post
|
.post
|
||||||
horizontal
|
horizontal
|
||||||
|
margin-bottom 0.75rem
|
||||||
|
|
||||||
|
.post-author
|
||||||
|
margin-bottom 0
|
@ -1,6 +1,10 @@
|
|||||||
.forum-header
|
// .forum-header
|
||||||
text-align left
|
// text-align left
|
||||||
margin-bottom 1rem
|
// margin-bottom 1rem
|
||||||
|
|
||||||
|
.thread-link
|
||||||
|
horizontal
|
||||||
|
margin 0.25rem 0
|
||||||
|
|
||||||
.post-content
|
.post-content
|
||||||
ui-element
|
ui-element
|
||||||
@ -32,9 +36,6 @@
|
|||||||
padding 0.4rem 1rem
|
padding 0.4rem 1rem
|
||||||
align-items center
|
align-items center
|
||||||
|
|
||||||
.thread-link
|
|
||||||
horizontal
|
|
||||||
|
|
||||||
.thread-icons,
|
.thread-icons,
|
||||||
.thread-reply-count
|
.thread-reply-count
|
||||||
opacity 0.5
|
opacity 0.5
|
||||||
@ -59,8 +60,7 @@
|
|||||||
horizontal
|
horizontal
|
||||||
justify-content center
|
justify-content center
|
||||||
align-items flex-start
|
align-items flex-start
|
||||||
margin 0.25rem 0.5rem
|
margin-right 0.5rem
|
||||||
margin-left 0
|
|
||||||
|
|
||||||
// Toolbar
|
// Toolbar
|
||||||
|
|
||||||
|
@ -12,3 +12,6 @@ h3
|
|||||||
line-height 1.6em
|
line-height 1.6em
|
||||||
text-align left
|
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-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)
|
ui-disabled-color = rgb(224, 224, 224)
|
||||||
|
|
||||||
|
// Avatar
|
||||||
|
avatar-size = 50px
|
||||||
|
|
||||||
// Navigation
|
// Navigation
|
||||||
nav-color = rgb(60, 60, 60)
|
nav-color = rgb(60, 60, 60)
|
||||||
nav-link-color = rgb(160, 160, 160)
|
nav-link-color = rgb(160, 160, 160)
|
||||||
@ -32,7 +35,7 @@ outline-shadow-heavy = 0 0 6px rgba(0, 0, 0, 0.6)
|
|||||||
|
|
||||||
// Distances
|
// Distances
|
||||||
content-padding = 1.6rem
|
content-padding = 1.6rem
|
||||||
content-padding-top = 2rem
|
content-padding-top = 1.6rem
|
||||||
hover-line-size = 2px
|
hover-line-size = 2px
|
||||||
nav-height = 3.11rem
|
nav-height = 3.11rem
|
||||||
|
|
||||||
|
@ -31,6 +31,11 @@ mixin ui-disabled
|
|||||||
background-color ui-disabled-color
|
background-color ui-disabled-color
|
||||||
cursor not-allowed
|
cursor not-allowed
|
||||||
|
|
||||||
|
mixin clip-long-text
|
||||||
|
overflow hidden
|
||||||
|
white-space nowrap
|
||||||
|
text-overflow ellipsis
|
||||||
|
|
||||||
mixin light-up
|
mixin light-up
|
||||||
filter brightness(0.4) saturate(1)
|
filter brightness(0.4) saturate(1)
|
||||||
:hover
|
:hover
|
||||||
|
@ -31,13 +31,17 @@
|
|||||||
text-shadow 1px 1px 3px rgba(4, 4, 4, 0.1)
|
text-shadow 1px 1px 3px rgba(4, 4, 4, 0.1)
|
||||||
|
|
||||||
.navigation-button
|
.navigation-button
|
||||||
font-size 1.5em
|
font-size 1em
|
||||||
line-height 1em
|
line-height 1em
|
||||||
padding 0.75em 1em
|
padding 0.75em 1em
|
||||||
|
|
||||||
.navigation-text
|
.navigation-text
|
||||||
display none
|
display none
|
||||||
|
|
||||||
|
> 330px
|
||||||
|
.navigation-button
|
||||||
|
font-size 1.3em
|
||||||
|
|
||||||
> 930px
|
> 930px
|
||||||
.navigation-button
|
.navigation-button
|
||||||
font-size 1.1em
|
font-size 1.1em
|
||||||
@ -47,3 +51,12 @@
|
|||||||
|
|
||||||
.navigation-text
|
.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
|
.user-image
|
||||||
width 50px
|
width avatar-size
|
||||||
height 50px
|
height avatar-size
|
||||||
border-radius 100%
|
border-radius 100%
|
||||||
object-fit cover
|
object-fit cover
|
||||||
default-transition
|
default-transition
|
||||||
|
Loading…
Reference in New Issue
Block a user