Permalink
Browse files

Added sprockets support

  * moved stylesheets and javascripts to app/assets
  * converted css to sass and js to coffee
  • Loading branch information...
1 parent b0e49d6 commit 11f7fdd3251c00a742b11b5f0136f7f8b37f3b58 @michaelparenteau michaelparenteau committed Sep 2, 2011
Showing with 945 additions and 1,104 deletions.
  1. +2 −1 .gitignore
  2. +1 −0 Gemfile
  3. +7 −0 Gemfile.lock
  4. +33 −0 app/assets/javascripts/application.js.coffee
  5. +37 −0 app/assets/javascripts/browser.js.coffee
  6. 0 {public → app/assets}/javascripts/ga.js
  7. +18 −0 app/assets/javascripts/jquery.js
  8. 0 {public → app/assets}/javascripts/jquery.mousewheel.js
  9. 0 {public/javascripts → app/assets/stylesheets}/.gitkeep
  10. +337 −0 app/assets/stylesheets/browser.css.sass
  11. +506 −0 app/assets/stylesheets/hooppps.css.sass
  12. BIN {public → app/assets}/stylesheets/img/airball.png
  13. BIN {public → app/assets}/stylesheets/img/buttons/big-glare.png
  14. BIN {public → app/assets}/stylesheets/img/buttons/bigger-glare.png
  15. BIN {public → app/assets}/stylesheets/img/buttons/glare.png
  16. BIN {public → app/assets}/stylesheets/img/hooppps.png
  17. BIN {public → app/assets}/stylesheets/img/icons/about-nav.png
  18. BIN {public → app/assets}/stylesheets/img/icons/comment.png
  19. BIN {public → app/assets}/stylesheets/img/icons/debut-nav.png
  20. BIN {public → app/assets}/stylesheets/img/icons/everyone-nav.png
  21. BIN {public → app/assets}/stylesheets/img/icons/eye.png
  22. BIN {public → app/assets}/stylesheets/img/icons/go-to-player-nav.png
  23. BIN {public → app/assets}/stylesheets/img/icons/heart-nav.png
  24. BIN {public → app/assets}/stylesheets/img/icons/heart.png
  25. BIN {public → app/assets}/stylesheets/img/thumb.png
  26. BIN {public → app/assets}/stylesheets/img/toolbar.png
  27. +1 −1 app/views/layouts/application.html.haml
  28. +2 −2 app/views/layouts/browser.html.haml
  29. +1 −0 config/application.rb
  30. +0 −47 public/javascripts/application.js
  31. +0 −28 public/javascripts/browser.js
  32. +0 −154 public/javascripts/jquery.js
  33. 0 public/stylesheets/.gitkeep
  34. +0 −312 public/stylesheets/browser.css
  35. +0 −558 public/stylesheets/hooppps.css
  36. +0 −1 public/stylesheets/jqtouch.css
View
@@ -5,4 +5,5 @@ tmp
*~
\#*#
.#*
-.DS_Store
+.DS_Store
+.sass-cache*
View
@@ -3,4 +3,5 @@ source 'http://rubygems.org'
gem 'rails', '>= 3.1'
gem 'swish', :git => "git://github.com/michaelparenteau/swish.git", :branch => "ruby-1.9.2"
gem 'haml', '3.1.2'
+gem 'coffee-script', '1.1.2'
# gem "vidibus-routing_error"
View
@@ -44,8 +44,14 @@ GEM
arel (2.2.1)
bcrypt-ruby (3.0.0)
builder (3.0.0)
+ coffee-script (2.2.0)
+ coffee-script-source
+ execjs
+ coffee-script-source (1.1.2)
crack (0.1.8)
erubis (2.7.0)
+ execjs (1.2.4)
+ multi_json (~> 1.0)
haml (3.1.2)
hike (1.2.1)
httparty (0.6.1)
@@ -101,6 +107,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ coffee-script
haml (= 3.1.2)
rails (>= 3.1)
swish!
@@ -0,0 +1,33 @@
+#= require jquery
+
+# hide address bar (scroll below)
+setTimeout ->
+ window.scrollTo(0, 1);
+, 1000
+
+# toggle content div and about div visibility
+# also toggle button text about/close
+# ------------------------------------------
+
+
+$ ->
+ navButton = $('.nav')
+ nav = $('#nav')
+
+ showNav = ->
+ navButton.text 'close'
+ nav.css {display: 'block'}
+ nav.animate {opacity: 1, top: '45px'}, 250
+
+ hideNav = ->
+ navButton.text 'nav'
+ nav.animate {opacity: 0, top: '30px'}, 250
+ nav.fadeOut '250'
+
+ $('.back_button').click ->
+ nav.fadeOut 400, ->
+ navButton.text 'nav'
+ $('#content').fadeIn 400
+
+ navButton.toggle showNav, hideNav
+
@@ -0,0 +1,37 @@
+//= require application
+//= require jquery.mousewheel.js
+
+pixels = (str) ->
+ parseInt str.split("px")[0]
+
+newMargin = (margin, delta, maxHeight) ->
+ maxHeight = maxHeight * -1
+ margin += delta*50
+ margin = if margin > 0 then 0 else margin
+ margin = if margin < maxHeight then maxHeight else margin
+ margin = margin + "px"
+ margin
+
+$ ->
+ # fade actions button
+ $('.fadein').hover ->
+ $(this).fadeTo 'fast', 1
+ , ->
+ $(this).fadeTo 'fast', .8
+
+ # fade footer links
+ $('.footer a.fadein').hover ->
+ $(this).fadeTo 'fast', 1
+ , ->
+ $(this).fadeTo 'fast', .6
+
+ # makes mocked up mobile devise in browser scroll
+ $('#track').mousewheel (event, delta) ->
+ event.preventDefault()
+
+ margin = pixels($(this).css("margin-top")) or 0
+ frameHeight = pixels $("#frame").css("height")
+ contentHeight = pixels $("#content").css("height")
+ maxHeight = contentHeight - frameHeight + 100
+
+ $(this).css "margin-top", newMargin(margin, delta, maxHeight)
File renamed without changes.

Large diffs are not rendered by default.

Oops, something went wrong.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 11f7fdd

Please sign in to comment.