Commit 69e7fca4
Changed files (3)
app
controllers
views
home
config
app/controllers/home_controller.rb
@@ -1,5 +1,2 @@
class HomeController < ApplicationController
- def index
- @creations = Creation.where(:is_restricted => false)
- end
end
app/views/home/index.html.erb
@@ -1,92 +0,0 @@
-<% provide(:description, "CakeSide is a free site to share your cake creations and ideas with other cake fanatics like yourself") -%>
-<% content_for :javascript do %>
-<script type="text/javascript">
- $(function() {
- $('.gallery').colorbox({
- rel:'gallery',
- width:function(){
- var width = '100%', viewport = $(window).width();
- if (viewport > 960) {
- width = '50%';
- } else if (viewport >= 768) {
- width = '80%';
- }
- return width;
- }
- });
- });
-</script>
-<% end -%>
-<% unless user_signed_in? -%>
- <div class="row">
- <div class="span6">
- <div id="slideshow" class="carousel slide">
- <div class="carousel-inner">
- <% @creations.each_with_index do |creation, index| %>
- <div class="item<%= index == 0 ? ' active' : ''-%>">
- <img alt="<%= creation.name %>" src="<%= creation.primary_image.image.large.url %>" style="display:block; margin-left:auto; margin-right:auto;" />
- <div class="carousel-caption">
- <h4><a href="<%= url_for creation %>"><%= creation.name %></a></h4>
- <p><%= creation.story %></p>
- </div>
- </div>
- <% end %>
- </div>
- <a class="carousel-control left" href="#slideshow" data-slide="prev">‹</a>
- <a class="carousel-control right" href="#slideshow" data-slide="next">›</a>
- </div>
- </div>
- <div class="span6">
- <img alt="Welcome to Cakeside" src="/assets/cakeside-logo.png">
- <h1>Welcome cake enthusiast!</h1>
- <p style="font-size:15px;">
- <strong>Make</strong> cakes, <strong>sell</strong> cakes, or just <strong>love</strong> eating them? You've come to the right place!
- <strong>CakeSide</strong> is a free site to <strong>share</strong> your cake <strong>creations</strong> and <strong>ideas</strong> with other cake fanatics like yourself!</p><br/>
- <p style="text-align: center;">
- Get your cakes featured on this page <a href="<%= url_for new_user_session_path %>" class="btn btn-primary btn-large">Sign Up Now!</a> or <%= link_to "sign in", new_user_session_path %>
- </p>
- </div>
-</div>
-<div class="row">
- <div class="span12">
- <hr>
- <div class="marketing">
- <div class="row">
- <div class="span4">
- <img class="bs-icon" src="/assets/cupcake_share.png" alt="share your creativity" style="margin-left:auto;margin-right:auto;display:block;" />
- <h2 style="text-align:center;">Share your creativity</h2>
- <p style="text-align:center;">Show off your originality and find interesting ideas with fellow passionate CakeSide artists.</p>
- </div>
- <div class="span4">
- <img class="bs-icon" src="/assets/cupcake_promote.png" alt="promote yourself" style="margin-left:auto;margin-right:auto;display:block;" />
- <h2 style="text-align:center;">Promote yourself</h2>
- <p style="text-align:center;">Get recognized for your work and connect with other artists with unique styles. </p>
- </div>
- <div class="span4">
- <img class="bs-icon" src="/assets/cupcake_inspire.png" alt="inspire a community" style="margin-left:auto;margin-right:auto;display:block;" />
- <h2 style="text-align:center;">Inspire a community</h2>
- <p style="text-align:center;">Upload creations, teach with tutorials, and create a vibrant community for everything cake.</p>
- </div>
- </div>
- <hr>
- </div>
- </div>
-</div>
-<% end -%>
-<div class="row">
- <div class="span12">
- <ul class="thumbnails">
- <% @creations.each do |creation| %>
- <li class="span3">
- <div class="thumbnail">
- <a href="<%= creation.primary_image.image.large.url %>" class="gallery" title="<%= creation.name %> - <%= creation.story %> "><img src="<%= creation.primary_image.image.thumb.url %>" alt="<%= creation.name %>" style="width:260px;height:180px;" /></a>
- <div class="caption">
- <h5><a href="<%= url_for creation %>"><%= short_name(creation, 20) %></a></h5>
- <h6><a href="<%= url_for profile_path(creation.user) %>"><%= shrink(creation.user.name, 20) %></a></h6>
- </div>
- </div>
- </li>
- <% end %>
- </ul>
- </div>
-</div>
config/routes.rb
@@ -8,7 +8,6 @@ Cake::Application.routes.draw do
root :to => "creations#index"
# /home
- match "dashboard" => "home#index"
match "about_us" => "home#about_us"
match "why_cakeside" => "home#why_cakeside"