diff --git a/pages/airing/airing.pixy b/pages/airing/airing.pixy index 006e7a23..81f5d4c6 100644 --- a/pages/airing/airing.pixy +++ b/pages/airing/airing.pixy @@ -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) \ No newline at end of file diff --git a/pages/dashboard/dashboard.go b/pages/dashboard/dashboard.go index 7cb8155c..302aa607 100644 --- a/pages/dashboard/dashboard.go +++ b/pages/dashboard/dashboard.go @@ -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.
Support the development
Login via Google") diff --git a/pages/dashboard/dashboard.pixy b/pages/dashboard/dashboard.pixy index aa5e0ca1..79f12719 100644 --- a/pages/dashboard/dashboard.pixy +++ b/pages/dashboard/dashboard.pixy @@ -1,5 +1,5 @@ component Dashboard(posts []*arn.Post) - h2 Dash + h2.page-title Dash .dashboard .dashboard-widget diff --git a/pages/dashboard/dashboard.scarlet b/pages/dashboard/dashboard.scarlet index dd7d1409..677f98ed 100644 --- a/pages/dashboard/dashboard.scarlet +++ b/pages/dashboard/dashboard.scarlet @@ -24,6 +24,7 @@ .dashboard-event-text horizontal + clip-long-text justify-content flex-start align-items center width 100% \ No newline at end of file diff --git a/pages/forum/forum.pixy b/pages/forum/forum.pixy index 8d40256d..44dd9829 100644 --- a/pages/forum/forum.pixy +++ b/pages/forum/forum.pixy @@ -1,5 +1,5 @@ component Forum(tag string, threads []*arn.Thread) - h2.forum-header Forum + h2.page-title Forum ForumTags each thread in threads diff --git a/pages/genres/genres.pixy b/pages/genres/genres.pixy index 4d44bfa8..6a684db4 100644 --- a/pages/genres/genres.pixy +++ b/pages/genres/genres.pixy @@ -1,5 +1,5 @@ component Genres(genres []*arn.Genre) - h2 Genres + h2.page-title Genres .genres each genre in genres diff --git a/pages/profile/profile.scarlet b/pages/profile/profile.scarlet index bd3268c3..98cb1756 100644 --- a/pages/profile/profile.scarlet +++ b/pages/profile/profile.scarlet @@ -1,8 +1,7 @@ profile-boot-duration = 2s .profile - display flex - flex-flow row + horizontal position relative left calc(content-padding * -1) diff --git a/pages/threads/threads.scarlet b/pages/threads/threads.scarlet index 36ef9eba..1ac5f3e8 100644 --- a/pages/threads/threads.scarlet +++ b/pages/threads/threads.scarlet @@ -9,8 +9,15 @@ .post vertical - margin-bottom 0.75rem + margin-bottom 1.75rem + + .post-author + margin-bottom 0.25rem > 600px .post - horizontal \ No newline at end of file + horizontal + margin-bottom 0.75rem + + .post-author + margin-bottom 0 \ No newline at end of file diff --git a/styles/forum.scarlet b/styles/forum.scarlet index ed7f67c4..05f84b09 100644 --- a/styles/forum.scarlet +++ b/styles/forum.scarlet @@ -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 diff --git a/styles/headers.scarlet b/styles/headers.scarlet index 3038058c..4ae49efe 100644 --- a/styles/headers.scarlet +++ b/styles/headers.scarlet @@ -11,4 +11,7 @@ h3 font-size 1.5em line-height 1.6em text-align left - margin-top 0.6em \ No newline at end of file + margin-top 0.6em + +.page-title + display none \ No newline at end of file diff --git a/styles/include/config.scarlet b/styles/include/config.scarlet index 72ae4410..9dc05290 100644 --- a/styles/include/config.scarlet +++ b/styles/include/config.scarlet @@ -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 diff --git a/styles/include/mixins.scarlet b/styles/include/mixins.scarlet index 23d13898..af400394 100644 --- a/styles/include/mixins.scarlet +++ b/styles/include/mixins.scarlet @@ -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 diff --git a/styles/navigation.scarlet b/styles/navigation.scarlet index 57480456..8f245f84 100644 --- a/styles/navigation.scarlet +++ b/styles/navigation.scarlet @@ -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 \ No newline at end of file + display inline-block + +< 400px height + #navigation + vertical + height 100% + padding content-padding 0 + + #container + horizontal \ No newline at end of file diff --git a/styles/user.scarlet b/styles/user.scarlet index e78e315a..df03f050 100644 --- a/styles/user.scarlet +++ b/styles/user.scarlet @@ -1,6 +1,6 @@ .user-image - width 50px - height 50px + width avatar-size + height avatar-size border-radius 100% object-fit cover default-transition