Added new soundtrack interface
This commit is contained in:
20
pages/newsoundtrack/newsoundtrack.go
Normal file
20
pages/newsoundtrack/newsoundtrack.go
Normal file
@ -0,0 +1,20 @@
|
||||
package newsoundtrack
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/notify.moe/components"
|
||||
"github.com/animenotifier/notify.moe/utils"
|
||||
)
|
||||
|
||||
// Get forums page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
user := utils.GetUser(ctx)
|
||||
|
||||
if user == nil {
|
||||
return ctx.Error(http.StatusBadRequest, "Not logged in", nil)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.NewSoundTrack(user))
|
||||
}
|
10
pages/newsoundtrack/newsoundtrack.pixy
Normal file
10
pages/newsoundtrack/newsoundtrack.pixy
Normal file
@ -0,0 +1,10 @@
|
||||
component NewSoundTrack(user *arn.User)
|
||||
.widgets
|
||||
.widget
|
||||
input#soundcloud-link.widget-element(type="text", placeholder="Soundcloud link or ID")
|
||||
input#anime-link.widget-element(type="text", placeholder="Anime link or ID")
|
||||
input#osu-link.widget-element(type="text", placeholder="Osu beatmap link (optional)")
|
||||
|
||||
button.action(data-action="createSoundTrack", data-trigger="click")
|
||||
Icon("check")
|
||||
span Add soundtrack
|
Reference in New Issue
Block a user