From 009c73629f20db7881fb906d0275da827764f0fd Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 20 Jun 2017 13:15:32 +0200 Subject: [PATCH] Improved forum frontpage --- mixins/ForumTags.pixy | 22 ++++++++++++---------- pages/animelistitem/animelistitem.pixy | 2 +- pages/forum/forum.pixy | 5 ++++- pages/forum/forum.scarlet | 2 +- styles/actions.scarlet | 4 ++-- styles/forum.scarlet | 1 + 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/mixins/ForumTags.pixy b/mixins/ForumTags.pixy index 252c40d7..9b4738a6 100644 --- a/mixins/ForumTags.pixy +++ b/mixins/ForumTags.pixy @@ -1,12 +1,14 @@ component ForumTags - .forum-tags.light-button-group - ForumTag("All", "") - ForumTag("General", "/general") - ForumTag("News", "/news") - ForumTag("Anime", "/anime") - ForumTag("Updates", "/update") - ForumTag("Suggestions", "/suggestion") - ForumTag("Bugs", "/bug") + .buttons.forum-tags + ForumTag("All", "", "list") + ForumTag("General", "general", "list") + ForumTag("News", "news", "list") + ForumTag("Anime", "anime", "list") + ForumTag("Updates", "update", "list") + ForumTag("Suggestions", "suggestion", "list") + ForumTag("Bugs", "bug", "list") -component ForumTag(title string, suffix string) - a.light-button.forum-tag.ajax(href="/forum" + suffix)= title \ No newline at end of file +component ForumTag(title string, category string, icon string) + a.button.forum-tag.ajax(href=strings.TrimSuffix("/forum/" + category, "/")) + Icon(arn.GetForumIcon(category)) + span= title \ No newline at end of file diff --git a/pages/animelistitem/animelistitem.pixy b/pages/animelistitem/animelistitem.pixy index d3efdad2..87193f18 100644 --- a/pages/animelistitem/animelistitem.pixy +++ b/pages/animelistitem/animelistitem.pixy @@ -10,7 +10,7 @@ component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn. InputTextArea("notes", item.Notes, "Notes", "Notes") - .actions + .buttons a.ajax.button(href="/+" + viewUser.Nick + "/animelist") Icon("list") span View collection diff --git a/pages/forum/forum.pixy b/pages/forum/forum.pixy index 4e51b24b..654e05da 100644 --- a/pages/forum/forum.pixy +++ b/pages/forum/forum.pixy @@ -3,7 +3,10 @@ component Forum(tag string, threads []*arn.Thread) ForumTags ThreadList(threads) - button#load-more-threads Load more + .buttons + button + Icon("refresh") + span Load more component ThreadList(threads []*arn.Thread) each thread in threads diff --git a/pages/forum/forum.scarlet b/pages/forum/forum.scarlet index 93f914fe..c119d3ad 100644 --- a/pages/forum/forum.scarlet +++ b/pages/forum/forum.scarlet @@ -1,7 +1,7 @@ .forum-tag &.active color white - background-color text-color + background-color link-hover-color #load-more-threads margin-top 1rem \ No newline at end of file diff --git a/styles/actions.scarlet b/styles/actions.scarlet index 73bff483..a0f162a2 100644 --- a/styles/actions.scarlet +++ b/styles/actions.scarlet @@ -1,6 +1,6 @@ -.actions +.buttons horizontal-wrap - justify-content space-around + justify-content center button, .button margin 0.5rem \ No newline at end of file diff --git a/styles/forum.scarlet b/styles/forum.scarlet index 05f84b09..8e3c402d 100644 --- a/styles/forum.scarlet +++ b/styles/forum.scarlet @@ -54,6 +54,7 @@ color text-color .forum-tags + justify-content flex-start !important margin-bottom 1rem .post-author