diff --git a/app/controllers/geronimo_controller.rb b/app/controllers/geronimo_controller.rb index b6aa05a..65d4d4b 100644 --- a/app/controllers/geronimo_controller.rb +++ b/app/controllers/geronimo_controller.rb @@ -7,11 +7,13 @@ def everything def index blog = Blog.latest_for_frontpage - @latest_front_page_blogpost = blog ? blog.blogtext : "Nothing to say" + @latest_front_page_blogpost = blog ? blog.to_html : "Predators hunt you" @next_show = Show.next_show if(Track.where(:frontpage => true).count > 0) @frontpage_audio_url = Track.where(:frontpage => true).first.recording.url + @tracks = Track.where(:frontpage => true).limit(4); end + @pictures = Picture.all.shuffle render 'predators/home', :layout => 'simple' end diff --git a/app/controllers/tracks_controller.rb b/app/controllers/tracks_controller.rb index e87524d..eb7fae5 100644 --- a/app/controllers/tracks_controller.rb +++ b/app/controllers/tracks_controller.rb @@ -13,8 +13,8 @@ def index def frontpage track = Track.find(params[:id]) - frontpage_tracks = Track.where(:frontpage => true) - frontpage_tracks.first.toggle!(:frontpage) unless frontpage_tracks.count == 0 + #frontpage_tracks = Track.where(:frontpage => true) + #frontpage_tracks.first.toggle!(:frontpage) unless frontpage_tracks.count == 0 track.toggle!(:frontpage) redirect_to :tracks end diff --git a/app/views/layouts/simple.html.erb b/app/views/layouts/simple.html.erb index b6a3db5..32b48e2 100644 --- a/app/views/layouts/simple.html.erb +++ b/app/views/layouts/simple.html.erb @@ -4,7 +4,8 @@ Predators <%= stylesheet_link_tag :all %> <%= javascript_include_tag :defaults %> - <%= javascript_include_tag 'jquery.jplayer.min' %> + <%= javascript_include_tag 'jquery.jplayer.min' %> + <%= javascript_include_tag 'jquery.masonry' %> <%= stylesheet_link_tag 'skin/jplayer.blue.monday', :media => 'screen' %> <%= csrf_meta_tag %> diff --git a/app/views/predators/_blogs.html.erb b/app/views/predators/_blogs.html.erb new file mode 100644 index 0000000..d517fd4 --- /dev/null +++ b/app/views/predators/_blogs.html.erb @@ -0,0 +1,3 @@ +
+ <%= raw @latest_front_page_blogpost %> +
\ No newline at end of file diff --git a/app/views/predators/_pictures.html.erb b/app/views/predators/_pictures.html.erb new file mode 100644 index 0000000..c9693bf --- /dev/null +++ b/app/views/predators/_pictures.html.erb @@ -0,0 +1,15 @@ +
+
+ <% @pictures.each do |picture| %> + <%= image_tag picture.image.url %> + <% end %> +
+ + +
\ No newline at end of file diff --git a/app/views/predators/_player.html.erb b/app/views/predators/_player.html.erb new file mode 100644 index 0000000..927fc15 --- /dev/null +++ b/app/views/predators/_player.html.erb @@ -0,0 +1,30 @@ +
+ + + <% unless @frontpage_audio_url.nil?%> + <%= render 'tracks/player', :audio_url => @frontpage_audio_url %> + <% end %> + +
+
+
+
+
+
+
+
+
+
+ <%= render @tracks unless @tracks.nil? %> +
+
+
+
+
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/app/views/predators/_poster.html.erb b/app/views/predators/_poster.html.erb new file mode 100644 index 0000000..439ccc3 --- /dev/null +++ b/app/views/predators/_poster.html.erb @@ -0,0 +1,42 @@ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+ <%= render('shared/title') %> +
+
+
+ <%= raw @next_show.to_html unless @next_show.nil? %> +
+
+
+
\ No newline at end of file diff --git a/app/views/predators/home.html.erb b/app/views/predators/home.html.erb index d527859..5fbcd48 100644 --- a/app/views/predators/home.html.erb +++ b/app/views/predators/home.html.erb @@ -1,45 +1,4 @@ - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
- <%= render('shared/title') %> -
-
-
- <%= raw @next_show.to_html unless @next_show.nil? %> -
-
- <% unless @frontpage_audio_url.nil?%> - <%= render 'tracks/player', :audio_url => @frontpage_audio_url %> - <% end %> -
\ No newline at end of file +<%= render 'predators/player' %> +<%= render 'predators/poster' %> +<%= render 'predators/blogs' %> +<%= render 'predators/pictures' %> \ No newline at end of file diff --git a/app/views/tracks/_player.html.erb b/app/views/tracks/_player.html.erb index 5f51877..c2bbb20 100644 --- a/app/views/tracks/_player.html.erb +++ b/app/views/tracks/_player.html.erb @@ -1,5 +1,5 @@ <% - visibility = 'hidden' if local_assigns[:visibility].nil? + visibility = 'none' if local_assigns[:visibility].nil? %> @@ -50,4 +50,4 @@ $(document).ready(function(){
- + \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 4ef244a..c0ab595 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -38,7 +38,16 @@ $(function(){ $("#micropost_content").val($("#micropost_content").val() + filename); $("#picture_chooser").css("z-index", -1); }); + + $("#play_control").bind('click', function(){ + $("#jquery_jplayer_1").jPlayer("play"); + }); + $("#pause_control").bind('click', function(){ + $("#jquery_jplayer_1").jPlayer("pause"); + }); + + $(".play_button").bind('click', function(e){ var filename = $(this).siblings('a').attr("href").split(/\?/)[0]; @@ -65,4 +74,6 @@ $(function(){ $("#jquery_jplayer_1").jPlayer("play"); $("#jp_playlist_1").html($(this).siblings('a').text()); }); + + $(".circle").animate({ borderTopColor: '#EAFF00', borderLeftColor: '#EAFF00', borderRightColor: '#EAFF00', borderBottomColor: '#EAFF00' }, 'slow'); }); \ No newline at end of file diff --git a/public/stylesheets/predators.css b/public/stylesheets/predators.css index f84dcde..4b3b4d6 100644 --- a/public/stylesheets/predators.css +++ b/public/stylesheets/predators.css @@ -378,4 +378,123 @@ nav ul li a:hover { div.jp-interface { background-color: #FFF!important; -} \ No newline at end of file +} + +.front_page_section +{ + /*height: 20px;*/ +} + +#pictures +{ + background-color: rgba(255, 50, 50, 1.0); +} + +#blogs_wrapper +{ + background-color: #1C3C0E; + color: white; +} + +#player_wrapper +{ + width: 550px; + margin-left: auto; + margin-right: auto; + position: relative; +} + +#pause_control +{ + +} + +#play_control +{ + +} + +.eye +{ + height: 108px; + width: 166px; + position: absolute; + background-color: rgba(0, 200, 0, .0); +} + +.eyeContainer +{ + height: 54px; + width: 166px; + background-color: rgba(200, 0, 0, .0); + overflow: hidden; +} + +.circle +{ + border-color: rgba(255, 255, 0, 0.7); + border-width: 90px; + border-radius: 108px 108px; + -moz-border-radius: 108px 108px; + -webkit-border-radius: 108px 108px; + width: 0px; + height: 0px; + border-style: solid; + position: relative; + z-index: 10; +} + +.eyetop +{ + left: -7px; + top: 0px; +} + +.eyebottom +{ + left: -7px; + top: -126px; +} + +.playGraphic +{ + border-left-color: black; + border-top-color: transparent; + border-right-color: transparent; + border-bottom-color: transparent; + left: 65px; + top: 20px; + border-right-width: 0px; + border-top-width: 34px; + border-bottom-width: 34px; + border-left-width: 52px; + z-index: 15; + position: absolute; + height: 0px; + width: 0px; + border-style: solid; +} + +.stopGraphic +{ + left: 53px; + top: 22px; + background-color: black; + height: 60px; + width: 60px; + z-index: 15; + position: absolute; +} + +.leftEye +{ + margin-left: -60px; +} + +.rightEye +{ + top: 0px; + right: 0px; + margin-right: -60px; +} + diff --git a/public/stylesheets/your_band.css b/public/stylesheets/your_band.css index 3b67217..378e813 100644 --- a/public/stylesheets/your_band.css +++ b/public/stylesheets/your_band.css @@ -13,12 +13,7 @@ audio img { margin: 10px; - -moz-box-shadow: 0 0 20px 5px green; - -webkit-box-shadow: 0 0 20px 5px green; - box-shadow: 0 0 20px 5px green; -} - -body -{ - background-color: red; + -moz-box-shadow: 0 0 20px 5px #A3DC55; + -webkit-box-shadow: 0 0 20px 5px #A3DC55; + box-shadow: 0 0 20px 5px #A3DC55; } \ No newline at end of file