From 8d5df76983e3e9f2bf5f3e4432791cccf14cda48 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Mon, 13 Nov 2017 13:34:08 +0100 Subject: [PATCH] Removed ForumTags template --- mixins/ForumTags.pixy | 14 -------------- pages/forum/forum.pixy | 23 ++++++++++++++++++++--- pages/forums/forums.go | 11 ----------- pages/index.go | 3 +-- 4 files changed, 21 insertions(+), 30 deletions(-) delete mode 100644 mixins/ForumTags.pixy delete mode 100644 pages/forums/forums.go diff --git a/mixins/ForumTags.pixy b/mixins/ForumTags.pixy deleted file mode 100644 index d89a59be..00000000 --- a/mixins/ForumTags.pixy +++ /dev/null @@ -1,14 +0,0 @@ -component ForumTags - .tabs - 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, category string, icon string) - a.tab.action(href=strings.TrimSuffix("/forum/" + category, "/"), data-action="diff", data-trigger="click") - Icon(arn.GetForumIcon(category)) - span.tab-text= title \ No newline at end of file diff --git a/pages/forum/forum.pixy b/pages/forum/forum.pixy index 093fb157..a0eab6be 100644 --- a/pages/forum/forum.pixy +++ b/pages/forum/forum.pixy @@ -1,9 +1,11 @@ component Forum(tag string, threads []*arn.Thread, threadsPerPage int) h1.page-title Forum - ForumTags + + ForumTabs + .forum ThreadList(threads) - + .buttons button#new-thread.action(data-action="load", data-trigger="click", data-url="/new/thread") Icon("plus") @@ -16,4 +18,19 @@ component ThreadList(threads []*arn.Thread) p.no-data.mountable No threads found. else each thread in threads - ThreadLink(thread) \ No newline at end of file + ThreadLink(thread) + +component ForumTabs + .tabs + ForumTab("All", "", "list") + ForumTab("General", "general", "list") + ForumTab("News", "news", "list") + ForumTab("Anime", "anime", "list") + ForumTab("Updates", "update", "list") + ForumTab("Suggestions", "suggestion", "list") + ForumTab("Bugs", "bug", "list") + +component ForumTab(title string, category string, icon string) + a.tab.action(href=strings.TrimSuffix("/forum/" + category, "/"), data-action="diff", data-trigger="click") + Icon(arn.GetForumIcon(category)) + span.tab-text= title \ No newline at end of file diff --git a/pages/forums/forums.go b/pages/forums/forums.go deleted file mode 100644 index be137ffe..00000000 --- a/pages/forums/forums.go +++ /dev/null @@ -1,11 +0,0 @@ -package forums - -import ( - "github.com/aerogo/aero" - "github.com/animenotifier/notify.moe/pages/forum" -) - -// Get forums page. -func Get(ctx *aero.Context) string { - return forum.Get(ctx) -} diff --git a/pages/index.go b/pages/index.go index f813eba1..4d8cee5b 100644 --- a/pages/index.go +++ b/pages/index.go @@ -20,7 +20,6 @@ import ( "github.com/animenotifier/notify.moe/pages/embed" "github.com/animenotifier/notify.moe/pages/explore" "github.com/animenotifier/notify.moe/pages/forum" - "github.com/animenotifier/notify.moe/pages/forums" "github.com/animenotifier/notify.moe/pages/group" "github.com/animenotifier/notify.moe/pages/groups" "github.com/animenotifier/notify.moe/pages/home" @@ -66,7 +65,7 @@ func Configure(app *aero.Application) { // l.Ajax("/amvs", amvs.Get) // Forum - l.Page("/forum", forums.Get) + l.Page("/forum", forum.Get) l.Page("/forum/:tag", forum.Get) l.Page("/thread/:id", threads.Get) l.Page("/post/:id", posts.Get)