Home and installation pages

openid
Marcin Kulik 12 years ago
parent 44d6914991
commit 35af4cf9e7

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/

@ -0,0 +1,10 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
div.info {
text-align: center;
font-family: 'Trebuchet MS';
font-size: 50px;
margin-bottom: 100px;
}

@ -47,22 +47,39 @@ header {
}
ul {
li {
display: inline-block;
height: 100%;
font-weight: bold;
a {
color: white;
}
}
}
ul#session-info {
list-style: none;
height: 100%;
float: right;
background-color: $color1;
li {
color: #eee;
display: inline-block;
// color: #eee;
margin-right: 20px;
height: 100%;
}
.avatar {
height: 100%;
}
}
ul#navigation {
list-style: none;
height: 100%;
float: right;
background-color: $color3;
}
}
}

@ -0,0 +1,3 @@
// Place all the styles related to the static_pages controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

@ -0,0 +1,5 @@
class HomeController < ApplicationController
def show
@asciicasts = Asciicast.order("created_at DESC").limit(10)
end
end

@ -0,0 +1,5 @@
class StaticPagesController < ApplicationController
def show
render params[:page]
end
end

@ -0,0 +1,2 @@
module HomeHelper
end

@ -0,0 +1,2 @@
module StaticPagesHelper
end

@ -1,5 +1,3 @@
<h2>Recent asciicasts</h2>
<ul class="asciicasts">
<%= render :partial => "asciicasts/preview", :collection => @asciicasts, :as => :asciicast %>
</ul>

@ -0,0 +1,9 @@
<div class="info">
Some big awesome tagline and stuff.
</div>
<h2>Recent asciicasts</h2>
<ul class="asciicasts">
<%= render :partial => "asciicasts/preview", :collection => @asciicasts, :as => :asciicast %>
</ul>

@ -0,0 +1,8 @@
<ul id="navigation">
<li>
<%= link_to 'Browse', asciicasts_path %>
</li>
<li>
<%= link_to 'Installation', installation_path %>
</li>
</ul>

@ -16,6 +16,7 @@
<%= link_to "ascii.io", "/", :class => "home" %>
</h1>
<%= render :partial => 'layouts/session_info' %>
<%= render :partial => 'layouts/navigation' %>
</nav>
</header>

@ -0,0 +1,5 @@
How to install
curl
gem install

@ -1,7 +1,6 @@
AsciiIo::Application.routes.draw do
resources :asciicasts
match ':id' => 'asciicasts#show', :constraints => { :id => /\d+/ }
resources :asciicasts, :path => 'a'
namespace :api do
resources :comments
@ -11,6 +10,8 @@ AsciiIo::Application.routes.draw do
end
end
match "/installation" => "static_pages#show", :page => 'installation'
match "/auth/:provider/callback" => "sessions#create"
match "/auth/failure" => "sessions#failure"
@ -19,5 +20,5 @@ AsciiIo::Application.routes.draw do
match "/connect/:user_token" => "user_tokens#create"
root :to => 'asciicasts#index'
root :to => 'home#show'
end

@ -0,0 +1,12 @@
require 'spec_helper'
describe HomeController do
describe "GET 'show'" do
it "returns http success" do
get 'show'
response.should be_success
end
end
end

@ -0,0 +1,5 @@
require 'spec_helper'
describe StaticPagesController do
end

@ -0,0 +1,15 @@
require 'spec_helper'
# Specs in this file have access to a helper object that includes
# the HomeHelper. For example:
#
# describe HomeHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe HomeHelper do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,15 @@
require 'spec_helper'
# Specs in this file have access to a helper object that includes
# the StaticPagesHelper. For example:
#
# describe StaticPagesHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# end
describe StaticPagesHelper do
pending "add some examples to (or delete) #{__FILE__}"
end

@ -0,0 +1,5 @@
require 'spec_helper'
describe "home/show.html.erb" do
pending "add some examples to (or delete) #{__FILE__}"
end
Loading…
Cancel
Save