Raw page with player only

openid
Marcin Kulik 12 years ago
parent 49644ffc68
commit 1754656578

@ -179,18 +179,6 @@ section::after {
visibility: hidden;
}
.play-button {
position: absolute;
left: 50%;
top: 50%;
width: 0;
.arrow {
text-align: center;
font-weight: bold;
}
}
ul.delimited {
border-bottom: 1px solid rgba(255, 255, 255, 0.7);
border-top: 1px solid rgba(0, 0, 0, 0.12);

@ -0,0 +1,5 @@
/*
*= require normalize
*= require player/colors
*= require player/player
*/

@ -79,6 +79,11 @@ $color5: #EDC951;
cursor: pointer;
.play-button {
position: absolute;
left: 50%;
top: 50%;
width: 0;
.arrow {
color: white;
font-size: 140px;
@ -86,6 +91,8 @@ $color5: #EDC951;
margin-left: -75px;
margin-top: -100px;
-webkit-font-smoothing: none;
text-align: center;
font-weight: bold;
&:hover {
text-shadow: 2px 2px 5px $main-color;

@ -1,7 +1,7 @@
class AsciicastsController < ApplicationController
PER_PAGE = 15
before_filter :load_resource, :only => [:show, :edit, :update, :destroy]
before_filter :load_resource, :only => [:show, :raw, :edit, :update, :destroy]
before_filter :count_view, :only => [:show]
before_filter :ensure_authenticated!, :only => [:edit, :update, :destroy]
before_filter :ensure_owner!, :only => [:edit, :update, :destroy]
@ -50,7 +50,12 @@ class AsciicastsController < ApplicationController
end
end
end
end
def raw
@asciicast = AsciicastDecorator.new(@asciicast)
@asciicast_author = UserDecorator.new(@asciicast.user)
render :layout => 'raw'
end
def edit

@ -0,0 +1 @@
<%= player @asciicast %>

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><%= page_title %></title>
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<%= stylesheet_link_tag "player", :media => "all" %>
<%= javascript_include_tag "application" %>
<%= javascript_include_tag "player" %>
<script>
window.unpackWorkerPath = '<%= javascript_path "unpack_worker" %>';
window.mainWorkerPath = '<%= javascript_path "main_worker" %>';
</script>
</head>
<body>
<%= yield %>
</body>
</html>

@ -3,7 +3,11 @@ AsciiIo::Application.routes.draw do
match "/browse" => "asciicasts#index", :as => :browse
match "/browse/popular" => "asciicasts#popular", :as => :popular
resources :asciicasts, :path => 'a'
resources :asciicasts, :path => 'a' do
member do
get :raw
end
end
match "/~:nickname" => "users#show", :as => :profile

Loading…
Cancel
Save