Removed ForumTags template

This commit is contained in:
Eduard Urbach 2017-11-13 13:34:08 +01:00
parent 6f945febf7
commit 8d5df76983
4 changed files with 21 additions and 30 deletions

View File

@ -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

View File

@ -1,9 +1,11 @@
component Forum(tag string, threads []*arn.Thread, threadsPerPage int) component Forum(tag string, threads []*arn.Thread, threadsPerPage int)
h1.page-title Forum h1.page-title Forum
ForumTags
ForumTabs
.forum .forum
ThreadList(threads) ThreadList(threads)
.buttons .buttons
button#new-thread.action(data-action="load", data-trigger="click", data-url="/new/thread") button#new-thread.action(data-action="load", data-trigger="click", data-url="/new/thread")
Icon("plus") Icon("plus")
@ -16,4 +18,19 @@ component ThreadList(threads []*arn.Thread)
p.no-data.mountable No threads found. p.no-data.mountable No threads found.
else else
each thread in threads each thread in threads
ThreadLink(thread) 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

View File

@ -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)
}

View File

@ -20,7 +20,6 @@ import (
"github.com/animenotifier/notify.moe/pages/embed" "github.com/animenotifier/notify.moe/pages/embed"
"github.com/animenotifier/notify.moe/pages/explore" "github.com/animenotifier/notify.moe/pages/explore"
"github.com/animenotifier/notify.moe/pages/forum" "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/group"
"github.com/animenotifier/notify.moe/pages/groups" "github.com/animenotifier/notify.moe/pages/groups"
"github.com/animenotifier/notify.moe/pages/home" "github.com/animenotifier/notify.moe/pages/home"
@ -66,7 +65,7 @@ func Configure(app *aero.Application) {
// l.Ajax("/amvs", amvs.Get) // l.Ajax("/amvs", amvs.Get)
// Forum // Forum
l.Page("/forum", forums.Get) l.Page("/forum", forum.Get)
l.Page("/forum/:tag", forum.Get) l.Page("/forum/:tag", forum.Get)
l.Page("/thread/:id", threads.Get) l.Page("/thread/:id", threads.Get)
l.Page("/post/:id", posts.Get) l.Page("/post/:id", posts.Get)