Added music page
This commit is contained in:
parent
50fdc64bc5
commit
57fda44d66
@ -7,7 +7,7 @@ component Navigation(user *arn.User)
|
||||
component LoggedOutMenu
|
||||
nav#navigation.logged-out
|
||||
NavigationButton("About", "/", "question-circle")
|
||||
NavigationButton("Anime", "/anime", "television")
|
||||
NavigationButton("Music", "/music", "headphones")
|
||||
NavigationButton("Forum", "/forum", "comment")
|
||||
|
||||
FuzzySearch
|
||||
@ -26,7 +26,7 @@ component LoggedInMenu(user *arn.User)
|
||||
NavigationButton("Dash", "/", "dashboard")
|
||||
NavigationButton("Profile", "/+", "user")
|
||||
NavigationButton("Forum", "/forum", "comment")
|
||||
NavigationButton("Music", "/music", "music")
|
||||
NavigationButton("Music", "/music", "headphones")
|
||||
|
||||
FuzzySearch
|
||||
|
||||
|
@ -1,8 +1,9 @@
|
||||
package music
|
||||
|
||||
import "github.com/aerogo/aero"
|
||||
import "github.com/animenotifier/notify.moe/components"
|
||||
|
||||
// Get renders the music page.
|
||||
func Get(ctx *aero.Context) string {
|
||||
return ctx.HTML("Coming soon.")
|
||||
return ctx.HTML(components.Music())
|
||||
}
|
||||
|
5
pages/music/music.pixy
Normal file
5
pages/music/music.pixy
Normal file
@ -0,0 +1,5 @@
|
||||
component Music
|
||||
h2.page-title Music
|
||||
|
||||
iframe(src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/127672476&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true")
|
||||
//- <iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/127672476&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true"></iframe>
|
@ -11,3 +11,6 @@
|
||||
height 1em
|
||||
min-width 1em
|
||||
fill currentColor
|
||||
|
||||
.icon-headphones
|
||||
transform translateY(2px)
|
@ -11,9 +11,9 @@ func init() {
|
||||
files, _ := ioutil.ReadDir("images/icons/")
|
||||
|
||||
for _, file := range files {
|
||||
name := strings.Replace(file.Name(), ".svg", "", 1)
|
||||
name := strings.TrimSuffix(file.Name(), ".svg")
|
||||
data, _ := ioutil.ReadFile("images/icons/" + name + ".svg")
|
||||
svgIcons[name] = strings.Replace(string(data), "<svg ", "<svg class='icon' ", 1)
|
||||
svgIcons[name] = strings.Replace(string(data), "<svg ", "<svg class='icon icon-"+name+"' ", 1)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user