Added music page

This commit is contained in:
Eduard Urbach 2017-06-27 13:06:19 +02:00
parent 50fdc64bc5
commit 57fda44d66
5 changed files with 16 additions and 7 deletions

View File

@ -7,7 +7,7 @@ component Navigation(user *arn.User)
component LoggedOutMenu component LoggedOutMenu
nav#navigation.logged-out nav#navigation.logged-out
NavigationButton("About", "/", "question-circle") NavigationButton("About", "/", "question-circle")
NavigationButton("Anime", "/anime", "television") NavigationButton("Music", "/music", "headphones")
NavigationButton("Forum", "/forum", "comment") NavigationButton("Forum", "/forum", "comment")
FuzzySearch FuzzySearch
@ -26,7 +26,7 @@ component LoggedInMenu(user *arn.User)
NavigationButton("Dash", "/", "dashboard") NavigationButton("Dash", "/", "dashboard")
NavigationButton("Profile", "/+", "user") NavigationButton("Profile", "/+", "user")
NavigationButton("Forum", "/forum", "comment") NavigationButton("Forum", "/forum", "comment")
NavigationButton("Music", "/music", "music") NavigationButton("Music", "/music", "headphones")
FuzzySearch FuzzySearch

View File

@ -1,8 +1,9 @@
package music package music
import "github.com/aerogo/aero" import "github.com/aerogo/aero"
import "github.com/animenotifier/notify.moe/components"
// Get renders the music page. // Get renders the music page.
func Get(ctx *aero.Context) string { func Get(ctx *aero.Context) string {
return ctx.HTML("Coming soon.") return ctx.HTML(components.Music())
} }

5
pages/music/music.pixy Normal file
View 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&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>

View File

@ -11,3 +11,6 @@
height 1em height 1em
min-width 1em min-width 1em
fill currentColor fill currentColor
.icon-headphones
transform translateY(2px)

View File

@ -11,9 +11,9 @@ func init() {
files, _ := ioutil.ReadDir("images/icons/") files, _ := ioutil.ReadDir("images/icons/")
for _, file := range files { for _, file := range files {
name := strings.Replace(file.Name(), ".svg", "", 1) name := strings.TrimSuffix(file.Name(), ".svg")
data, _ := ioutil.ReadFile("images/icons/" + 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)
} }
} }