New dashboard idea (still not happy though)
This commit is contained in:
19
pages/posts/posts.go
Normal file
19
pages/posts/posts.go
Normal file
@ -0,0 +1,19 @@
|
||||
package posts
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get ...
|
||||
func Get(ctx *aero.Context) string {
|
||||
id := ctx.Get("id")
|
||||
post, err := arn.GetPost(id)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(404, "Post not found")
|
||||
}
|
||||
|
||||
return ctx.HTML(components.Post(post))
|
||||
}
|
5
pages/posts/posts.pixy
Normal file
5
pages/posts/posts.pixy
Normal file
@ -0,0 +1,5 @@
|
||||
component Post(post *arn.Post)
|
||||
Postable(post.ToPostable(), nil, "")
|
||||
|
||||
.thread-source
|
||||
a.ajax(href=post.Thread().Link())= post.Thread().Title
|
3
pages/posts/posts.styl
Normal file
3
pages/posts/posts.styl
Normal file
@ -0,0 +1,3 @@
|
||||
.thread-source
|
||||
font-size 0.9rem
|
||||
text-align right !important
|
Reference in New Issue
Block a user