Anime character refresh
This commit is contained in:
@ -16,6 +16,7 @@
|
||||
|
||||
.character-image
|
||||
border-radius 3px
|
||||
box-shadow shadow-medium
|
||||
object-fit cover
|
||||
|
||||
.character-name
|
||||
|
21
pages/character/character.go
Normal file
21
pages/character/character.go
Normal file
@ -0,0 +1,21 @@
|
||||
package character
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get character.
|
||||
func Get(ctx *aero.Context) string {
|
||||
id := ctx.Get("id")
|
||||
character, err := arn.GetCharacter(id)
|
||||
|
||||
if err != nil {
|
||||
return ctx.Error(http.StatusNotFound, "Character not found", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.CharacterDetails(character))
|
||||
}
|
5
pages/character/character.pixy
Normal file
5
pages/character/character.pixy
Normal file
@ -0,0 +1,5 @@
|
||||
component CharacterDetails(character *arn.Character)
|
||||
h1= character.Name
|
||||
p
|
||||
img(src=character.Image, alt=character.Name)
|
||||
p= character.Description
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
)
|
||||
|
||||
// Get post.
|
||||
// Get track.
|
||||
func Get(ctx *aero.Context) string {
|
||||
id := ctx.Get("id")
|
||||
track, err := arn.GetSoundTrack(id)
|
||||
|
Reference in New Issue
Block a user