Reverted forum style, used for genres now
This commit is contained in:
@ -25,5 +25,5 @@ func Get(ctx *aero.Context) string {
|
||||
thread.Init()
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Forum(threads))
|
||||
return ctx.HTML(components.Forum(tag, threads))
|
||||
}
|
||||
|
@ -1,25 +1,10 @@
|
||||
component Forum(threads []*arn.Thread)
|
||||
h2 Forum
|
||||
ForumHeader
|
||||
component Forum(tag string, threads []*arn.Thread)
|
||||
h2.forum-header Forum
|
||||
ForumTags
|
||||
|
||||
each thread in threads
|
||||
ThreadLink(thread)
|
||||
|
||||
component ForumHeader
|
||||
.forum-tags
|
||||
a.ajax(href="/forum") All
|
||||
span |
|
||||
a.ajax(href="/forum/general") General
|
||||
span |
|
||||
a.ajax(href="/forum/news") News
|
||||
span |
|
||||
a.ajax(href="/forum/anime") Anime
|
||||
span |
|
||||
a.ajax(href="/forum/update") Updates
|
||||
span |
|
||||
a.ajax(href="/forum/suggestion") Suggestions
|
||||
span |
|
||||
a.ajax(href="/forum/bug") Bugs
|
||||
|
||||
component ThreadLink(thread *arn.Thread)
|
||||
.thread-link(data-sticky=thread.Sticky)
|
||||
.post-author.thread-author
|
||||
|
@ -1,3 +1,6 @@
|
||||
.forum-header
|
||||
text-align left
|
||||
|
||||
.forum-tags
|
||||
text-align left
|
||||
margin-bottom 1.5rem
|
||||
|
11
pages/forums/forums.go
Normal file
11
pages/forums/forums.go
Normal file
@ -0,0 +1,11 @@
|
||||
package forums
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/pages/forum"
|
||||
)
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
return forum.Get(ctx)
|
||||
}
|
26
pages/forums/forums.pixy
Normal file
26
pages/forums/forums.pixy
Normal file
@ -0,0 +1,26 @@
|
||||
component Forums
|
||||
h2.forum-header Forum
|
||||
ForumTags
|
||||
|
||||
component ForumTags
|
||||
.forum-tags
|
||||
ForumCategory("All", "")
|
||||
span |
|
||||
ForumCategory("General", "/general")
|
||||
span |
|
||||
ForumCategory("News", "/news")
|
||||
span |
|
||||
ForumCategory("Anime", "/anime")
|
||||
span |
|
||||
ForumCategory("Updates", "/update")
|
||||
span |
|
||||
ForumCategory("Suggestions", "/suggestion")
|
||||
span |
|
||||
ForumCategory("Bugs", "/bug")
|
||||
|
||||
component ForumCategory(title string, suffix string)
|
||||
a.ajax(href="/forum" + suffix)= title
|
||||
//- a.grid-cell.ajax(href="/forum/" + category)
|
||||
//- .grid-text
|
||||
//- GridIcon(arn.GetForumIcon(category))
|
||||
//- span= title
|
@ -2,5 +2,5 @@ component Genre(genre string, animeList []*arn.Anime)
|
||||
h2.genre-header= arn.Capitalize(genre)
|
||||
.grid
|
||||
each anime in animeList
|
||||
a.grid-cell.ajax(href="/anime/" + toString(anime.ID))
|
||||
img.anime-image.grid-cell-content.grid-cell-image(src=anime.Image, alt=anime.Title.Romaji, title=anime.Title.Romaji + " (" + toString(anime.Watching) + ")")
|
||||
a.grid-cell.grid-anime.ajax(href="/anime/" + toString(anime.ID))
|
||||
img.anime-image.grid-image(src=anime.Image, alt=anime.Title.Romaji, title=anime.Title.Romaji + " (" + toString(anime.Watching) + ")")
|
@ -1,28 +0,0 @@
|
||||
.grid
|
||||
display flex
|
||||
flex-flow row wrap
|
||||
float none !important
|
||||
justify-content center
|
||||
|
||||
.grid-cell
|
||||
margin 0.5em
|
||||
flex-grow 0
|
||||
flex-shrink 0
|
||||
|
||||
.grid-cell-content
|
||||
width 16vw
|
||||
height 9vw
|
||||
min-width 90px
|
||||
min-height 127px
|
||||
max-width 200px
|
||||
max-height 282px
|
||||
|
||||
.grid-cell-image
|
||||
object-fit cover
|
||||
|
||||
.grid-cell-text
|
||||
display flex
|
||||
flex-flow column
|
||||
align-items center
|
||||
justify-content center
|
||||
padding 0.75em
|
@ -1,9 +1,9 @@
|
||||
component Genres
|
||||
h2.genre-header Genres
|
||||
h2 Genres
|
||||
|
||||
.grid
|
||||
each genre in arn.Genres
|
||||
a.grid-cell.light-button.ajax(href="/genres/" + arn.FixGenre(genre))
|
||||
.genre.grid-cell-content.grid-cell-text
|
||||
Icon(arn.GetGenreIcon(genre))
|
||||
a.grid-cell.ajax(href="/genres/" + arn.FixGenre(genre))
|
||||
.grid-text
|
||||
GridIcon(arn.GetGenreIcon(genre))
|
||||
span= genre
|
@ -1,9 +0,0 @@
|
||||
.genre-header
|
||||
text-align center
|
||||
|
||||
.genre
|
||||
font-size 1rem
|
||||
.fa
|
||||
font-size 2rem
|
||||
margin-right 0
|
||||
margin-bottom 1rem
|
Reference in New Issue
Block a user