Display asciicast example on homepage

openid
Marcin Kulik 13 years ago
parent 97fe0cb3ff
commit 81b06178fd

@ -0,0 +1,9 @@
// 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/
.hero-unit {
.asciicast {
margin-top: 40px;
}
}

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

@ -4,9 +4,11 @@
<div class="clear"></div>
</div>
<div class="description">
<%= random_description %>
</div>
<% unless (defined? skip_description) && skip_description %>
<div class="description">
<%= random_description %>
</div>
<% end %>
</div>
<%= player_script(asciicast) %>

@ -1,9 +1,16 @@
<div class="hero-unit">
<h1>ascii.io</h1>
<p>No bullshit asciicasting for developers</p>
<%= render :partial => 'asciicasts/asciicast',
:object => @asciicast,
:locals => { :skip_description => true } %>
<p>
<%= link_to 'Try it', installation_path, :class => "btn btn-primary btn-large" %>
<%= link_to 'Use it!', installation_path, :class => "btn btn-primary btn-large" %>
<%= link_to 'Browse', browse_path, :class => "btn btn-large" %>
</p>
</div>
<h2>Recent asciicasts</h2>

@ -1,5 +1,5 @@
<ul class="nav">
<li><%= link_to "About", "#" %></li>
<li><%= link_to "Use it!", installation_path %></li>
<li><%= link_to "Browse", browse_path %></li>
<li><%= link_to "Record", installation_path %></li>
</ul>

Loading…
Cancel
Save