Skip to content

Commit

Permalink
style things, take out extra routes, change seed helper slightly, add…
Browse files Browse the repository at this point in the history
… icons, another picture

changes for heroku: update gitignore, gemfile, and config application
  • Loading branch information
kellen hart committed Sep 15, 2013
1 parent 1d7c9cb commit 3c80403
Show file tree
Hide file tree
Showing 22 changed files with 144 additions and 49 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@
# Ignore all logfiles and tempfiles.
/log/*.log
/tmp

.DS_Store
11 changes: 9 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
source 'https://rubygems.org'
ruby "1.9.3"

gem 'rails', '3.2.13'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3'
gem 'ember-rails'
gem 'ember-source', '1.0.0'
gem 'ember-data-source', '~> 1.0.0.beta.2'
gem 'faker'
gem 'font-awesome-sass-rails'
gem 'haml-rails'

group :test, :development do
gem 'rspec-rails'
gem 'pry-rails'
gem 'sqlite3'
end

group :test do
gem 'shoulda'
gem 'faker'
end

group :production do
gem 'pg'
gem 'rails_12factor'
end


Expand Down
12 changes: 12 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ GEM
execjs (2.0.1)
faker (1.2.0)
i18n (~> 0.5)
font-awesome-sass-rails (3.0.2.2)
railties (>= 3.1.1)
sass-rails (>= 3.1.1)
haml (4.0.3)
tilt
haml-rails (0.4)
Expand All @@ -82,6 +85,7 @@ GEM
method_source (0.8.2)
mime-types (1.25)
multi_json (1.8.0)
pg (0.16.0)
polyglot (0.3.3)
pry (0.9.12.2)
coderay (~> 1.0.5)
Expand All @@ -104,6 +108,11 @@ GEM
activesupport (= 3.2.13)
bundler (~> 1.0)
railties (= 3.2.13)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.1)
rails_stdout_logging (0.0.2)
railties (3.2.13)
actionpack (= 3.2.13)
activesupport (= 3.2.13)
Expand Down Expand Up @@ -164,10 +173,13 @@ DEPENDENCIES
ember-rails
ember-source (= 1.0.0)
faker
font-awesome-sass-rails
haml-rails
jquery-rails
pg
pry-rails
rails (= 3.2.13)
rails_12factor
rspec-rails
sass-rails (~> 3.2.3)
shoulda
Expand Down
Binary file added app/assets/images/gig1_960.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

10 changes: 9 additions & 1 deletion app/assets/javascripts/models/song.js.coffee
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Pah.Song = DS.Model.extend()
Pah.Song = DS.Model.extend
name: DS.attr('string')
lyrics: DS.attr('string')
chords: DS.attr('string')
date_written: DS.attr('string')

formatted_lyrics: (->
@get('lyrics').split("\n").join("<br/>")
).property('lyrics')

2 changes: 1 addition & 1 deletion app/assets/javascripts/router.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Pah.Router.map ()->
this.route("home", { path: "/"})
this.route("bio")
this.route("info", { path: "/info"})
this.resource "songs", ->
this.resource("song", { path: "/:song_id" })

Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/routes/song_route.js.coffee
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Pah.SongRoute = Ember.Route.extend
model: (params) -> songs.findBy('id', params.song_id)
model: (params) -> @store.find('song', params.song_id)
40 changes: 29 additions & 11 deletions app/assets/javascripts/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
<!-- this is the the layout rendered automatically when ember app .create() is called -->
<div class="row">
<div class="large-10 small-12 columns">
<ul class="button-group">
<li>{{#linkTo "home" class="small button secondary"}}Home{{/linkTo}}</li>
<li>{{#linkTo "bio" class="small button secondary"}}About Phil{{/linkTo}}</li>
<li>{{#linkTo "songs.index" class="small button secondary"}}Lyrics and Chords{{/linkTo}}</li>
<li>{{#linkTo "home" class="small button secondary"}}Listen to some songs{{/linkTo}}</li>
<li>{{#linkTo "home" class="small button secondary"}}Buy some songs{{/linkTo}}</li>
<li>{{#linkTo "home" class="small button secondary"}}Contact Phil{{/linkTo}}</li>
<div class="fixed">
<nav class="top-bar">
<ul class="title-area">
<!-- Title Area -->
<li class="name">
<h1><a href="#">pahart </a></h1>
</li>
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
</div>

<section class="top-bar-section">
<!-- Left Nav Section -->
<ul class="left">
<li class="divider"></li>
<li>
{{#linkTo "home"}}<i title="home" class="icon-home"></i>{{/linkTo}}
</li>
<li class="divider"></li>
<li>
{{#linkTo "songs.index"}}<i title="music" class="icon-music"></i>{{/linkTo}}
</li>
<li class="divider"></li>
<li>
{{#linkTo "info"}}<i title="contact" class="icon-info-sign"></i>{{/linkTo}}
</li>
</ul>
</section>
</nav>
</div>
<section class="main-content">{{ outlet }}</section>

{{ outlet }}
5 changes: 0 additions & 5 deletions app/assets/javascripts/templates/bio.hbs.erb

This file was deleted.

2 changes: 1 addition & 1 deletion app/assets/javascripts/templates/home.hbs.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<img id="welcome-pic" src="<%= image_path('phil1_300.jpg') %>">
</div>
<div class="large-5 small-5 columns">
<p>Intro text here</p>
<p><%= "about phil info text here<br>more great stuff about him<br><br>wow, it just keeps going.".html_safe %> </p>
</div>
</div>
3 changes: 0 additions & 3 deletions app/assets/javascripts/templates/song.hbs

This file was deleted.

7 changes: 7 additions & 0 deletions app/assets/javascripts/templates/song.hbs.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div class="panel">
<span><h4>{{name}}</h4></span>
<span><%= audio_tag 'section_7.mp3', controls: true%></span>
<p>{{{formatted_lyrics}}}</p>
<p>{{chords}}</p>
<p>{{date_written}}</p>
</div>
16 changes: 0 additions & 16 deletions app/assets/javascripts/templates/songs.hbs

This file was deleted.

25 changes: 25 additions & 0 deletions app/assets/javascripts/templates/songs.hbs.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<div class="row">
<div class="large-12 columns">
<div class="center-image panel">
<%= image_tag "gig1_960.jpg" %>
</div>
</div>
</div>
<div class="row">
<div class="large-4 columns">
<div class="panel">
<ul class="side-nav">
{{#each}}
{{#linkTo "song" this}}
<li>{{name}}</li>
{{/linkTo}}
{{/each}}
</ul>
</div>
</div>

<div class="large-8 columns">
{{!-- outlet for child song show view --}}
{{ outlet }}
</div>
</div>
1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require _font-awesome
*= require main
*/
40 changes: 38 additions & 2 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,51 @@

/* Colors */
// $primary-color: #eee;
// $secondary-color: #eee;
// $topbar-bg: #eee;
// $topbar-link-color: #444;
// $topbar-link-color-hover: #111;
// $topbar-link-color-active: #111;
$topbar-height: 55px;
$topbar-title-font-size: emCalc(23);

$topbar-link-font-size: emCalc(13);
$topbar-menu-link-font-size: emCalc(33);


$secondary-color: #fefefe;

// $button-font-color: #444;

@import "foundation";
@import "font-awesome";

// handlebars css

// .active is auto added to any active linkTo
.active {
.top-bar-section ul li > a.active {
color: black;
background-color: #ccc;
}


// custom css

nav.top-bar i {
font-size: emCalc(40);
line-height: 10px;
}

.main-content {
//make space for header
margin-top: 70px;
}
.panel.center-image {
background-color: #C6D0D8;
border-color: #99B1C3;
img {
-webkit-box-shadow: 0 0 5px #999;
-moz-box-shadow: 0 0 5px #999;
box-shadow: 0 0 5px #999;
border-color: #999;
}
}
2 changes: 1 addition & 1 deletion app/helpers/seeds_helper.rb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/serializers/song_serializer.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class SongSerializer < ActiveModel::Serializer
attributes :id, :name
attributes :id, :name, :lyrics, :chords, :date_written
end
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ class Application < Rails::Application

# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'

# For heroku
config.assets.initialize_on_precompile = false
end
end
7 changes: 4 additions & 3 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ test:
timeout: 5000

production:
adapter: sqlite3
database: db/production.sqlite3
adapter: postgresql
database: pahart_production
pool: 5
timeout: 5000
username: pahart
password:
Binary file added vendor/assets/ember/.DS_Store
Binary file not shown.

0 comments on commit 3c80403

Please sign in to comment.