Skip to content

Commit

Permalink
remove album routes, make lyrics_only route
Browse files Browse the repository at this point in the history
  • Loading branch information
kellen hart committed Sep 29, 2013
1 parent 3504a57 commit 8343e88
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 56 deletions.
11 changes: 4 additions & 7 deletions app/assets/javascripts/router.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,9 @@ Pah.Router.map ()->
this.route("info", { path: "/info"})
this.resource "music", { path: "/music" }, ->
this.resource "all_songs", { path: "/all_songs" }, ->
# here, i should just make an action that displays the lyrics where
# the album image was, with a little X to hide and display the album name
this.resource("song", { path: "/:song_id" })

this.resource "albums", -> # the function call needs to be here
# these are not nested under albums because the albums index
# view needs to be replaced, instead of more stuff going in its
# outlet
this.resource "album", { path: "album/:album_id"}, ->
this.resource "album_songs", { path: "songs" }, ->
this.resource "album_song", {path: "/:song_id"}
# unnest lyrics to remove odd 'listen below' conundrum, or ...
this.route "lyrics_only", { path: "/lyrics" }
2 changes: 0 additions & 2 deletions app/assets/javascripts/routes/album_route.js.coffee

This file was deleted.

2 changes: 0 additions & 2 deletions app/assets/javascripts/routes/album_songs_route.js.coffee

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/javascripts/routes/albums_route.js.coffee

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Pah.MusicLyricsOnlyRoute = Ember.Route.extend
model: -> @store.findAll('song')

16 changes: 0 additions & 16 deletions app/assets/javascripts/templates/album.hbs

This file was deleted.

18 changes: 0 additions & 18 deletions app/assets/javascripts/templates/albums.hbs

This file was deleted.

19 changes: 19 additions & 0 deletions app/assets/javascripts/templates/all_songs.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,22 @@
{{!-- outlet for child song show view --}}
{{ outlet }}
</div>
{{!--
<div class="row">
<div class="large-12 columns">
<div class="panel">
<h4>Albums</h4>
{{#each}}
<span>
{{#linkTo "album" this class="th"}}
<img {{bindAttr
src="image_full_thumb_url"
alt="title"
title="title"
}}>
{{/linkTo}}
</span>
{{/each}}
</div>
</div>
</div> --}}
1 change: 1 addition & 0 deletions app/assets/javascripts/templates/application.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<div class="large-12 columns">
{{#linkTo "home" class="menu-item"}}Home{{/linkTo}}
{{#linkTo "all_songs.index" class="menu-item"}}Music{{/linkTo}}
{{#linkTo "music.lyrics_only" class="menu-item"}}Lyrics{{/linkTo}}
{{#linkTo "info" class="menu-item"}}Contact{{/linkTo}}
</div>
</div>
Expand Down
14 changes: 14 additions & 0 deletions app/assets/javascripts/templates/music/lyrics_only.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<div class="row" id="lyrics-only-content">
<div class="large-offset-1 large-11 columns">
<ul>
{{#each}}
{{#linkTo "song" this titleBinding=name}}
<li>
<h2>{{name}}</h2>
<p>{{{formatted_lyrics}}}</p>
</li>
{{/linkTo}}
{{/each}}
</ul>
</div>
</div>
22 changes: 14 additions & 8 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,21 @@ header {
height: 100px;
overflow: hidden;
}
}

// these styles are to hide decoy fields
#email {
display: none;
// these styles are to hide decoy fields
#email {
display: none;
}

#email-field {
position: fixed;
left: 3000;
top: 3000;
}
}

#email-field {
position: fixed;
left: 3000;
top: 3000;
#lyrics-only-content {
li {
margin-top: 70px;
}
}

0 comments on commit 8343e88

Please sign in to comment.